-
Notifications
You must be signed in to change notification settings - Fork 13
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: disable download button until map is rendered #3072
Conversation
🚀 Deployed on https://pr-3072--dhis2-maps.netlify.app |
2 flaky tests on run #3028 ↗︎
Details:
routes.cy.js • 1 flaky test • e2e-chrome-parallel-2.40
basemaps.cy.js • 1 flaky test • e2e-chrome-parallel-2.40
Review all test suite changes for PR #3072 ↗︎ |
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.
I'll refrain from commenting on any other part of this PR than the disabled attribute of the button, which is exactly as we agreed, so approved from my side.
<Button primary onClick={onDownload}> | ||
<Button | ||
primary | ||
disabled={!isRendered} |
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.
Great! In puppeteer I can wait until the button is enabled and then take a screenshot.
Added an |
6894755
to
52b4c11
Compare
…l map is rendered (#3072) * feat: disable download button until map is rendered * chore: code cleaning * chore: code cleaning * chore: code comment * fix: isPushAnalytics url param * fix: isPushAnalytics url param * chore: update @dhis2/analytics and deduplicate deps * chore: read single url param * fix: ensure isDownload is a bool to avoid prop-types error * fix: add class-names for push-analytics * fix: check download param when navigating to new * fix: prevent enabling download button while loading mask is showing * fix: add class to map container when no map id is set * fix: improve hover states and add consistent spacing [UX-161] (#3121) * fix: make `dhis2-map-new` class independent of downloadMode * feat: add push analytics instructions * chore: upgrade @dhis2/maps-gl --------- Co-authored-by: HendrikThePendric <[email protected]> Co-authored-by: Jen Jones Arnesen <[email protected]> Co-authored-by: Joseph John Aas Cooper <[email protected]>
# [100.5.0](v100.4.1...v100.5.0) (2024-03-18) ### Bug Fixes * navigating by the changing url ignored download mode and interpretation id parameters ([#3125](#3125)) ([fcc5eaa](fcc5eaa)) * **translations:** sync translations from transifex (dev) ([#3132](#3132)) ([7f5d178](7f5d178)) * improve hover states and add consistent spacing [UX-161] ([#3121](#3121)) ([3f9e667](3f9e667)) ### Features * add ability to add GeoJSON URL external layers ([#3127](#3127)) ([fbdf0b0](fbdf0b0)), closes [#3142](#3142) [#3144](#3144) [#3145](#3145) [#3149](#3149) [#3148](#3148) [#3147](#3147) [#3143](#3143) [#3151](#3151) [#3154](#3154) * when rendering for push analytics, disable download button until map is rendered ([#3072](#3072)) ([4b1076c](4b1076c)), closes [#3121](#3121)
Implements https://dhis2.atlassian.net/browse/DHIS2-16357
This PR will make sure the download map button is disabled if the map is still being rendered.
Related PR: dhis2/maps-gl#552
For push analytics, the map can be rendered when there is no
disabled
attribute on theDownload
button.The scope of this PR was extended slightly by @HendrikThePendric. It now also contains changes that ensure certain class names are in place and the app is served with a JSON instructions file.