p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Bug: Disabled File Options Lack Guidance When Sketch is Unsaved

Open yugalkaushik opened this issue 8 months ago • 7 comments

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.

Image

Expected Behavior

  1. Disabled options should display a tooltip on hover
  2. Tooltip should clearly state the reason, e.g., “Save the sketch before duplicating or adding to a collection”

Steps to reproduce

  1. Open the p5.js Web Editor
  2. Create a new sketch
  3. Do not save the sketch
  4. Open the File dropdown
  5. Observe that options like “Duplicate” and “Add to Collection” are disabled

I wish to work on fixing on this issue.

yugalkaushik avatar Mar 17 '26 18:03 yugalkaushik

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 avatar Mar 22 '26 10:03 saurabh24thakur

@saurabh24thakur Thanks for your interest in this—just assigned this to you if you're still down to take this up!

raclim avatar Apr 10 '26 00:04 raclim

hey @raclim, just checking in on this one, if it is still open, i would love to take this on and open a pr !

Nixxx19 avatar Apr 20 '26 17:04 Nixxx19

@yugalkaushik tooltip is not working for save and duplicate disabled button #3774 pr is working on other disable button

parthjadhao01 avatar May 31 '26 18:05 parthjadhao01

@parthjadhao01 my bad, I tested it on some other test case.

yugalkaushik avatar May 31 '26 20:05 yugalkaushik

@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.

parthjadhao01 avatar Jun 01 '26 05:06 parthjadhao01

Closing per discussion above

clairep94 avatar Oct 31 '26 11:10 clairep94