-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: icon in SV visualization DHIS2-10496 #1440
Merged
Merged
Conversation
This file contains 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, but some of the todos needs to be addressed before merging
0246ecb
to
3f375fa
Compare
167969b
to
f9728e5
Compare
This requires the SVG icons from the API to use "currentColor" in their fill/stroke attributes instead of the fixed color currently used.
This allow for controlling the color of the icon from the app.
The attribute is not required when the SVG is embedded in another document, but in the case of download, the SVG is "standalone" and requires the namespace.
Related to DHIS2-15157
f9728e5
to
410a94d
Compare
martinkrulltott
approved these changes
Apr 27, 2023
dhis2-bot
added a commit
that referenced
this pull request
Apr 27, 2023
# [25.1.0](v25.0.0...v25.1.0) (2023-04-27) ### Features * icon in SV visualization DHIS2-10496 ([#1440](#1440)) ([e6563ca](e6563ca))
🎉 This PR is included in version 25.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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-10496
Relates to dhis2/data-visualizer-app#2236
Key features
Description
An icon can be assigned to a DE/indicator in Maintenance app.
In DV app there is a new option for Single Value visualizations for showing this icon on the side of the value.
Currently the SVG icon is embedded via a
image
tag in the main SV SVG.TODO
Known issues
currentColor
instead of a specific color in their fill, stroke attributes. Solved by replacing the hardcoded color withcurrentColor
after fetching the SVG from the API.Screenshots
Example in DV:

With contrast color applied:

Example in dashboard:

Screencast of the toggling of the icon in DV:
https://user-images.githubusercontent.com/150978/222401093-f64acb37-70e2-41d4-ae4b-5b9f4550e8d5.mov