AdaCore / learn

Sources for learn.adacore.com
https://learn.adacore.com
Creative Commons Attribution 4.0 International
93 stars 38 forks source link

Toggling "Settings->Use Tabbed Editor View" is too easy, and reverts your changes with no warning #1100

Closed brgaeke closed 2 months ago

brgaeke commented 3 months ago

I witnessed the following when working with a student: if you click the "Use Tabbed Editor View" checkbox or "Use the dark theme" checkbox in the "Settings" popup menu, your current changes are reverted from the text area. You are not warned before this happens, like you are when you hit the "Reset" button.

This is tied up with a closely related issue: it is too easy to accidentally click "Use Tabbed Editor View" when you are aiming for the "Run" or "Compile" button below the edit widget! This particularly shows up if you have your mouse over the edit widget, and then move down and to the left towards the "Run" or "Compile" button. The "Run" or "Compile" button is ordinarily flush left, aligned with the left side of the edit widget, and just below it, so that your mouse naturally passes over the Settings popup area, activating it as you move it toward the "Run" or "Compile" button. The resulting popup menu mostly obscures the "Run" or "Compile" button.

If you are a student who has typed something complicated in to try to solve a lab, and you go to hit Run, but miss the button, and as a result the editor throws away all your hard work, then you will be discouraged.

One possible way to fix this would be to make it so that Settings and Switches do not automatically open their respective menus just because you mouse over them (maybe you make it so that you have to click or click-and-hold to open the menu). Another way might be to move them, e.g., so that they are right-justified rather than left-justified. And certainly, if changes will be lost, a warning dialog should appear, allowing you to cancel the change and save your work.

brgaeke commented 3 months ago

image

Red arrow shows sample direction of mouse track

gusthoff commented 3 months ago

Hey @brgaeke,

Yes, I agree: losing all the work is indeed discouraging. We will work on improving this.

Thanks for reporting the issue and for all the suggestions!

gusthoff commented 2 months ago

Screenshot 2024-09-08 at 16-12-37 Imperative language — learn-sandbox adacore com

learn_modal_window

gusthoff commented 2 months ago

Note: these changes will be deployed by the end of September.