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

feat: report link sharing #1397

Merged

Conversation

ryon
Copy link
Collaborator

@ryon ryon commented Apr 22, 2023

Closes #1395

Summary

  • Improve experience of getting and sharing validator results
  • Once a job ID is obtained from the server, push it onto the browser history stack as a query parameter (?report=[id]), so that results can be referred to later
  • Add handling for these query params to the app:
    • If there's an id in the URL, do a quick ping to see if that report exists
    • If so, show the "ready" status modal
    • If not, show an error with a CTA to "Start Over" (just dismisses the modal)
  • In the "ready" status modal:
    • Show some copy advising about 30 days retention
    • Add buttons to copy URLs for HTML and JSON versions of the report

Expected behavior

New "ready" modal

Screenshot 2023-04-21 at 7 13 30 PM

Confirmation of clipboard operation

Screenshot 2023-04-21 at 7 13 33 PM

"error" status modal when trying to load a page with an invalid id in the query

Screenshot 2023-04-22 at 3 33 49 PM

Checklist

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

Nice work!

@isabelle-dr
Copy link
Contributor

One clarifying question: is the link to JSON a download of the JSON, or is it a link to an online instance of it?
Is there a way to test this locally?

@themightychris
Copy link
Collaborator

@isabelle-dr it's a direct link to the static JSON file, what happens when people click on it will depend on how their browser is set up. Developers will commonly have a JSON viewer extension installed which will open it in their browser with formatting. In most cases, to download it someone would have to right click and select Save or open it and then File->Save.

To test ahead of getting merged and deployed to the public instance, you'd need to follow the steps under web/client's README to spin up the UI in dev mode and the Java backend service locally.

@ryon
Copy link
Collaborator Author

ryon commented Apr 27, 2023

Quick note: you shouldn't need to set up the Java backend to build and test the UI. The web app will connect to the existing cloud service.

@davidgamez davidgamez merged commit a1eead0 into MobilityData:master Apr 28, 2023
19 checks passed
@welcome
Copy link

welcome bot commented Apr 28, 2023

🥳 Congrats on getting your first pull request merged!

@themightychris themightychris deleted the features/report-link-sharing branch April 29, 2023 01:45
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.

Web Validator: add link details to results page
5 participants