Repository navigation
feat(medications): add list grouping, filters, and category ordering - #1425
Merged
6 commits merged intoNov 23, 2026
Merged
6 commits merged into
6 commits merged into
Conversation
Extend the /medications layout blob and its PUT route with groupBy, groupsOpen and categoryOrder. Each field is optional and preserved when absent, like view and order. Reuse the Labs applyCategoryOrder for category ordering instead of a copy. It takes the catch-all key as a parameter, so medications can keep OTHER last.
…riod Add a search field (with / as a shortcut), a treatment-period range and the category select in one filter rail above the list. A filter with no match shows an empty state with a reset action. A reversed period shows an alert in the rail. Drop filterMedicationsByCategory: filterMedications covers the category filter, so the old helper and its test went with it. The rail uses the existing ALL_MEDICATION_CATEGORIES sentinel instead of a second copy.
Group the cards and the table by category, each group with its own disclosure. Settings gets a switch for grouping and the default open mode: expanded, flagged (only groups with a dose due) or collapsed. While a filter is active, every group with a match opens. The grouped and flat card lists share one card renderer. The table's two row loops share one helper. Dose status comes from one helper (buildDoseStatusById) instead of two copies of the same map.
Add a category order card to the medications settings. It shows when grouping is on. Built-in and custom categories can be dragged or moved with arrows, then saved explicitly. Save sends the new order merged with any saved categories that are not on screen. Reuse the Labs applyCategoryOrder and mergeCategoryOrder for ordering rather than copies. Settings tests keep only behaviour they can render: the overlapping-save test re-implemented the state machine instead of calling the component, so it went.
ferges123
marked this pull request as ready for review
November 20, 2026 21:55
Owner
|
Thank you @ferges123, this is thoughtful work. Grouping, search and the treatment period filter feel native, and reusing the Labs model kept it consistent. It is merged into
It ships in 1.49.0. This PR will show as merged once the release reaches |
Merged
2 tasks done
ferges123
pushed a commit
to ferges123/HealthLog
that referenced
this pull request
Nov 27, 2026
…ping feat(medications): add list grouping, filters, and category ordering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the following to the
/medicationspage: