-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: plugin flashes when interacting with Interpretations modal [DHIS2-15570] #3017
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
🚀 Deployed on https://pr-3017--dhis2-data-visualizer.netlify.app |
Passing run #2789 ↗︎
Details:
Review all test suite changes for PR #3017 ↗︎ |
jenniferarnesen
changed the title
fix: calculate visualization width and height when it is with the plugin wrapper
fix: plugin flashes when interacting with Interpretations modal [DHIS2-15570]
Apr 18, 2024
edoardo
approved these changes
Apr 22, 2024
Merged
jenniferarnesen
added a commit
that referenced
this pull request
Apr 25, 2024
Fixes DHIS2-15570 Fixes DHIS2-17137 Prevent re-requests for analytics, and resulting re-renders that were giving a flashing effect. * InterpretationModal: memoize the callback to avoid a re-render due to a "new" function being passed with each render of InterpretationModal. The effect of this change is minor, probably just 1 rerender * VisualizationPlugin: ensure that the size of the plugin is set when it is coming from the modal so that when changing the width of the viewport, the visualization adjusts its size accordingly. (Previously this "worked" but only because of all the re-fetch/re-renders) * VisualizationPluginWrapper: need to listen to the individual properties, rather than the whole props object since that was triggering lots of unnecessary re-fetch/renders. * set the max-height to respect viewport so that vertical resize causes the chart to adjust accordingly
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.
Fixes DHIS2-15570
Fixes DHIS2-17137
Requires dhis2/analytics#1608
Key features
Description
Video
before (width):
flashing.in.interp.modal.mov
before (height):
no.height.resize.mov
after (width):
https://github.com/dhis2/data-visualizer-app/assets/6113918/5dbeb7e4-edcd-4f5f-9b4a-e829c9061920
after (height):
height.resize.works.mov