freeCodeCamp/freeCodeCamp

[Certification Projects] Show a dialog when user leaving the page

Open

#54.796 aperta il 14 mag 2024

Vedi su GitHub
 (17 commenti) (0 reazioni) (0 assegnatari)TypeScript (44.572 fork)batch import
help wantedscope: curriculum

Metriche repository

Star
 (444.744 star)
Metriche merge PR
 (Merge medio 6g 11h) (253 PR mergiate in 30 g)

Descrizione

Description

On practice challenge pages, the code is automatically saved to the browser storage when the user clicks the test button. This isn't the case with the certification project pages, the code is not saved unless the user clicks the "Save your Code" button.

We have received multiple reports of users losing their code changes after they closed the tab or navigated away from the page, without pressing the save button.

I think one way to prevent this is to update the instruction text and mention that the user needs to manually save their progress.

Though I'm not sure where the text should be added. Perhaps at the end of the instruction and as a note?

Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!

Notes:
- [Other notes related to the project requirements]
- Your code is not automatically saved. Be sure to click the "Save your Code" button to save your progress.

Affected pages

Certification projects.

Example: https://www.freecodecamp.org/learn/2022/responsive-web-design/build-a-survey-form-project/build-a-survey-form

Additional context

Other UI/UX improvements are discussed in #53000.

Guida contributor