1183 component height#1185
Merged
Merged
Conversation
Member
Author
|
Oh, @gary149, yet another use case for container queries. This was actually very annoying to implement. |
gary149
approved these changes
May 7, 2022
This was referenced Feb 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was more involved that I thought it would be. Closes #1183. Closes #1184.
Notes for #1183
In #1165 we changed some flex behaviour but this didn't work in all contexts, most notably it forced everything to grow regardless of its parent. This worked well for one case but broke some others (including the default interface layout).
Most components are now aware of their parent and selectively apply
flex-1.I've also made some other tweaks as I found a few additional bugs when fixing this, all relating to layout.
Interface
before
after
Custom Layout
before
after
Notes for #1184
We had some custom logic to detect when form components were adjacent to one another, removing spacing and top + bottom border radiuses where necessary. However, this logic assumed that form elements always appeared in a column (one on top of the other). Side-by-side form elements also applied the exact same logic leading to very broken layouts. With the above change making components aware of their parent, we can easily change the layout behaviour depending on whether the parent is a column or a row.
We might need to modify this if we change how layouts work.
before
after