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

Remove Edit Ability for Non-owned sketches

Open bmoren opened this issue 6 years ago • 13 comments

Nature of issue?

  • Existing feature enhancement

  • Web browser and version: FF 65.0.1 (64-bit)

  • Operating System: OSX 10.13.4

  • Steps to reproduce this bug: Open a sketch that is not owned by your account and attempt to add a file in the sketch menu

Feature enhancement details:

When looking at a sketch that is not your own (under you logged in account) you cannot add a file / folder. This is expected behavior, but I feel that there should be some feedback there to let you know that you're attempting to work on a sketch that is not your own. Especially because you can edit the code and have it run even if it's not technically 'your' sketch yet.

Either blocking out those menu items or giving a dialogue that they need to duplicate the sketch first might be options?

bmoren avatar Mar 06 '19 03:03 bmoren

i agree that it is not clear when you are looking at a sketch that is yours vs one that is not. i'm open to discussion and ideas about how to make this clearer!

catarak avatar Mar 06 '19 15:03 catarak

There can be 2 courses of action according to me, 1. The option should be blurred out and on hovering on the disabled button, there should be a Tooltip (in language of Material Design) displaying that the user should clone the sketch first. 2. On the other hand, one can display the Modal on clicking the Add File/Add Folder menu that the person should clone the sketch first. Both have relative drawbacks over the other. Using method 1, the person has to hover over a disabled option to reveal the Tooltip, which is not intuitive, while using method 2. there are more screens a user has to click through (which may not matter in this case, as the user gains knowledge about the possible course of action immediately after opening the modal). Method 1 can be optionally extended by displaying a ? over the disabled menu option to let the user know to hover on it, (to display the reason for it being disabled), but the design would become cluttered, especially in the sidebar component.

LakshSingla avatar Mar 06 '19 17:03 LakshSingla

Since there are no tool tips anywhere in the menu as it exists, it seems like a better solution would be to use an alert / modal for notification. It feels more immediate and would require very limited scope to implement.

as a third option, we could simply disable menu items based on the relationship of the sketch to the owner. eg. if you don't own the sketch, don't show the add file/folder.

yet another option (I present this with healthy skepticism) is to add a duplicate button to the front of the UI if you are looking at a sketch you dont own.

screen shot 2019-03-06 at 11 22 09 am

bmoren avatar Mar 06 '19 17:03 bmoren

@bmoren According to me adding Duplicate Sketch button in the front of UI would not convey the fact that one needs to duplicate it in order to add files or folders(and would give a more general Fork me on GitHub sense of feeling). If we can find someplace to add the advantages of Duplicating the sketch, it would be much better. Also I agree with your idea of dropping the tooltips altogether because it doesn't go with the present design framework of the editor. Thus modal seems to be a viable option albeit it's disadvantage (interrupted UX flow for something which is not urgent)

LakshSingla avatar Mar 07 '19 20:03 LakshSingla

as a point of reference, this is handled on CodePen projects by making everything read-only, and communicating that with toasts: Screen Shot 2019-12-12 at 3 55 00 PM

catarak avatar Dec 12 '19 20:12 catarak

I'd love to see this implemented (I might have time to work on it during next semester). During this semester, I've again had students get stuck here frustrated they couldn't upload files only to realize that they'd not duplicated the sketch yet. So I still feel like its something that would improve the overall experience!

bmoren avatar Dec 14 '19 19:12 bmoren

I'm going through old issues, closing out stale ones, etc. Looking back at this issue, I was curious to know how Glitch handles this, and they simply make it so you can't edit other projects unless you "Remix" it. If you try to, this little toast appears: Screen Shot 2021-02-10 at 1 14 13 PM

I think this is the way to approach this issue!

catarak avatar Feb 10 '21 18:02 catarak

Hey, @catarak!! I'd like to work on this issue.

satyasaibhushan avatar Feb 11 '21 19:02 satyasaibhushan

Hello! I am a new comer to open source and trying to do my first pull request. So I need a little help. Is there a way to know current users id also including the case when user is not logged in?

Neel278 avatar Feb 17 '21 14:02 Neel278

Oh! actually I checked your github folk to but didn't found anything but now in some days I will get it. By the best of luck for your pull request. Hope community founds it useful.

Neel278 avatar Feb 18 '21 04:02 Neel278

Hey @catarak, I've done this like 10 days ago and am waiting for your reply! So I'm posting a video of the work I've done

https://user-images.githubusercontent.com/40578313/109137551-55dc8780-777f-11eb-95a2-66d698a23d61.mov

I thought using the toast functionality which we use in many other cases is the way to go. Share your thoughts!!

satyasaibhushan avatar Feb 25 '21 10:02 satyasaibhushan

Hey @catarak, please look into this

satyasaibhushan avatar Mar 13 '21 17:03 satyasaibhushan

First time contributing to open source. Is this issue unresolved? if it is I would like to work on it

paulin-alcoser avatar Jun 09 '23 20:06 paulin-alcoser