workshop.codes icon indicating copy to clipboard operation
workshop.codes copied to clipboard

feat(editor): fetch current not-owned projects, add project forking

Open netux opened this issue 10 months ago • 6 comments

When viewing other people's projects, show a "Fork" button in place of the "Edit" button that would be present for owned projects.

fork button next to an open project dropdown

Also, ensure we have the name of the current project, even if not owned, by detecting when $currentProjectUUID is not present in $projects, then fetching and storing it.

netux avatar Mar 13 '25 11:03 netux

Perhaps the button could be kept to the same notice telling you the project is not yours? Something like this maybe: image

:+1: While we are at it, can we decrease the contrast on this little banner/pill thingy? Bright orange and white don't really go along well.

netux avatar Mar 15 '25 01:03 netux

@netux Sure!

Mitcheljager avatar Mar 15 '25 01:03 Mitcheljager

@Mitcheljager what do you think of like this "Clone and Save" button in place of the "Fork" button?

editor on someone else's user, showcasing a new "Clone and Save" button where the "Save" button would be

I like this more even because it triggers on the Ctrl + S keybind as well (I'm reusing the <Save> component), which matches what I've seen other online text editors do when you try to save on a file that's not yours.

netux avatar Mar 15 '25 02:03 netux

@netux I think that works!

Mitcheljager avatar Mar 15 '25 02:03 Mitcheljager

@Mitcheljager any opinions on the $ownProjects store deriving from $projects?

netux avatar Mar 15 '25 14:03 netux

@netux I don't think it's a good idea to ever put any projects in there that are not your own. Ideally no store is needed for a project that is someone else's.

Mitcheljager avatar Mar 15 '25 15:03 Mitcheljager