webcomponents.dev icon indicating copy to clipboard operation
webcomponents.dev copied to clipboard

Duplicating a project duplicated an older version

Open adixon-adobe opened this issue 2 years ago • 3 comments

📖 Reproduction steps

  1. Go to https://studio.webcomponents.dev/edit/EYQn9T6wOnieZbv4xnPj?branch=multi-group%40wfVpXdsTYhf9mY2slxW4t2Y2SjC3&p=README.md
  2. Duplicate the project

🙁 Current Behavior

Duplicating a project doesn't duplicate the latest edits. The contents of index.ts are before Westbrook's latest edits when I duplicate that link

🙂 Expected Behavior

It duplicates the code I'm looking at

🔗 Link to the component

https://studio.webcomponents.dev/edit/EYQn9T6wOnieZbv4xnPj?branch=multi-group%40wfVpXdsTYhf9mY2slxW4t2Y2SjC3&p=README.md

🌐 What browser(s) are you seeing the problem on?

Chrome

Browser version(s)

109

adixon-adobe avatar Feb 07 '23 23:02 adixon-adobe

Hi there :)

I believe the Duplicate feature currently copies the project's main/master branch, not the one you're currently viewing Could it be the reason why it didn't behave as expected for you?

Cheers Rémy

muryoh avatar Feb 08 '23 09:02 muryoh

That seems likely, but I didn't even know I was viewing a branch -- I was just testing a code link that got sent to me, and wanted to test a tweak to it. In this case I'd reported a bug to Spectrum Web Components and one of the library maintainers sent this to me to test out.

So I'd say at the very least it would make sense to have a prompt if you click Duplicate while viewing a different branch that gives you a choice of which branch to duplicate. If you're coming in as an unfamiliar user you don't even necessarily realize that there are branches and projects like this. I would have assumed it worked more like CodePen/JSFiddle.

Hopefully that helps with where I'm coming from.

adixon-adobe avatar Feb 08 '23 19:02 adixon-adobe

Yep it does, and it makes a lot of sense - just wanted to make sure that was what happened there :+1: We'll try and fix that!

muryoh avatar Feb 10 '23 14:02 muryoh