Experimental feature: Smart Layout in groups

Great stuff, I think this will be a massive improvement, with this we would be even be able to have our copywriters update designs without fear of break designs. Cheers

1 Like

I am having this bug now - I am using V96.1

@KarlCanBeCool Thanks, that’s expected for now. The feature is still experimental, and what I noted here still applies to 96.1, too.

Trying out the updated Smart Layout in groups: When applying Smart Layout to a group and then turning it into a Symbol, would be nice to have those settings carry over into the newly created Symbol. For example: creating a simple button, with a horizontal layout set to Right to Left; then, CMD-Y to Create Symbol; in the dialog box the layout dropdown defaults to “No Layout” even though the group had “Right to Left” applied to it.

3 Likes

@Dave Thanks for the feedback! That’s coming in the next update of the Mac app, there should be a beta for that update next week.

3 Likes

Many thanks for the reply and update Paulo! Look forward to that update :slight_smile: @paulozoom

@paulozoom Hi Paulo, not sure if anyone else has asked this or if it’s been mentioned elsewhere: Will the updates to Smart Layout also include automatic resizing of an Artboard as contents change?

@Dave Yes, that’ll be part of the next update. The Beta is taking a little bit longer this time, but expect it next week.

3 Likes

Awesome! :slight_smile: Thanks!

Duplicating elements inside a group after selecting a Layout orientation should make the new object be auto arranged according to the Layout rule, but that doesn’t happen.

2 Likes

@leohans I’m not 100% confident I completely understand the scenario you’re describing, could you perhaps show a couple of screenshots of this situation, or a short video?

Hello, I think leohans is pointing to a critical difference between Sketch Smart Layout and Figma Auto Layout.
My humble opinion is that Sketch groups still are… groups. Sketch devs can make them “smart” but we are missing the point: we need containers in Sketch that grow when contents grow, and can accept attributes, just like a DIV in HTML. Adding a rectangle to style a container with just a background color or some padding feels wrong when you have a basic knowledge of how your design can be implemented in code.
Figma clarifies this with the distinction from groups to frames. I hope Sketch developers will find a way to fix this and make Sketch a UI design competitive player again.


2 Likes

Exactly that, but I’m not sure going Groups + Frames is the way.
In Figma, if you add auto layout to a group, it’s automatically converted into a frame.
Do you still need further information @paulozoom ?

1 Like

because in Figma only Frames can accept visual attributes, and Groups don’t. A Group is just a way to organize objects that logically fit together but do not necessarily live in the same area, nor do they need to be visually defined by a perimeter. It is not different in Sketch for regular (not Smart Layout) Groups.
If you ask Figma to add Auto Layout to a Group you are telling it that mentioned Group’s purpose is no more tidying up things in the Layers list, but rather containing things, and this has a visual impact, that is a specificity of Frames.

We do not “need” exactly this distinction in Sketch, but our design needs to better reflect code, I simplify just talking about HTML, but it is basically containers inside containers, inside containers…

2 Likes

No, I think it’s clear now, and thanks @Giancarlo (and welcome).

So far, we haven’t dealt with new layer insertions in the Group with Smart Layout, which is why the feature is under the Experimental banner. But in the next update, we’ve started to. For example, when duplicating, we’ll add spacing if the duplicated element is in an evenly spaced group. However, we haven’t yet dealt with the factor of a background layer present at that same level, which is something we’ll look at.

Here’s a video from the upcoming update.

4 Likes

I just wanted to make a separate note about this, to shine a light on how we’re thinking about containers.

I totally agree that adding a rectangle to style a container feels wrong, and is something we’ve had conversations about and want to improve. However, at the moment I do not see a reason for a different type of container. Rather, if Groups are falling short, then I’d rather make Groups more flexible — with the ability to take padding, styles, etc. — instead of making new type of container for the sake of these traits, which then lives alongside the existing type of container, leading to the inevitable “when should I use A vs B?” question.

In the end, we all want the same thing. I’m confident we’ll get there — but we’ll there gradually, making things available to y’all as we have them, and taking in this feedback.

7 Likes

Hey folks :wave: We’ve just released a new Mac beta (version 97) and with it, we’ve included a whole bunch of changes and improvements to the Smart Layout in groups experimental feature:

We’re pretty happy with how this feature is shaping up and hope to be able to ship it in its final form soon. In the meantime, you can continue to share your feedback as a reply (ideally with a screen recording) right here. Thanks!

5 Likes

I saw this happen yesterday. A small notification appears. But I’m not able to get it today. How does this actually work? What are the requirements?

I have an evenly spaced group (Smart Layout Vertical) and I’m hovering over it with a another element that I want to drop in there. Doesn’t matter if I press ⌃ or not, it just does not happen anymore :cry:

Hey @fab1An. Thanks for taking the time to leave a message. It looks like you’re doing everything right—one restriction to be aware of is that we don’t currently allow dragging elements that are already children of a group into another group. Could that be the case here?

@richbarton Yes, indeed that was the reason. Both elements are together already inside of another group, just like probably 99% of my elements. I hope this restriction is only temporary (MVP) because with it, I won’t be able to use this cool feature very often.

2 Likes