Skip to content

feat(#10908): support ordering header tabs by weight#11057

Merged
jkuester merged 7 commits into
medic:10224-ui-extensionsfrom
jkuester:10908-tab-weight
May 14, 2026
Merged

feat(#10908): support ordering header tabs by weight#11057
jkuester merged 7 commits into
medic:10224-ui-extensionsfrom
jkuester:10908-tab-weight

Conversation

@jkuester
Copy link
Copy Markdown
Contributor

@jkuester jkuester commented May 13, 2026

Description

Closes #10908

This PR adds support for ordering the main interface headers tabs according to the weight property configured in the header_tabs app settings. Additionally, the header_tab UI Extensions can also have a weight property that is used when factoring in the ordering of all the tabs. This ordering is honored both in the new and in the old UI.

There was considerable duplication and complexity around the sidebar menu options between the new and the old UI. I have refactored the handling of these options to follow similar patterns with what we have for the main header tabs.

Documentation for the new config will be added in medic/cht-docs#2213

AI disclosure

Most of the unit test updates were made by Claude. I have reviewed all changes.

Code review checklist

  • UI/UX backwards compatible: Test it works for the new design (enabled by default). And test it works in the old design, enable can_view_old_navigation permission to see the old design. Test it has appropriate design for RTL languages.
  • Readable: Concise, well named, follows the style guide
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.
  • AI disclosure: Please disclose use of AI per the guidelines.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@jkuester jkuester requested a review from dianabarsan May 13, 2026 19:36
@jkuester
Copy link
Copy Markdown
Contributor Author

@dianabarsan can you have a look at this when you get the chance? The refactoring here got pretty involved, so I wanted to give you a chance to see it in isolation before it goes into the main UI Extensions branch. 👍

@jkuester jkuester marked this pull request as ready for review May 13, 2026 19:44
@jkuester
Copy link
Copy Markdown
Contributor Author

The ordering/icons/functionality for all the tabs both in the header and the sidebar for both the new and old UIs should all work as expected. However, note that there are a few known styling issues with the UI Extensions in the legacy UI that are being addressed in #11017. So, if you notice any of those, just be aware that it is a known issue.

Copy link
Copy Markdown
Member

@dianabarsan dianabarsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet cleanup here! I pleasure to read really! I added some nits inline.

Comment thread webapp/src/ts/services/header-tabs.service.ts
Comment thread webapp/src/ts/services/header-tabs.service.ts Outdated
Comment thread webapp/src/ts/components/header/header.component.ts Outdated
Comment thread webapp/src/ts/components/header/header.component.ts Outdated
@jkuester jkuester merged commit 46c8f7c into medic:10224-ui-extensions May 14, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants