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

Store exploration dates on url #713

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

danielfdsilva
Copy link
Collaborator

@danielfdsilva danielfdsilva commented Oct 26, 2023

This PR achieves 2 things:

  • store the dates info in the url for sharing purposes (contribute to [E & A] - Page status sharing #527)
  • Ensure that items in the url do not override each other. Since URLSearchParams were being initialized every time, adding something new, removed the previous ones.

Add the following the the preview url to see this working. You should see a dataset being compared and, a date range and an AOI.

/exploration?datasets=%5B%7B%22id%22%3A%22no2-monthly%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22min%22%2C%22label%22%3A%22Min%22%2C%22chartLabel%22%3A%22Min%22%2C%22themeColor%22%3A%22infographicA%22%7D%2C%7B%22id%22%3A%22max%22%2C%22label%22%3A%22Max%22%2C%22chartLabel%22%3A%22Max%22%2C%22themeColor%22%3A%22infographicC%22%7D%5D%7D%7D%5D&aois=%5B%22l_%7EtSc%7Efx%40ybwjP%7Bvc%60Fd%7BhyBtmyfG%22%2C%222aa8de%22%2Cfalse%5D&date=2018-11-13T00%3A00%3A00.000Z&dateRange=2017-02-14T00%3A00%3A00.000Z%7C2018-03-18T00%3A00%3A00.000Z&dateCompare=2022-07-05T23%3A00%3A00.000Z

Direct Link for convenience

@netlify
Copy link

netlify bot commented Oct 26, 2023

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit b5bab98
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/653a3af1ba00ca0008de932d
😎 Deploy Preview https://deploy-preview-713--veda-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@hanbyul-here hanbyul-here left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that it is not sharing every map state (ex.projection), but it seems out of scope for this pr.

@danielfdsilva danielfdsilva merged commit 67f6aaf into feature/exploration Oct 31, 2023
7 checks passed
@danielfdsilva danielfdsilva deleted the feature/url-data branch October 31, 2023 10:00
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.

2 participants