Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Stacks Collapsing Issue #67

Open
kelly-bot opened this issue Feb 7, 2018 · 15 comments
Open

Nested Stacks Collapsing Issue #67

kelly-bot opened this issue Feb 7, 2018 · 15 comments

Comments

@kelly-bot
Copy link

kelly-bot commented Feb 7, 2018

First of all: I was so freakin thrilled when I found this plugin, it's everything I ever wanted!

Except for this minor issue... When I have nested stacks (all with "collapse" enabled,) hiding the last layer in a child-group stack doesn't cause the other sibling-group stacks to collapse beneath it. All other layers work properly, it's just the bottom layer within a group. (Update: its not necessarily the bottom layer in the layer panel, it doesn't matter what order they're in layer-wise... its the one that's visually beneath the rest in the artboard that doesn't cause anything to collapse.)

Here's a screen recording of what I'm talking about:
https://www.dropbox.com/s/r18gj2fek29f636/nested%20collapsible%20stacks%20bug.mov?dl=0

I'm using Sketch v 48.2. I'm going to try reverting back to older versions in the meantime.

@kelly-bot
Copy link
Author

kelly-bot commented Feb 8, 2018

Updateupdate: This only kinda sorta works, it's still a little unpredictable about what it decides will collapse and what won't.

Update: I've found a workaround, incase anyone else is having trouble with this.

I'm setting the spacing to 0 and creating blank rectangle layers to act as spacing. That way, the "last" layer isn't something I need to turn on/off, so everything collapses as expected.

screen shot 2018-02-08 at 10 49 23 am
screen shot 2018-02-08 at 10 53 25 am

@foxyls
Copy link

foxyls commented Mar 27, 2018

I have some problem(

@chriswiesner
Copy link

+1

@SimonFricker
Copy link

SimonFricker commented Jan 17, 2019

+1 its always the last item in a stack

I have added an example file
bug.sketch.zip

@kelly-bot I cant get your work around to fix the issue. Can you supply a template?

@lachlansun
Copy link

lachlansun commented Jan 22, 2019

This is still an issue almost a year on and it's destroying my workflows. Even better – now the workaround kelly-bot provided above isn't even working. I shudder to think how much time I've wasted trying to make stacked groups work properly across my projects.

Here's what I've observed:

  • When I hide the last element in a nested vertically stacked group, nothing happens
  • When I hide the second last element in the same group the stacked group below shifts up by the height of the last element in the initial stacked group
    • ... UNLESS the height of the second last element in the initial stacked group is less than the last element in the initial stacked group. In this case the stacked group below shifts up by the height of the second last element in the initial stacked group.

I cannot even begin to imagine why this would be the case. Genuinely perplexing and genuinely frustrating.

@derstelli
Copy link

+1

@jimz0
Copy link

jimz0 commented Feb 15, 2019

+1

Losing my mind over this. Still happening in Sketch 53.1 + Anima 3.0.9.

@avishic
Copy link
Contributor

avishic commented Feb 17, 2019

Would love an updated sample Sketch file, @SimonFricker seems that your sample actually works with Anima 3.0.9 + Sketch 53.1.

@jimz0 @derstelli @lachlansun

@chriswiesner
Copy link

I can provide a sample file where collapsing also does not work.

just try to set nested symbols to None, the symbol does not "shrink" properly.
also see demo-video.

https://www.dropbox.com/sh/44rhomwuzp5mlqz/AAAsu0qBAo-Xkycjawty17dua?dl=0

@ColinBai
Copy link

I've found a workaround, incase anyone else is having trouble with this.
2019-02-26 11 18 03
put a null object in stacked group,and pull it out of the symbol @chriswiesner

@Slaaavo
Copy link

Slaaavo commented Mar 21, 2019

Hi, this problem is obviously universal and this is the cause:

When an object is hidden, it is hidden from view but it still takes space in the group.

A stack
image

Middle rectangle hidden. Stack collapsed (visually), but the rectangle still takes up space.
Screenshot 2019-03-21 at 10 49 27

@bartberden
Copy link

Still a problem for me as well!

@usabilitymedic
Copy link

usabilitymedic commented May 3, 2019

@ColinBai
re:

I've found a workaround, incase anyone else is having trouble with this.
2019-02-26 11 18 03
put a null object in stacked group,and pull it out of the symbol @chriswiesner

I can't thank you enough for this. I had an "extra" item at the end that I would never remove from the collapsible group, thinking that would help....but it was another symbol, not a regular item. That made the difference. This is a lifesaver.

Update: Fell apart again today (5/6/19). Everything moved flush left when it's supposed to stay flush right. And all I did was change the color of an icon. This is driving me crazy and completely slowing my production down. Anima and Sketch please get together on this and get it resolved!!

@ariviom
Copy link

ariviom commented Oct 10, 2019

I'm running into this issue as well but it seems like the last stack item sporadically collapses correctly. Sometimes restarting Sketch fixes the collapse, sometimes tweaking the symbol works, sometimes tweaking the nested symbol works, sometimes swapping the symbol for another symbol and then swapping back works, and sometimes nothing works.

I thought for a while that it may have to do with the fix size / pin to edge function native to Sketch but I can't get consistent results.

Hopefully this gets resolved with the padding fix for Sketch 58. In the meantime, has anyone found any new workarounds?

@slamwiser
Copy link

slamwiser commented Apr 23, 2021

I've run into this issue when trying to make an accordion with stacks. It's not just the last hidden content block preventing the stack from fully collapsing - BUT - also, any symbol/group that's taller/wider than the stack itself will prevent the collapse from working.

Here's a workaround I'm using: duplicate your content symbol and make it 1px high/wide (depending on vertical or horizontal stacking). When hiding symbols, you'll need to replace it with the duplicate, set to original size, and then hide it.

The inconvenience: you may also need to create each accordion item as a separate symbol if you're working with real content, e.g the text & fields are different in each accordion item.

It's not as elegant as simply flipping the visibility - but does work with a few more steps.

Screen Shot 2021-04-22 at 7 32 09 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests