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

Enabling replace behavior and making insertion bit smarter #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hrescak
Copy link

@hrescak hrescak commented Jul 31, 2020

First of all, I find myself using this plugin all the time and we're heavy Feather users at @prisma so kudos for making this! This PR is addressing some common steps I need to take almost every time I use the plugin.

  • If I have an icon already selected, selecting an icon from the UI will replace it instead of placing a new one. This is useful when I accidentally select the wrong icon, or when I want to replace one that already exists.
  • If I have a layer selected, it will try to place it in a place in the hierarchy that has a high chance of being correct (as opposed to the page, which almost never is):
    • If my selected layer accepts children (like a group or a frame), place the icon inside.
    • if my selected layer doesn't accept children (like a rectangle, or an ellipse), place the icon next to it in the hierarchy.

If this is desirable, the next PR I'd like to propose is matching the stroke color of a placed icon if replacing. I also addressed the console errors.

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.

1 participant