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

Refactor the contact form to use React Router #6504

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

paulgain
Copy link
Contributor

@paulgain paulgain commented Feb 9, 2024

Description of change

Refactor the contact form to use React Router.

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

@paulgain paulgain requested a review from a team as a code owner February 9, 2024 11:48
@paulgain paulgain marked this pull request as draft February 9, 2024 11:51
Copy link

cypress bot commented Feb 9, 2024

Passing run #51009 ↗︎

0 70 7 0 Flakiness 0

Details:

Refactor export pipeline state
Project: data-hub-frontend Commit: dae1490de3
Status: Passed Duration: 08:37 💡
Started: Feb 12, 2024 10:09 PM Ended: Feb 12, 2024 10:17 PM

Review all test suite changes for PR #6504 ↗︎

@paulgain paulgain force-pushed the refactor/contact-form-to-use-react-router branch from 365b1f7 to 94fd358 Compare February 9, 2024 12:50
When filling out a form and then redirecting to add a contact we want to
persist the previous form's state so when we save the contact and return
to the form its state is maintained.

This new approach means we no longer have to write to window.sessionStorage
to save the form state and then read from it after saving the contact.

All of this is made possible by using react-router, a soft redirect compared
to the current hard redirect which sets window.location.href.
@paulgain paulgain force-pushed the refactor/contact-form-to-use-react-router branch from 94fd358 to 9c396de Compare February 12, 2024 12:02
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.

None yet

1 participant