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

Alert user when they leave without saving #303

Closed
js0mmer opened this issue May 17, 2023 · 1 comment · Fixed by #408
Closed

Alert user when they leave without saving #303

js0mmer opened this issue May 17, 2023 · 1 comment · Fixed by #408
Assignees
Labels
frontend Front End tasks good first task Good for newcomers Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the

Comments

@js0mmer
Copy link
Member

js0mmer commented May 17, 2023

Frequently, I will make changes to my schedule then forget to save and switch to the catalogue or close the site, losing all my changes. I think an alert should appear asking the user "Are you sure you want to leave? You will lose unsaved changes." when they attempt leave the roadmap page with unsaved changes.

@js0mmer js0mmer added frontend Front End tasks Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the labels May 17, 2023
@js0mmer js0mmer moved this to Backlog in PeterPortal Client May 17, 2023
@js0mmer
Copy link
Member Author

js0mmer commented May 17, 2023

Look into handling it with a React Router Prompt (we are using React Router v5 for reference). Should handle navigating to a different page on the site, not sure if it will handle leaving the site. Prompt has been replaced with useBlocker as of react router v6 which we are switching to as of #375. Can still use the same logic. If not, the beforeunload event should allow for handling leaving the site.

@js0mmer js0mmer added Story Point: 2 small UI change, maybe some CSS + JS. unit test would ideally be written, but not always. Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the and removed Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the Story Point: 2 small UI change, maybe some CSS + JS. unit test would ideally be written, but not always. labels May 17, 2023
@js0mmer js0mmer added the good first task Good for newcomers label Oct 9, 2023
@js0mmer js0mmer moved this from Backlog to In Review in PeterPortal Client Jan 26, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in PeterPortal Client Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Front End tasks good first task Good for newcomers Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the
Projects
Development

Successfully merging a pull request may close this issue.

2 participants