Skip to content

ref(dashboards): Replace maxFontSize prop with Container height in details widget#109599

Merged
DominikB2014 merged 5 commits intomasterfrom
dominikbuszowiecki/dain-1248-add-autosizing-to-details-widget-for-resource-span
Feb 27, 2026
Merged

ref(dashboards): Replace maxFontSize prop with Container height in details widget#109599
DominikB2014 merged 5 commits intomasterfrom
dominikbuszowiecki/dain-1248-add-autosizing-to-details-widget-for-resource-span

Conversation

@DominikB2014
Copy link
Contributor

Removes the maxFontSize prop from AutoSizedText and the Wrapper component in the details widget. Instead of capping font size through a prop, the resource span text case now wraps in a Container with a fixed height (RESOURCE_TEXT_MAX_FONT_SIZE_PX + 16px), letting AutoSizedText naturally cap at the parent height.

Also adds a noPadding prop to Wrapper/AutoResizeParent so the default xl padding can be suppressed when the container is already constraining the size.

Refs DAIN-1248

DominikB2014 and others added 4 commits February 27, 2026 12:50
… details widget

Add an optional maxFontSize prop to AutoSizedText that caps the binary
search upper bound, so the font never exceeds the given size regardless
of available space.

Use this in the details widget to render non-image resource span
descriptions at up to 64px, scaling down to fit within the widget.

Co-Authored-By: Claude <noreply@anthropic.com>
…t size

Replace the hardcoded 64 with a named constant that references theme.size.xs,
making the intent clear without needing to parse the px-suffixed token value.

Co-Authored-By: Claude <noreply@anthropic.com>
…raint in details widget

Remove the maxFontSize prop from AutoSizedText and Wrapper. Instead, cap
the font size for resource span text by wrapping in a Container with a
fixed height equal to RESOURCE_TEXT_MAX_FONT_SIZE_PX. AutoSizedText now
always uses the parent height as its upper bound.

Also adds a noPadding prop to Wrapper/AutoResizeParent to suppress the
default xl padding when the container already constrains the size.

Refs DAIN-1248
Co-Authored-By: Claude <noreply@anthropic.com>
@linear
Copy link

linear bot commented Feb 27, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 27, 2026
@DominikB2014 DominikB2014 marked this pull request as ready for review February 27, 2026 19:35
@DominikB2014 DominikB2014 requested a review from a team as a code owner February 27, 2026 19:35
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@DominikB2014 DominikB2014 enabled auto-merge (squash) February 27, 2026 19:43
@DominikB2014 DominikB2014 merged commit ec63358 into master Feb 27, 2026
60 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/dain-1248-add-autosizing-to-details-widget-for-resource-span branch February 27, 2026 19:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants