Repository navigation
fix: use the vis type for the file menu dialog labels of event visualizations (DHIS2-22681) - #1883
Open
HendrikThePendric wants to merge 2 commits into
Open
HendrikThePendric wants to merge 2 commits into
HendrikThePendric wants to merge 2 commits into
Conversation
…izations (DHIS2-22681) The Delete, Rename and Save as dialogs used the fixed label "line list" for every eventVisualization. IDV also saves pivot tables as eventVisualization, so those dialogs said "line list" for pivot tables. The label for eventVisualization now comes from the vis type: "line list" for LINE_LIST (and when no vis type is set), "pivot table" for PIVOT_TABLE and "visualization" for anything else. Labels for the other file types are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…681) Look up a lower-case label for every EventVisualizationType, so new vis types in IDV get a fitting label in the Delete, Rename and Save as dialogs without another change here. Unknown types still fall back to "visualization". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
1 of 4 tasks
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-22681
Key features
eventVisualization, so a pivot table in IDV says "pivot table" instead of "line list".Description
IDV passes
type="eventVisualization"toFileMenu, andlabelForFileTypemapped that to the fixed string "line list". IDV also saves pivot tables under that type.typestill sets the API endpoint, so it stays as it is.labelForFileType(fileType, visType)now takes the vis type as an optional second argument. ForeventVisualizationit looks up a lower-case label for everyEventVisualizationType, so new vis types in IDV get a fitting label without another change here:LINE_LISTor nonePIVOT_TABLECOLUMN,STACKED_COLUMN,BAR,STACKED_BAR,LINE,AREA,STACKED_AREA,PIE,RADAR,SCATTER,BUBBLEYEAR_OVER_YEAR_LINE,YEAR_OVER_YEAR_COLUMNGAUGE,SINGLE_VALUEThe labels are separate lower-case i18n strings rather than lower-cased
getDisplayNameByVisTypeoutput, because lower-casing translated strings breaks some languages (German nouns, for example) and some display names read oddly mid-sentence ("Year over year (column)").Wiring:
RenameDialogandSaveAsDialogreadobject.type.DeleteDialoggets a new optionalvisTypeprop, whichFileMenufills fromfileObject.type.Other apps:
visualization), Maps (map), event reports: no change, since onlyeventVisualizationuses the vis type.LINE_LISTand a missing vis type both keep "line list".New i18n strings: one lower-case label per vis type (see table).
Quality checklist
Jest tests added for
labelForFileType(including one that everyEventVisualizationTypehas its own label), the three dialogs, and theFileMenu→DeleteDialogwiring. Not tested in a running app yet.Follow-up: bump
@dhis2/analyticsin IDV once this is released.🤖 Generated with Claude Code