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

Horizontal Collapse #12

Closed
h-sigma opened this issue Apr 22, 2023 · 1 comment
Closed

Horizontal Collapse #12

h-sigma opened this issue Apr 22, 2023 · 1 comment
Assignees
Labels
wontfix This will not be worked on

Comments

@h-sigma
Copy link

h-sigma commented Apr 22, 2023

Great component. Simple and sweet.
Any plans for horizontal collapse?
Would you review a PR if I find the time to add it on my own / any strong recommendations on how to code the horizontal variant?

@smastrom smastrom self-assigned this May 2, 2023
@smastrom smastrom added the wontfix This will not be worked on label May 2, 2023
@smastrom
Copy link
Owner

smastrom commented May 2, 2023

Hi Harshdeep, thank you for your interest in the package and sorry for getting back to you so late.

Generally, transitioning the width requires more measures than transitioning the height.

For example, if you resize the width of a div containing 5 lines of text from 400px to 200px, you will notice that the number of lines is going to increase to 9-10 and vice versa. But imagine also any other flex/grid layout inside of the Collapse. In short, a width change is most likely going to trigger an height change and a layout shift.

Some hacks could be done to prevent layout shifts while transitioning but this is something we don't wanto to do for two main reasons:

  1. We want the package to be "simple and sweet" (as you defined it).
  2. We have no clue of the inner elements and styles of Collapse.

For this reason, I have no plans on an horizontal collapse.

Thank you again for your interest and enjoy!

@smastrom smastrom closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants