Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Lona Studio] Add easy component duplication #355
When creating a new component, it's common to duplicate an exist component as a starting point. There's an option for this in the app menu under
Let's add a new
It pretty much works as it's supposed to work. The only small thing the needs to be implemented is:
At the moment, the app opens the duplicated component in the Component Editor after creating it, but the file selection in the file navigator is outdated. How can I update the selected file in the file navigator? I researched the codebase in order to find something similar, but I don't have much success so far. @dabbott
This looks great! You're right that it would be better if the newly created file were selected, but I think we can merge this as-is and make a separate issue for that after. There are already a bunch of other cases where new files should be selected but aren't.
The file navigator is a separate repo, https://github.com/dabbott/FileTree, and I haven't implemented updating the selection yet. I think that could be an interesting issue for you to try, but I'm not quite sure how it should work yet. I'll take a look this weekend. If it turns out to be super simple I'll just publish a new version that supports selection, otherwise I'll make a follow-up issue.