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

Support child symbol for the text #2

Open
swizenfeld opened this issue Mar 1, 2017 · 25 comments
Open

Support child symbol for the text #2

swizenfeld opened this issue Mar 1, 2017 · 25 comments
Milestone

Comments

@swizenfeld
Copy link

Hello, Everything works like a charm but it would be awesome if you can add support for the text to be a symbol and then use overrides or child symbols to change the color.

This is all it needs to be able to be a 1 stop shop for buttons

@herrkris
Copy link
Owner

herrkris commented Mar 2, 2017

Hey @swizenfeld,

sounds like a great idea. I'll take a look at it! :)

Cheers,
Kris

@swizenfeld
Copy link
Author

swizenfeld commented Mar 2, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 3, 2017

Hey @swizenfeld,

do you mind taking a look at the latest release whether it fixes your bug? Since it's a breaking change (you no longer have to provide the paddings with the text layer name) you can download it here: https://github.com/herrkris/sketch-dynamic-symbol-button/archive/v2.0.0-beta.1.zip

I'm currently working on getting child symbols working. Not as easy as I anticipated but it might be available in the next beta. :D

Cheers,
Kris

@swizenfeld
Copy link
Author

swizenfeld commented Mar 3, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 3, 2017

Ah, and icons should work with this release out of the box without adding an extra group layer.

@herrkris
Copy link
Owner

herrkris commented Mar 3, 2017

Yeah sure:

  1. Plugins > Dynamic Symbol Button > Create Symbol
  2. Enter values
  3. Change override text
  4. Cmd + Alt + J or Plugins > Dynamic Symbol Button > Resize Symbol

If you want to change the buttons appearance e.g. change the padding you no longer need to change the text layers name inside the symbol, but instead you position the text inside the symbol to your liking. If you should change the background's width you need to update the symbols masters dimensions. For that select the symbol in the Symbols View und select Resize to Fit.

If you want to add an icon make sure it's resizing property is set to "Pin to corner" or else it will look strange.

Hope that helps, else feel free to ask! :)

@justinspencer
Copy link

Works great! Thank you

@swizenfeld
Copy link
Author

swizenfeld commented Mar 3, 2017 via email

@swizenfeld
Copy link
Author

swizenfeld commented Mar 3, 2017 via email

@swizenfeld
Copy link
Author

swizenfeld commented Mar 3, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 4, 2017

Hm, strange. I can reproduce the problem and will take a look at it!

@swizenfeld
Copy link
Author

swizenfeld commented Mar 4, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 4, 2017

So it seems to be a bug with Sketch itself and I just reported the bug. For the time being I would recommend not to set the override to an empty value if executing the resize symbol command.

As soon as the bug is fixed with Sketch I'll let you know!

@swizenfeld
Copy link
Author

swizenfeld commented Mar 4, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 4, 2017

I don't want to make any promises but it's looking good but I might finish a first version tomorrow.

@herrkris
Copy link
Owner

herrkris commented Mar 4, 2017

@swizenfeld Is there any chance you could provide me with a small example for child symbols? Perhaps a small Sketch file on how you would construct your symbol?

@swizenfeld
Copy link
Author

swizenfeld commented Mar 5, 2017 via email

@swizenfeld
Copy link
Author

swizenfeld commented Mar 6, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 6, 2017 via email

@swizenfeld
Copy link
Author

swizenfeld commented Mar 6, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 6, 2017

Hm, do you mind sending it via email? :)

@swizenfeld
Copy link
Author

swizenfeld commented Mar 6, 2017 via email

@herrkris
Copy link
Owner

herrkris commented Mar 6, 2017

Perfects, thanks!

@swizenfeld
Copy link
Author

swizenfeld commented Mar 6, 2017 via email

@swizenfeld
Copy link
Author

swizenfeld commented Mar 25, 2017 via email

@herrkris herrkris added this to the v2.0.0 milestone May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants