Skip to content

feat: revert history and protect Test navigation#72

Merged
EndBug merged 4 commits intoPoliNetworkOrg:mainfrom
lorenzocorallo:26-browser-history
Apr 22, 2023
Merged

feat: revert history and protect Test navigation#72
EndBug merged 4 commits intoPoliNetworkOrg:mainfrom
lorenzocorallo:26-browser-history

Conversation

@lorenzocorallo
Copy link
Copy Markdown
Member

  • Browser history is reverted
  • During test phase the user can't go back in browser history (thanks to useBlocker hook)
  • Added a button to exit the test (with confirm prompt)
  • in App.tsx, part of the DOM has been moved to a separate function Layout because otherwise react-router was complaining about the context.

react-router-dom library has been updated to the LTS version (6.10.0) which includes the unstable_useBlocker hook, used to prevent navigation in test phase.

Even if it's marked as unstable, from my tests it seems to be working fine, @EndBug feel free to test it with BrowserStack. Also this is suggested here

Closes #26

- updated to LTS `react-router-dom`
- use `createHashRouter` with `RouterProvider` as described in latest
  docs (v6.10.0) to support data APIs
@github-actions github-actions Bot temporarily deployed to preview April 7, 2023 15:43 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2023

Pages Preview
Preview removed because the pull request was closed.
2023-04-22 13:10:46 +0000

@lorenzocorallo lorenzocorallo marked this pull request as draft April 8, 2023 17:51
@github-actions github-actions Bot temporarily deployed to preview April 21, 2023 14:55 Destroyed
@lorenzocorallo lorenzocorallo marked this pull request as ready for review April 21, 2023 15:08
Copy link
Copy Markdown
Member

@EndBug EndBug left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@EndBug EndBug added the type: fix Updates to existing functionalities label Apr 22, 2023
@EndBug EndBug merged commit 893f85c into PoliNetworkOrg:main Apr 22, 2023
@lorenzocorallo lorenzocorallo deleted the 26-browser-history branch April 22, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Updates to existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: correctly handle browser back button usage

2 participants