Skip to content
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 the filename of the second chart for downloading #1434

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

Max-Z80
Copy link
Collaborator

@Max-Z80 Max-Z80 commented Feb 17, 2025

Description

it fixes #1413

How to test the feature:

  • Go to the charts module

  • Toggle on compare locations

  • Choose any two locations for example:

    • location1, admin1 : cabo Delgado
    • location1, admin2: ancuabe
    • location2, admin1: Gaza
    • location2, admin2: Bilene
  • select data to plot, for example "10-day NVDI (MODIS)"

  • Click download CSV in the top right of the chart in location 2

  • assert that the filename is mozambique_gaza_bilene_10_day_ndvi_modis.csv

  • Click download image in the top right of the chart in location 2

  • assert that the filename is mozambique_gaza_bilene_10_day_ndvi_modis.png

You can do the same for the chart corresponding to location 1

  • Click download CSV in the top right of the chart

  • assert that the filename is mozambique_cabo_delgado_ancuabe_10_day_ndvi_modis.csv

  • Click download image in the top right of the chart

  • assert that the filename is mozambique_cabo_delgado_ancuabe_10_day_ndvi_modis.png

Checklist - did you ...

Test your changes with

  • REACT_APP_COUNTRY=rbd yarn start
  • REACT_APP_COUNTRY=cambodia yarn start
  • REACT_APP_COUNTRY=mozambique yarn start
  • Add / update necessary tests?
  • Add / update outdated documentation?

Screenshot/video of feature:

@Max-Z80 Max-Z80 changed the title it fixes #1413 Fix the filename of the second chart for downloading Feb 17, 2025
Copy link

github-actions bot commented Feb 17, 2025

Build succeeded and deployed at https://prism-1434.surge.sh
(hash d3906d9 deployed at 2025-02-19T09:04:44)

@Max-Z80
Copy link
Collaborator Author

Max-Z80 commented Feb 18, 2025

@ericboucher , I did not write a test for that because there is no test for ChartsPanel yet and it would take a significant amount of time to acheive this. Is it ok or should I write a test anyway ?

@wadhwamatic
Copy link
Member

This works well, thanks @Max-Z80. Over to @ericboucher for approval

@ericboucher ericboucher merged commit fb5b5b3 into master Feb 19, 2025
6 checks passed
@ericboucher ericboucher deleted the fix/wrong-filename-when-comparing-charts branch February 19, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: filename doesn't correctly reflect the selected location when downloading chart png or csv
3 participants