DWilliames / paddy-sketch-plugin

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

[enhancement] Auto-fill padding from selection #24

Closed sldx closed 6 years ago

sldx commented 6 years ago

As the title says, it would be pretty nice to not have to measure and enter paddings manually, and instead they should be taken from the current selection. Then you wouldn't necessarily have to show the popup either

DWilliames commented 6 years ago

That would be a great idea! 👍

I think I'd still show the pop-up, just in case you do want to tweak them first. But if you don't need to tweak it; you'd just simply tap 'Control + Alt + p' then 'Enter'. :)

sldx commented 6 years ago

It works, sure, but best practice is to minimize user interactions, especially if we can guess the correct values, and they can be tweaked later. This being the main purpose of this enhancement IMO.

Think of how you don't get confirmations for deleting emails and lots of other actions.

The second reason being the fact that without "inheritance", setting padding manually has the side-effect of changing the height of the elements too, when most of the time you want to change just the width. And sometimes the other way around, but changing both is rarely wanted.

Anyway, just my 2c :)

vic-tian commented 6 years ago

This is the default behavior of Modulizer (https://github.com/Falkeyn/Modulizer) - when you select an element and it is within a group, the plugin will populate the input with the detected padding values.

DWilliames commented 6 years ago

@sldx and @vic-topcoder – I have just released version 1.0.3 that should make this work. I've make it a separate option in the Paddy menu – and to my surprise, there doesn't seem to be any keyboard shortcut that uses Command + p within Sketch; so now Command + p will set padding, with the implied amount. This leaves the current functionality in tact; for others who are used to entering values each time. But for power users; it is now even easier.

I'll close this issue for now. If you find the issue still persists, then please re-open it. 👍