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

Enhance FormSteps to manage history using path fragment #6213

Merged
merged 12 commits into from
Apr 18, 2022

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 15, 2022

Why: So that I can navigate back and forth in the new IdV v2 application, and my location is maintained accurately in the address bar path.

In the original document capture implementation, we included history management as part of the "steps" implemented there. That implementation only allowed for querystring-based hash fragments (e.g. /document_capture#step=selfie).

Because we want the React application to manage incoming routed URLs from Rails, and because hash fragment routing is unsightly, this pull request seeks to expand this base support to allow for path-based history management.

Testing Instructions:

  1. Set idv_api_enabled: "true" in local config/application.yml
  2. Go to: http://localhost:3000/verify/v2/
  3. Observe that you see the personal key page (the current first step of the application)
  4. Click "Continue"
  5. Observe that you see the confirmation modal, and the address bar changes to reflect /verify/v2/personal_key_confirm
  6. Refresh the page
  7. Observe that you still see the confirmation modal
  8. Press your browser's back button
  9. Observe that you see the personal key page, and the address bar changes to the previous value (/verify/v2/)

Video:

Screen.Recording.2022-04-15.at.4.10.22.PM.mov

Draft only because I wrapped this up rather quickly at the end of the day and haven't had a chance to give it a thorough look-over, but functionally it seems to work quite fine.

Base automatically changed from aduth-personal-key-continue to main April 18, 2022 14:10
Should be responsibility of consumer to deal with lingering path fragment upon completion if necessary

changelog: Upcoming Features, Identity Verification, Add client-side application path routing
**Why**: Because it will be necessary to reliably create step URLs

#6213 (comment)
We're not using a query parameter format
@aduth aduth marked this pull request as ready for review April 18, 2022 18:19
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@aduth aduth merged commit 57da841 into main Apr 18, 2022
@aduth aduth deleted the aduth-use-history-path branch April 18, 2022 20:24
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

2 participants