Skip to content

refactor: remove 'fit-content' height handling from playground and simplify height logic#683

Draft
effie-ms wants to merge 2 commits intomainfrom
refactor-fit-content
Draft

refactor: remove 'fit-content' height handling from playground and simplify height logic#683
effie-ms wants to merge 2 commits intomainfrom
refactor-fit-content

Conversation

@effie-ms
Copy link
Copy Markdown
Contributor

Which Linear task is linked to this PR?

Why was it implemented this way?

  1. This PR refactors layout logic from the recent merge of default (with undefined height) and fit-content variants.
    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.

  2. On the widget side, setting 'fit-content' via createTheme() is also removed, and is handled on the container level instead.

  3. 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

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.

@effie-ms effie-ms self-assigned this Mar 30, 2026
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

Successfully merging this pull request may close these issues.

1 participant