Open vivekbopaliya opened 7 months ago
I'm not sure about this feature because we have it tagged as a high priority and something that we definitely want to do but I personally don't really like it 🤷♀️. I think it's nice to be able to edit a line or two in someone's code and see the changes without having to clone the whole thing. @raclim what are your thoughts?
There's a lot of cleanup before this could be considered for merging. But before you work on any of that, let's hear from @raclim about how we want this to function.
Sure, i'll be on it right after we hear from @raclim, thank you for all the above quality inputs though. (always appreciate them haha). Moreover, "I think it's nice to be able to edit a line or two in someone's code and see the changes without having to clone the whole thing."
i think one of the primary reason that we are implementing this feature is to help users distinguish between their and others sketches as it is easy to get confused here. let's see how we are tackling this one!
I'm not sure about this feature because we have it tagged as a high priority and something that we definitely want to do but I personally don't really like it 🤷♀️. I think it's nice to be able to edit a line or two in someone's code and see the changes without having to clone the whole thing. @raclim what are your thoughts?
i think one of the primary reason that we are implementing this feature is to help users https://github.com/processing/p5.js-web-editor/issues/870#issuecomment-470161562between their and others sketches as it is easy to get confused here. let's see how we are tackling this one!
Now that I'm looking at this I'm honestly not too sure!
I don't think I've personally had issues with the current setup, but can see how it can be hard to distinguish whether the sketch is yours or not. I'm down to implement something that signals to a user that they're working on a sketch that isn't their's more prominently, but I think I also feel hesitant about removing the edit ability altogether.
This is straying from the original issue and is just an idea, but I think one way "removing the edit ability" could be implemented as well might be to add "Set as Read Only" or "Set as Un-copyable" options for an individual sketch, so a user can choose if they don't want their sketches to be interacted with.
I'm not sure about this feature because we have it tagged as a high priority and something that we definitely want to do but I personally don't really like it 🤷♀️. I think it's nice to be able to edit a line or two in someone's code and see the changes without having to clone the whole thing. @raclim what are your thoughts?
i think one of the primary reason that we are implementing this feature is to help users #870 (comment) their and others sketches as it is easy to get confused here. let's see how we are tackling this one!
Now that I'm looking at this I'm honestly not too sure!
I don't think I've personally had issues with the current setup, but can see how it can be hard to distinguish whether the sketch is yours or not. I'm down to implement something that signals to a user that they're working on a sketch that isn't their's more prominently, but I think I also feel hesitant about removing the edit ability altogether.
This is straying from the original issue and is just an idea, but I think one way "removing the edit ability" could be implemented as well might be to add "Set as Read Only" or "Set as Un-copyable" options for an individual sketch, so a user can choose if they don't want their sketches to be interacted with.
"I'm down to implement something that signals to a user that they're working on a sketch that isn't their's more prominently"
i think this can be tackled with simple "You're working on someone's sketch" the first time the user edits a sketch.
might be to add "Set as Read Only" or "Set as Un-copyable" options for an individual sketch
However, this doesn't completely solve the issue, as there will be even more scenarios for users to get confused about if we don't acknowledge them that they are trying to edit a non-owned, read-only sketch.
I believe these are two different features, so there must be two different approaches for each individually:
This is straying from the original issue and is just an idea, but I think one way "removing the edit ability" could be implemented as well might be to add "Set as Read Only" or "Set as Un-copyable" options for an individual sketch, so a user can choose if they don't want their sketches to be interacted with.
the idea similar to this has already been discussed here. This can address both issues: hiding the open API keys as well as removing the ability to edit sketches if they are private or set to read-only. A week ago, I wasn't in favor of letting users keep their sketches as read-only because it seemed to lead to even more confusion and lots of work that might not be worth it?! However, now it appears to be more user-friendly than simply taking away the authority to edit every sketch haha. I am down to close this pull request and create a new one!
@raclim @catarak let me know how you want this to function.
Sorry about that, I definitely was proposing two different features! 😅
- End the confusion between owned and non-owned sketches (show a toast on edit or something).
I think I'm personally leaning towards implementing this one regardless because for me, it feels like the simplest way to address the issue of a user having difficulty distinguishing whether a sketch is theirs or not. Down to rethink some of this though if this doesn't feel like enough!
- Letting users make their sketch read-only (this time we actually remove the ability to edit and duplicate non-owned sketches).
I did stray from the original issue here—I proposed this as a way to implement this feature (removing the edit ability) in a way that might feel like a choice for the user if still we did want to integrate this into the editor.
the idea similar to this has already been discussed https://github.com/processing/p5.js-web-editor/issues/1094#issuecomment-499638522. This can address both issues: hiding the open API keys as well as removing the ability to edit sketches if they are private or set to read-only.
I've actually been hoping to implement the privating sketches feature in the near future!
@vivekbopaliya These are all my thoughts, but I'm also wondering what makes sense to you here as well!
Sorry about that, I definitely was proposing two different features! 😅
- End the confusion between owned and non-owned sketches (show a toast on edit or something).
I think I'm personally leaning towards implementing this one regardless because for me, it feels like the simplest way to address the issue of a user having difficulty distinguishing whether a sketch is theirs or not. Down to rethink some of this though if this doesn't feel like enough!
- Letting users make their sketch read-only (this time we actually remove the ability to edit and duplicate non-owned sketches).
I did stray from the original issue here—I proposed this as a way to implement this feature (removing the edit ability) in a way that might feel like a choice for the user if still we did want to integrate this into the editor.
the idea similar to this has already been discussed #1094 (comment). This can address both issues: hiding the open API keys as well as removing the ability to edit sketches if they are private or set to read-only.
I've actually been hoping to implement the privating sketches feature in the near future!
@vivekbopaliya These are all my thoughts, but I'm also wondering what makes sense to you here as well!
yes right! imo there are two ways to approach first proposal, which of one is similar to codepen's apporach.
In the current behavior, users can freely experiment with unowned sketches without duplication. The alternative way to duplicate a sketch is to simply save it (Ctrl + S), and it will be duplicated.
what we can do here is, for unowned sketches, we can display a small label (kinda similar to the above PR one) but without 'to edit,' simply saying Duplicate Sketch
or Clone Original Sketch
This way, without restricting editing ability, we can caution the user that they are working on someone else's sketch. A label with a background color always attracts eyes' attention.
this was for the first proposal only. once we resolve this, afterwards we can move on to the private sketch feature and discuss how we will want it to function.
Fixes #870
Changes:
https://github.com/processing/p5.js-web-editor/assets/122638553/e2a4d7b3-512f-45e7-84da-e9d1bd452866
Mobile view:
I was planning to introduce a 'Remix' function as it was talked about here then I realized that there's already a feature similar to 'Clone' (duplicate sketch) regardless you can still edit sketches that aren't yours (you can't add files/folders, though). To make it easier for users that help them distinguish between owned and non-owned sketches, we could make it necessary to duplicate sketches before making changes if they don't own them.
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123