-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUG]: Not clear how to get around the error message about unsaved changes #20927
Comments
I also faced similar problem during exploration creation (testing) |
Hey @natashabag, |
Hi @ujjwalpathaak, sorry for the late reply. Thank you for digging into this and sharing your findings! I think that the name numberOfOpenedTabs isn't really different from tabOpenCount, so I don't think we need to rename it. However, I do agree with you that we need to add destructor logic. Is there a way to do this in a foolproof way (such that we are guaranteed to call the destructor and decrement the count before the page is closed)? I think that the general aim behind this feature is to avoid the same person making edits to the same entity in multiple tabs (which can happen by accident), so I'm not sure that either of your two suggestions at the bottom would resolve the issue (since both of them will allow editing the same entity in multiple tabs). I think a successful resolution here would ensure that the message is not shown when it is not supposed to be -- let's explore that first, and if it's not possible to do that with certainty, we could look into other options for the product behaviour. Hope this helps, and feel free to ask if you have follow-up questions -- thanks! |
Hey @seanlip,
is being used to bind the for the same thing in
is being used ~ which works correctly. I think the issue is that using a regular function in I used an arrow func in Screen.Recording.2024-11-06.at.9.59.47.AM.webmHave a look at the video. It shows that the feature to handle unsaved changes when closing tabs is now working well. It allows a new tab to access the page, and when I increase the tab count to 3 and then lower it to 2, the values in localStorage also update accordingly. |
OK, thanks @ujjwalpathaak. I have one question: is the original issue always reproducible in the story editor with 100% certainty, or does it only happen sometimes? If the former, then your solution seems likely to be correct, but I just wanted to double-check this. |
Hey @seanlip, |
@ujjwalpathaak Sounds good, thanks. I'm assigning you! |
Describe the bug
Not clear how to get around the error message about unsaved changes. When the changes to a story have been unsaved for some reason, user is unable to get back to the story, and make some changes. For example, normal user won't be able to navigate to the tab that had been closed as instructed per error message. The message should be more clear where to go and how to get back access to the story if it's possible.
URL of the page where the issue is observed.
https://www.oppiatestserver.org/story_editor/of7BrmztCbX1
Steps To Reproduce
Preconditions: user has to be granted manager's access to Fractions, and curriculum admin
Expected Behavior
The message should be more clear. Or user should be granted access to the story regardless unsaved changes.
Screenshots/Videos
bughunt.mov
What device are you using?
Desktop
Operating System
MacOS
What browsers are you seeing the problem on?
Chrome, Firefox
Browser version
Chrome 126.0.6478.57, Firefox 127.0
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
The text was updated successfully, but these errors were encountered: