Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #355: Add component duplication support #359

Merged
merged 3 commits into from Apr 2, 2019

Conversation

vldmrkl
Copy link
Contributor

@vldmrkl vldmrkl commented Mar 29, 2019

This PR contains a fix for #355.

It adds a new item "Duplicate as..." to the context menu. If the user selects this option, the app will prompt the user to type a name for this component and select location for it. Once the user saves the file, it's going to be opened in the Component Editor.

Implementation:

  1. Check the extension of the selected file.
  2. Add menu item "Duplicate As..."
  3. onClick it shows save dialog.
  4. Try to copy the item to the new path.
  5. If successful, open a newly created file. Otherwise, it will show an alert with message "Couldn't copy component to..."

Copy link
Member

@dabbott dabbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I tried it out and it works well. I had a bunch of feedback on small things, but overall looks good.

studio/LonaStudio/Workspace/FileNavigator.swift Outdated Show resolved Hide resolved
studio/LonaStudio/Workspace/FileNavigator.swift Outdated Show resolved Hide resolved
studio/LonaStudio/Workspace/FileNavigator.swift Outdated Show resolved Hide resolved
@dabbott dabbott merged commit afc0467 into Lona:master Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants