refactor: remove 'fit-content' height handling from playground and simplify height logic#683
Draft
refactor: remove 'fit-content' height handling from playground and simplify height logic#683
Conversation
…mplify height logic
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.
Which Linear task is linked to this PR?
Why was it implemented this way?
This PR refactors layout logic from the recent merge of
default(with undefined height) andfit-contentvariants.Fit-content values and mentions are fully cleaned up from the Playground (including input values, etc.) - only "undefined" values are used, since default conversions are done on the widget side. Setting max height for long pages is also removed - since setting it essentially makes it an example with
restricted-max-height.On the widget side, setting 'fit-content' via
createTheme()is also removed, and is handled on the container level instead.Since expansions are positioned absolutely, they are not treated as a part of widget on draw. When the widget is centered on the page, it is centered with respect to the widget, which might be smaller that expansion (routes in particular) - which causes misalignment. Since the height of the routes container is restricted, the suggestion is to assign min height on the wrapping container (by the maximum height of the routesContainer), to center both of the containers more uniformly.
As an alternative, widget could be made top-aligned just for positioning on playground, but if the widget is of height: fit-content and small, the next vertically stacked component (if there was any) would just overlap with the routes container (default mode, when max height is not restricted, and routes container is tall).
Visual showcase (Screenshots or Videos)
If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.
Checklist before requesting a review