pberrecloth / butter-sketch-plugin

Butter | Sketch Plugin - Butt layers together
Other
225 stars 11 forks source link

Nudging - Enhancement proposal #3

Open RaphyRaph opened 8 years ago

RaphyRaph commented 8 years ago

it would be more useful to have a plugin that behaves like so:

if you have 4 plugins, one that increments up and one that increments down vertically and horizontally, and a way to set the increment yourself, you can have a very flexible and fast way to set spacings

aaronmw commented 8 years ago

I agree. Increment / decrement spacing would be handy. As it stands, this plugin is already very similar to "Arrange > Make Grid..." and setting the spacings to 0

pberrecloth commented 7 years ago

So... a plugin that behaves a little like NudgeIt, but for spacing between elements?

aaronmw commented 7 years ago

Yeah, exactly; select some stuff, then increment / decrement the space between objects either horizontally or vertically. That'd be kind of life-changing, I think.

RaphyRaph commented 7 years ago

YAS! +1 w00p w00p

pberrecloth commented 7 years ago

Nice. I like this idea. Will have a think about doing this over the next few weeks.

jordaniusrex commented 7 years ago

If the increments are just multiples, wouldn't this behavior just replicate custom nudge values?

When I'm working on a design, I'll often have a set of commonly used spacing values (e.g. 0, 8, 16, 32, 48, 64, 96, and 128) that relate to the baseline grid. I use Butter to quickly space objects according to a specific value.

Being able to increment/decrement through only that set of spacings instead of needing to type in a value explicitly would be amazing.

pberrecloth commented 7 years ago

I agree - this is how I work too. We will look at putting this option in the next version. @jordaniusrex

ShaneNZ commented 7 years ago

Explicit values rather than multiples is needed, I think - @jordaniusrex nailed it. Be nice to notify what spacing has been applied too, maybe non-modal in a similar way that MacOS notifies you with the volume controls but centered on Sketch?

ShaneNZ commented 7 years ago

And while I'm wishing for stretch goal ponies, doing an approximate match on current spacing to the defined intervals would be awesome. So if I've roughly spaced out my objects to be 32px apart, it would "snap" them to 32px. I'm thinking calculating the average of the current spacing between all selected objects, match that to the closest defined interval and set to that.

Thinking about it, that would make "adding" a new object to a stack of equally spaced objects really fast; the fully consistent average of all the other objects would effectively force the spacing onto the new object, if that makes sense.

pberrecloth commented 7 years ago

Thanks @ShaneNZ for your comments. I agree that matching spacing based on a typographic scale could be nifty. I think that might even be a new plugin idea... Perhaps we need to think about how splitting "Butter" and "Spacer" out into separate projects. Thoughts?

RaphyRaph commented 7 years ago

It's the opposite of separating them: the idea is to have one plugin that seamlessly transitions between 0px butting and spacing.

ShaneNZ commented 7 years ago

I agree; I see spacing and butting as part of the same thing - I use them interchangeably depending on the design assets/context. Using multiples of 4/8/whatever, or having a list of intervals is equivalent to spacing with a manual value as currently implemented; it's just way more convenient than always typing the same 3 or 4 values in each time you want to space objects.

On 10 September 2017 at 02:01, Raphael Guilleminot <notifications@github.com

wrote:

It's the opposite of separating them: the idea is to have one plugin that seamlessly transitions between 0px butting and spacing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pberrecloth/butter-sketch-plugin/issues/3#issuecomment-328279112, or mute the thread https://github.com/notifications/unsubscribe-auth/ACaFVvKRoqF3cZlexF6vssOQZEO8T4ZRks5sgpo-gaJpZM4K96F2 .

DWilliames commented 7 years ago

Great insights everyone.

@jordaniusrex @RaphyRaph @aaronmw I'd love to understand how you'd all imagine the best implementation for custom increments would work for you?

