DWilliames / paddy-sketch-plugin

Automated padding, spacing and alignment for your Sketch layers
MIT License
2.17k stars 61 forks source link

Feature Request : Have symbol with padding applied resize when nested symbols are set to "none" #84

Open oddjones opened 6 years ago

oddjones commented 6 years ago

Feature request / enhancement

(Please detail the request; any mockup examples are also helpful) Feature Request : Have symbol with padding applied resize when nested symbols are set to "none"

I'm looking to mockup an adaptive field group (label, text field, info text and validation)

image

The field group is a symbol made up of the following grouped layers: {Group} {text} Label {Rectangle} (the field itself) {symbol} info text {symbol} Validation Text {Rectangle} fieldset [10 20]

image

Bug report

Expected behavior: group resizes when nested symbols are set to "none"

The info text and validation layers are optional -in most cases they won't be shown. In order to hide them I set their override value to "none".

image

What I would like to happen in this instance is for the field group to resize around the visible content (the Label and field) in the same way it does if I remove the nested symbols from the fieldset rectangle

image

Actual behavior:

(Please include a screenshot or screen recording if possible)

What actually happens is that the fieldset rectangle doesn't resize : image

The ideal behaviour I'd like to present is a whole form created from these elements where the height and relative positioning of the field groups is dependent upon the content presented: Like this

image

Steps to reproduce:

(Please attach a Sketch file if possible)

paddy-example.zip

I'm assuming here that what actually happens behind the scenes when a symbol's override is set to "none" is that it is simply not displayed (When you detach a symbol configured this way, then the nested symbols set to "none" appear hidden) - so I suppose the underlying feature I want is for Paddy to recognise "hidden" layers as triggers

DWilliames commented 6 years ago

Thanks @oddjones for the detailed feature request. I really appreciate it.

This is a great idea! Something I definitely want to do. Right now, there's a few things broken with handling Symbols; so I'll look into incorporating this when I reimplement how symbols work.

Cheers, Dave 👍