Bug: Disabled File Options Lack Guidance When Sketch is Unsaved
p5.js version
No response
What is your operating system?
Linux
Web browser and version
Chrome: 146.0.7680.80
Actual Behavior
When a sketch is not saved, “Duplicate” and “Add to Collection” are disabled in the File dropdown. However, there is no indication or explanation provided to the user about why these options are unavailable.
This leads to confusion, especially for new users, as the UI does not communicate that saving the sketch is a prerequisite for enabling these actions.
Expected Behavior
- Disabled options should display a tooltip on hover
- Tooltip should clearly state the reason, e.g., “Save the sketch before duplicating or adding to a collection”
Steps to reproduce
- Open the p5.js Web Editor
- Create a new sketch
- Do not save the sketch
- Open the File dropdown
- Observe that options like “Duplicate” and “Add to Collection” are disabled
I wish to work on fixing on this issue.
This is a great UX catch, @yugalkaushik Adding tooltips to disabled menu items would definitely help new users understand the 'Save' requirement.
I'd love to help out with the React implementation for this. I was thinking we could wrap those specific MenuItem components in a conditional tooltip that triggers when the sketch state is unsaved.
@raclim, if this hasn't been started yet, I'd be happy to take it on or assist @yugalkaushik with a PR...
@saurabh24thakur Thanks for your interest in this—just assigned this to you if you're still down to take this up!
hey @raclim, just checking in on this one, if it is still open, i would love to take this on and open a pr !
@yugalkaushik tooltip is not working for save and duplicate disabled button #3774 pr is working on other disable button
@parthjadhao01 my bad, I tested it on some other test case.
@yugalkaushik, I noticed in the discussion on issue #4121 that it seems @runningonsideprojects has already resolved this issue. I believe we can close this issue, as the fix from @runningonsideprojects on issue #4121 should address it.
Closing per discussion above