feat: [DHIS2-21941] Self contained changelog widget - #4690
Open
henrikmv wants to merge 54 commits into
Open
Conversation
…_plural-custom-terminology-note-relationship-attribute
|
🚀 Deployed on https://deploy-preview-4690.capture.netlify.dhis2.org |
…etchFormattedValues logic
henrikmv
marked this pull request as ready for review
August 5, 2026 14:57
henrikmv
marked this pull request as draft
August 6, 2026 06:45
henrikmv
marked this pull request as ready for review
August 6, 2026 06:48
…_plural-custom-terminology-note-relationship-attribute
…_display-custom-teminology
…9_refine-configurable-terminology-support
…/chore/DHIS2-21941_SingleSourceChangelogValues
henrikmv
marked this pull request as draft
August 15, 2026 20:00
…vent-view-mode' into hv/chore/DHIS2-21941_SingleSourceChangelogValues
…9_refine-configurable-terminology-support
…/chore/DHIS2-21941_SingleSourceChangelogValues
…/chore/DHIS2-21941_SingleSourceChangelogValues
…vent-view-mode' into hv/chore/DHIS2-21941_SingleSourceChangelogValues
…/chore/DHIS2-21941_SingleSourceChangelogValues
…/chore/DHIS2-21941_SingleSourceChangelogValues
…/chore/DHIS2-21941_SingleSourceChangelogValues
…/chore/DHIS2-21941_SingleSourceChangelogValues
henrikmv
marked this pull request as ready for review
August 28, 2026 12:18
…igurable-terminology-support' into hv/chore/DHIS2-21941_SingleSourceChangelogValues
|
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.



DHIS2-21941
This PR makes changelog widgets self-contained by removing the
entityData/eventData/trackedEntityDataprops that were passed down from parent components. Instead, the changelog now fetches current entity values directly from the tracker API via a newuseCurrentEntityValueshook.Key changes
New
useCurrentEntityValueshook — fetches current values fromtracker/events/{id}ortracker/trackedEntities/{id}, replacing the prop-based approach.Improved
isLatestValuedetection — previously comparedchange.currentValueagainst a prop-provided snapshot. Now validates against both the newest changelog entry per field and fresh API data.Centralized
removeChangelogQueries— extracts duplicated cache invalidation into a shared utility, and adds invalidation for two new mutation sites:CompletionMenuItemandSkipAction.Opening the changelog now fires one extra tiny
tracker/{events|trackedEntities}/{id}?fields=…[…,value]fetch, but it runs in parallel with the (slower) changelog list request, is cached withstaleTime: Infinityso reopens are free, and is skipped entirely for changelogs withoutFILE_RESOURCE/IMAGEfields. In return, the widget becomes fully self-contained — no more entityData prop drilled from three different-shaped parent sources, and no more fragile?.valuehack that silently broke on stale parent caches.