Duplicating a project duplicated an older version
📖 Reproduction steps
- Go to https://studio.webcomponents.dev/edit/EYQn9T6wOnieZbv4xnPj?branch=multi-group%40wfVpXdsTYhf9mY2slxW4t2Y2SjC3&p=README.md
- 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
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
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.
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!