sketch-dynamic-symbol-button icon indicating copy to clipboard operation
sketch-dynamic-symbol-button copied to clipboard

Support child symbol for the text

Open swizenfeld opened this issue 7 years ago • 25 comments

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

swizenfeld avatar Mar 01 '17 22:03 swizenfeld

Hey @swizenfeld,

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

Cheers, Kris

herrkris avatar Mar 02 '17 06:03 herrkris

Awesome thanks kris, I also run into a bug where button doesn't resize down in width if no text is added to the symbol. So if I overwrite the text to be longer it resizes but if I delete it and leave it back at default it doesn't work anymore.

Finally it would be good if you could group the icon and the text and give that the padding so it's always the same distance apart. Great job and looking forward to updates

On Wed, Mar 1, 2017 at 10:32 PM Kristof Dreier [email protected] wrote:

Hey @swizenfeld https://github.com/swizenfeld,

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

Cheers, Kris

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-283568939, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWDJy9_5xAgnUAHlVM1hlc63zzRJuks5rhmJ-gaJpZM4MQRz_ .

swizenfeld avatar Mar 02 '17 06:03 swizenfeld

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

herrkris avatar Mar 03 '17 20:03 herrkris

Yeah i will check it out in a bit, finishing some work.

You mind giving me quick steps since you are saying not to add the padding to the text.

On Fri, Mar 3, 2017 at 12:25 PM Kristof Dreier [email protected] wrote:

Hey @swizenfeld https://github.com/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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284061332, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWFzjtNtIal0RE5mul3ZT9CYhRLeDks5riHc-gaJpZM4MQRz_ .

swizenfeld avatar Mar 03 '17 20:03 swizenfeld

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

herrkris avatar Mar 03 '17 20:03 herrkris

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! :)

herrkris avatar Mar 03 '17 20:03 herrkris

Works great! Thank you

justinspencer avatar Mar 03 '17 23:03 justinspencer

Works a lot better just need to be able to set different colors to the text check out the screenshot. i will keep playing with it see if there is any issues i come across.

Also how do I update the padding once i create the symbol?

[image: Inline image 1]

On Fri, Mar 3, 2017 at 2:48 PM, Justin [email protected] wrote:

Works great! Positioning the text layer to establish the padding is way more intuitive. It would be good if the Label in the Overrides panel said "Text". When I'm creating instances of the symbol and adding overrides the "Button" label seems odd. See attached. [image: screen shot 2017-03-04 at 9 38 23 am] https://cloud.githubusercontent.com/assets/936597/23571840/839269fa-00bf-11e7-81fb-793b665da456.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284091910, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWCxVbTnzEHhKfAryJhrADEWwOWO0ks5riJihgaJpZM4MQRz_ .

swizenfeld avatar Mar 03 '17 23:03 swizenfeld

ok big problem, when i change the text style so lets say white and different font and resize it and then hit control+command+J the text styles revert to the default black Helvetica.

is there something wrong i am doing?

On Fri, Mar 3, 2017 at 3:24 PM, Justin [email protected] wrote:

Works great! Thank you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284098613, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWG-azDz24E4KqAx7KhwEKjWWl4s0ks5riKEkgaJpZM4MQRz_ .

swizenfeld avatar Mar 03 '17 23:03 swizenfeld

Ok so this issue happens when i delete all of the text in the overwrite symbol and hit the resize shortcut. if i keep any other text then it is fine.

On Fri, Mar 3, 2017 at 3:33 PM, sergio wizenfeld [email protected] wrote:

ok big problem, when i change the text style so lets say white and different font and resize it and then hit control+command+J the text styles revert to the default black Helvetica.

is there something wrong i am doing?

On Fri, Mar 3, 2017 at 3:24 PM, Justin [email protected] wrote:

Works great! Thank you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284098613, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWG-azDz24E4KqAx7KhwEKjWWl4s0ks5riKEkgaJpZM4MQRz_ .

swizenfeld avatar Mar 03 '17 23:03 swizenfeld

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

herrkris avatar Mar 04 '17 08:03 herrkris

I would be happy to do a screen share with you tomorrow and show you.

On Sat, Mar 4, 2017 at 12:32 AM Kristof Dreier [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284137159, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWBjykPkkC0DtJA27GuXZFrQiag0Dks5riSG6gaJpZM4MQRz_ .

swizenfeld avatar Mar 04 '17 08:03 swizenfeld

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!

herrkris avatar Mar 04 '17 09:03 herrkris

Nice! Thanks for the heads up. How long do you think the child symbol will take you would love to come back to work on Monday and have that to play with :)