Would you expect to be able to increment/decrement via keyboard shortcuts, a persistent interface, or by selecting the plugin from the menu bar?

And assuming we made it easy to increment/decrement spacing between objects — would you only need it to happen horizontally/vertically; or specifically from the top/bottom/left/right?

RaphyRaph commented 7 years ago

Ok I created a quick prototype to explain this properly. I hope it makes sense. I added the commands as buttons on the canvas for illustration purposes only. They would most likely be accessed by keyboard shortcuts. @DWilliames @pberrecloth .

https://www.dropbox.com/s/o21jukqmtnl1ddg/butter%20increment.mov?dl=0

DWilliames commented 7 years ago

Awesome @RaphyRaph. Love it! Am currently looking into to do something similar to this. Just curious — so for changing spacing horizontally, would you expect it to stay fixed from the left, and vertically from the top? Would you want the ability to make it fixed from the right/bottom when spacing horizontally/vertically?

RaphyRaph commented 7 years ago

For right to left languages like Hebrew and Arabic, it's probably useful. -Edit, closed the issue by mistake-

ShaneNZ commented 7 years ago

That prototype is mouth wateringly good :) Some ideas for the plugin menu and overall flow/interaction ideas:

group 2

The Increase/Decrease commands would apply the interval steps as set below. At least initially maybe the interval spacing is always done from the top left corner?

"Set Interval..." sets the interval(s) to use. Simple mockups - the dialog would probably need a bit of help text or something - but I see it as something like this...

group Entering a single value would make the interval commands operate as @RaphyRaph originally suggested.

group Entering a comma delimited list would setup the intervals as listed for cycling through, as @jordaniusrex originally suggested. If the selected items are at the max spacing, then I would expect the plugin to not increment the spacing any further.

ShaneNZ commented 7 years ago

OK, writing the previous post has given me another interaction idea that would avoid needing 16 menu items to handle from top/from left/from right/from bottom: apply the spacing with two interactions. Flow would be:

  1. Select a bunch of objects
  2. Selecting "Interval Up" would not move any objects, but set the "vertical anchor object" (the vertically highest one in this example)
  3. a) Selecting "Interval Up" again would butt the objects.
  4. b) Selecting "Interval Down" would apply the "next" interval. In the list in the settings box above, if they're already at 32px then it would space them 48px apart down from the top object. If I had selected "Interval Up" twice, then "Interval Down" I'd end up with the objects spaced 1px apart.

Without changing the object selection:

  1. Selecting "Interval Right" would not move any objects, but set the "horizontal anchor object" (the right-most one)
  2. a) Selecting "Interval Right" again would butt the objects.
  3. b) Selecting "Interval Left" would apply the "next" interval. In the list in the settings box above, if they're already at 32px then it would space them 48px apart down from the top object. If I had selected "Interval Right" twice, then "Interval Down" I'd end up with the objects spaced 1px apart.

I could then be working from the top right edges, increasing and decreasing the spacing horizontally and vertically for sorting out a grid of spacings. Changing or clearing the the selection would clear the anchor object(s). Or just working horizontally or vertically to get the spacing I want in one axis from either direction.

