feat: unapplied changes status indicator [DHIS2-22011] - #365
Merged
Merged
Conversation
Contributor
|
🚀 Deployed on https://pr-365.event-visualizer.netlify.dhis2.org |
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 2, 2026 10:17
235e427 to
4693c1e
Compare
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 2, 2026 12:00
4693c1e to
87f019f
Compare
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 3, 2026 06:59
76ac58b to
3822ec4
Compare
4 tasks
edoardo
reviewed
Sep 3, 2026
HendrikThePendric
marked this pull request as ready for review
September 9, 2026 15:31
HendrikThePendric
marked this pull request as draft
September 10, 2026 07:00
…2-22011] Deciding whether there are unapplied changes needs to know which output types the current config can produce, which until now only the action button hook could work out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…n [DHIS2-22011] A legacy Event Report persists its value column as a dy/latitude/longitude dimension. The app expresses that with the custom value fields instead and holds no layout position for them, so they survived a load without ever being rebuildable from visUiConfig — enough on its own to make a freshly loaded visualization look edited. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The section described sibling DHIS2 apps' helpers, none of which exist in this repo, so it pointed readers at symbols they could not find. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 22, 2026 09:45
52c0035 to
92a36c5
Compare
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 22, 2026 13:07
92a36c5 to
5f3f681
Compare
HendrikThePendric
marked this pull request as ready for review
September 22, 2026 13:29
edoardo
reviewed
Sep 23, 2026
edoardo
reviewed
Sep 23, 2026
edoardo
previously approved these changes
Sep 23, 2026
…2-22011] Inline styles become a CSS module, the notice text goes through i18n, and the stale state is suppressed while the visualization is loading. The notice stays mounted so it can fade in and out, and toggles aria-hidden so it leaves the accessibility tree while faded out. The indicator tests move from the bottom bar spec to a canvas spec.
HendrikThePendric
force-pushed
the
feat/unapplied-changes-DHIS2-22011
branch
from
September 23, 2026 15:23
5f3f681 to
5d728ed
Compare
… [DHIS2-22011] The overlay wraps the canvas content, reads the store itself and owns both the dimming and the notice, so Canvas is back to rendering PluginWrapper.
Canvas already reads isVisualizationLoading for PluginWrapper, so the overlay reading it from the store too made the two go through different paths for the same state.
Drop the comments that restated the code, state the reason each field needs special handling where the handling is, and let the code carry the parts that were only explained in prose.
…mensions [DHIS2-22011] Nothing derives the custom value from a wire-only dimension, and the claim did not hold for latitude/longitude at all. What is left is the reason the drop flips the legacy flag.
…HIS2-22011] The old name described the wire format rather than what the app does with these dimensions, so every call site had to re-explain it.
|
edoardo
reviewed
Sep 24, 2026
edoardo
approved these changes
Sep 24, 2026
This branch was previously deployed
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.



Implements DHIS2-22011
Description
Editing the layout or the options updates
visUiConfig, but the visualization on screen only changes once those edits are applied with one of the update-or-switch buttons. Until now nothing told the user that the two had drifted apart.This adds an "Unapplied changes" caption next to those buttons in the layout panel's bottom bar, styled to match the "Edited" suffix in the title bar and announced with
role="status". It is derived state rather than a flag:useHasUnappliedChangescompares the visualization on screen against the one the currentvisUiConfigwould produce, so it clears itself once the change is applied. It reports a change whenever the selected output type is no longer applicable, and stays hidden when no output type can be produced at all — then every button that would apply the config is disabled and there is nothing for the user to act on.Three supporting changes come with it:
areVisualizationsEquivalentalready answered "does the saved visualization differ from the current one", and now serves the current-vs-configured comparison as well. Fields that the API returns richer thanvisUiConfigcan rebuild — option set and legend set names, a repetition's backend-derived context, the custom value's name and aggregation type — compare by id.dy/latitude/longitudedimensions are dropped when a loaded visualization is normalized. A legacy Event Report persists its value column that way, and the app holds no layout position for them, so on their own they were enough to make a freshly loaded visualization look edited.Quality checklist
Known issues
aggregationTypereports unapplied changes with nothing changed: the ui config defaults the custom value's aggregation type toDEFAULTwhere the options default toSUM, so the two sides differ on that field alone. A test asserts this current behaviour. Left as is pending the custom value rework, rather than adding custom-value-specific logic to the comparison.🤖 Generated with Claude Code