On Sat, Mar 4, 2017 at 1:26 AM Kristof Dreier [email protected] wrote:

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!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284139723, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWCRKXGPriiuf1WchlG5obJxN0YQCks5riS5XgaJpZM4MQRz_ .

swizenfeld avatar Mar 04 '17 09:03 swizenfeld

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

herrkris avatar Mar 04 '17 09:03 herrkris

@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?

herrkris avatar Mar 04 '17 09:03 herrkris

Damn i just saw this I'm not home right now and don't have a computer with me. But I will try to get it to you tomorrow.

On Sat, Mar 4, 2017 at 1:35 AM Kristof Dreier [email protected] wrote:

@swizenfeld https://github.com/swizenfeld Is there any chance you could provide me with a small example of child symbols? Perhaps a small Sketch file on how you would construct your symbol?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284140209, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWHdCux3keuZaWJZE_1Dg8MaxbslMks5riTBygaJpZM4MQRz_ .

swizenfeld avatar Mar 05 '17 00:03 swizenfeld

do you still need a demo file?

On Sat, Mar 4, 2017 4:45 PM, sergio wizenfeld [email protected] wrote: Damn i just saw this I'm not home right now and don't have a computer with me. But I will try to get it to you tomorrow.

On Sat, Mar 4, 2017 at 1:35 AM Kristof Dreier [email protected] wrote: @swizenfeld Is there any chance you could provide me with a small example of child symbols? Perhaps a small Sketch file on how you would construct your symbol?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

swizenfeld avatar Mar 06 '17 05:03 swizenfeld

That would be really helpful! :)

Am 6. März 2017 um 06:01:01, swizenfeld ([email protected]) schrieb:

do you still need a demo file?

On Sat, Mar 4, 2017 4:45 PM, sergio wizenfeld [email protected] wrote: Damn i just saw this I'm not home right now and don't have a computer with me. But I will try to get it to you tomorrow.

On Sat, Mar 4, 2017 at 1:35 AM Kristof Dreier [email protected] wrote: @swizenfeld Is there any chance you could provide me with a small example of child symbols? Perhaps a small Sketch file on how you would construct your symbol?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284303447, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAka9TvAPq8srOxdESdOSdvEzhiL9Umks5ri5MNgaJpZM4MQRz_ .

herrkris avatar Mar 06 '17 06:03 herrkris

attached let me know if you can open it,

On Sun, Mar 5, 2017 10:38 PM, Kristof Dreier [email protected] wrote: That would be really helpful! :)

Am 6. März 2017 um 06:01:01, swizenfeld ([email protected]) schrieb:

do you still need a demo file?

On Sat, Mar 4, 2017 4:45 PM, sergio wizenfeld [email protected] wrote: Damn i just saw this I'm not home right now and don't have a computer with me. But I will try to get it to you tomorrow.

On Sat, Mar 4, 2017 at 1:35 AM Kristof Dreier [email protected] wrote: @swizenfeld Is there any chance you could provide me with a small example of child symbols? Perhaps a small Sketch file on how you would construct your symbol?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub

https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284303447,

or mute the thread

https://github.com/notifications/unsubscribe-auth/AAAka9TvAPq8srOxdESdOSdvEzhiL9Umks5ri5MNgaJpZM4MQRz_

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

swizenfeld avatar Mar 06 '17 06:03 swizenfeld

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

herrkris avatar Mar 06 '17 08:03 herrkris

sent let me know if you got it

On Mon, Mar 6, 2017 12:27 AM, Kristof Dreier [email protected] wrote: Hm, do you mind sending it via email? :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

swizenfeld avatar Mar 06 '17 08:03 swizenfeld

Perfects, thanks!

herrkris avatar Mar 06 '17 08:03 herrkris

The icon being in the same group as the text would be nice to be able to specify them to be centered instead of the icon being pin to the corner.

On Mon, Mar 6, 2017 at 12:32 AM Kristof Dreier [email protected] wrote:

Perfects, thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/herrkris/sketch-dynamic-symbol-button/issues/2#issuecomment-284332536, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbjWH1LwIv7O3uZgOiGBQ3RJTeDKOEjks5ri8SagaJpZM4MQRz_ .

swizenfeld avatar Mar 06 '17 08:03 swizenfeld

Hey there any more advancement into the child symbols?

swizenfeld avatar Mar 25 '17 03:03 swizenfeld