As a shortcut key example, I use control/option/arrow keys for Butt Selection Up/Down/Left/Right. If I transferred those keys to the "Interval Up/down/left/right" then for me, this setup would mean double tapping c-o-any arrow key would replicate Butt Selection [direction] - nice and quick. Tapping up then down would increment the current spacing of objects from the top, tapping down twice then up would start me cycling through my spacing list (or applying 4px then 8px then 12px etc if I've got a single number in the interval setting). I think this would be a very fast and flexible way of spacing things out; of course if I tried it for real I'd probably find it's no good :)

pberrecloth commented 7 years ago

Hi @ShaneNZ, thanks for the ideas. Here's a clip of how @DWilliames has implemented a toolbar in the inspector. This can handle butting, spacing and setting a spacing value.

https://drive.google.com/file/d/0BymIo-FpB7BTWXVXT2VISXAtams/view?usp=sharing

The buttons will space using the previous value in the field. But to butt to 0 you can Option+Click and there will be no spacing applied (you'll see the arrows become solid when the key is pressed).

Considerations...

I think this works nicely so far. Although it cannot 'nudge' using intervals yet (unless you hold shift and use the arrow keys to -/+ by 10). A side note on this is that it could perhaps inherit the nudging value set in Sketch Preferences.

pberrecloth commented 7 years ago

Could simply take the nudging value from here. Then at least you get small and big nudging when pressing Shift+Up/Down in the spacing field.

image

RaphyRaph commented 7 years ago

@pberrecloth The video is cool, but I think it's really crucial to be able to increment and decrement the spacing with keyboard shortcuts. That's where the real time saver lies. Can we have access to a preview to try it out?

DWilliames commented 7 years ago

Hey all!! @RaphyRaph @pberrecloth @ShaneNZ @jordaniusrex

I've been hard at work trying out some new things for the next version of Butter, taking into account all your inputs mentioned above and would love your thoughts if this is on the right track.

Please put up with my little spiel as I walk you through it in this video: http://dw.md/UcdesA

Just a note: all the features I mention will be able to be mapped to keyboard shortcuts.

RaphyRaph commented 7 years ago

🔥🔥🔥 BEAUTIFUL!! SHIIIIIIP IIIIIIIT!

ShaneNZ commented 7 years ago

That is a thing of wondrous beauty! I agree with @RaphyRaph - ship ship ship! 🥇

pberrecloth commented 7 years ago

Amazing work @DWilliames!! You've totally pushed our vision into new places! Can we talk about how best to release this?

RaphyRaph commented 7 years ago

@DWilliames any news on releasing this? We need it soooooo!

DWilliames commented 7 years ago

@RaphyRaph When I get home tonight I'll upload a build for everyone to beta test, and be able to start using. Sorry for the delay.

DWilliames commented 7 years ago

Hey all — please try the beta version of what I demoed in the video here: http://dw.md/k9dE1w Please let me know of any bugs.

RaphyRaph commented 7 years ago

4 pieces of feedback:

ShaneNZ commented 7 years ago
RaphyRaph commented 7 years ago

also lol "butt direction"

ShaneNZ commented 7 years ago

I know - I had many weird unintended mental images while writing that comment. 😂

On 17 October 2017 at 00:49, Raphael Guilleminot notifications@github.com wrote:

also lol "butt direction"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pberrecloth/butter-sketch-plugin/issues/3#issuecomment-336863286, or mute the thread https://github.com/notifications/unsubscribe-auth/ACaFVphu0L2qV2XBTH5xO7jB6p-RmgyGks5ss0LLgaJpZM4K96F2 .

pberrecloth commented 7 years ago

Won't work in Sketch 47.1: "Restart butter" keeps popping up :-(

ShaneNZ commented 7 years ago

Had an initial problem with that; I had to remove butter completely from the plugins folder, stop sketch, restart it and then install butter again. Then it worked.

And odd, I thought I'd added that here...

On 20 October 2017 at 06:06, Peter Berrecloth notifications@github.com wrote:

Won't work in Sketch 47.1: "Restart butter" keeps popping up :-(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pberrecloth/butter-sketch-plugin/issues/3#issuecomment-337973605, or mute the thread https://github.com/notifications/unsubscribe-auth/ACaFVgELdKBocAtOePpdGfGJHZqZPTYfks5st4GjgaJpZM4K96F2 .

pberrecloth commented 7 years ago

Sadly it still happens for me even when replicating your steps. Pop-up appears persistently when trying to make any selection on the artboard.

ShaneNZ commented 7 years ago

Noticed another small thing; when adding/sizing an artboard, the inspector panel is present when it probably shouldn't be.

image