Skip to content

feat: [DHIS2-21635] Display custom terminology labels across UI - #4727

Open
henrikmv wants to merge 169 commits into
masterfrom
hv/feat/DHIS2-21635_display-custom-teminology
Open

henrikmv wants to merge 169 commits into
masterfrom
hv/feat/DHIS2-21635_display-custom-teminology

Conversation

@henrikmv

@henrikmv henrikmv commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

DHIS2-21635

Implements Custom Terminology in the Capture app by using these functions:

// Non-hook, from programCollection (epics, thunks, selectors)
getTermLabel(requests, { programId, stageId? })

// Non-hook, from a program object already in scope (self-contained widgets)
getTermLabelFromProgram(requests, { program })

// React hook (reads programId from Redux currentSelections if not passed)
useTermLabel(requests, { programId?, stageId? })

// HOC — injects resolved labels as props (class components, cross-cutting subtrees)
withCustomLabels(customLabels)(Component)

Requests are batched: [LabelKeys.enrollmentSingular, LabelKeys.eventPlural] returns { enrollmentLabel, eventsLabel }.

henrikmv added 30 commits July 23, 2026 08:24
…_plural-custom-terminology-note-relationship-attribute
…_plural-custom-terminology-note-relationship-attribute
Removed commented line from useProgram.ts.
…_plural-custom-terminology-note-relationship-attribute
…om-teminology' into hv/feat/DHIS2-21878_plural-custom-terminology-note-relationship-attribute
…om-teminology' into hv/feat/DHIS2-21878_plural-custom-terminology-note-relationship-attribute
…om-teminology' into hv/feat/DHIS2-21878_plural-custom-terminology-note-relationship-attribute
…om-teminology' into hv/feat/DHIS2-21878_plural-custom-terminology-note-relationship-attribute
…_plural-custom-terminology-note-relationship-attribute
…igurable-terminology-support' into hv/feat/DHIS2-21878_plural-custom-terminology-notes-relationships-attributes
…m-terminology-notes-relationships-attributes' into hv/feat/DHIS2-21635_display-custom-teminology
…m-terminology-notes-relationships-attributes' into hv/feat/DHIS2-21635_display-custom-teminology
…' into hv/feat/DHIS2-21878_plural-custom-terminology-notes-relationships-attributes
…ationships-attributes' into hv/feat/DHIS2-21635_display-custom-teminology
@henrikmv
henrikmv changed the base branch from master to hv/feat/DHIS2-21878_plural-custom-terminology-notes-relationships-attributes September 10, 2026 14:04
@henrikmv
henrikmv marked this pull request as ready for review September 10, 2026 14:05
@henrikmv
henrikmv requested a review from a team as a code owner September 10, 2026 14:05

@simonadomnisoru simonadomnisoru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great job and big effort on this PR 🥳 ! I just added a few small comments, and besides this, I was wondering if we can add at least 2-3 Cypress tests (perhaps in a follow-up ticket as this PR is already long enough).

@henrikmv

henrikmv commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I have addressed your comments. A follow-up Cypress ticket has been created: DHIS2-22121.

@simonadomnisoru simonadomnisoru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Amazing work 👏 !

Base automatically changed from hv/feat/DHIS2-21878_plural-custom-terminology-notes-relationships-attributes to master September 17, 2026 11:18
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants