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

Warn students when they are about to leave the practice screen if they changed code #9

Closed
NathanLovato opened this issue Dec 28, 2021 · 3 comments · Fixed by #277
Closed
Assignees
Labels
enhancement New feature or request user experience Improvement to the interface or user interactions
Milestone

Comments

@NathanLovato
Copy link
Contributor

Students can back out of the practice screen using either the back button or the outliner/index button. We don’t warn about leaving whatsoever, but students may have some unfinished code there and the click on a button might have been a mistake.

It stands to reason, we should warn users before they navigate away and lose any progress, at least if there was some progress (i.e. the code in the code editor is different from the default slice.

@NathanLovato NathanLovato added enhancement New feature or request user experience Improvement to the interface or user interactions labels Dec 28, 2021
@NathanLovato NathanLovato added this to the 0.2 milestone Dec 28, 2021
@NathanLovato NathanLovato modified the milestones: 0.2, 0.3 Jan 26, 2022
@mathmods
Copy link
Contributor

mathmods commented Feb 5, 2022

I'm currently working on this.
It should be a simple use of a confirmation pop up whenever the functions related to switching sites are called while the current tab is an unfinished edited practice. I'm going to use the _code_editor_is_dirty bool (with public getter) to tell if it is changed and uncomplete.

@YuriSizov
Copy link
Contributor

I'm going to use the _code_editor_is_dirty bool

Correct, I'm pretty sure it was exposed specifically for this issue.

@NathanLovato
Copy link
Contributor Author

Thanks for contributing once more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user experience Improvement to the interface or user interactions
Projects
None yet
3 participants