Repository navigation
fix(ref-node): keep actions inside a readonly ref node with a long name - #1560
Open
iOvergaard wants to merge 1 commit into
Open
iOvergaard wants to merge 1 commit into
iOvergaard wants to merge 1 commit into
Conversation
A readonly ref node renders #content straight into the host's flex row, without the #open-part wrapper that got min-width: 0 in #1415. Its automatic minimum width then grows with a long name, which pushes the actions slot past the element's border. Allow #content to shrink so the name truncates instead. Adds a ReadonlyLongName story and a layout test for both the clickable and the readonly variant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1560.westeurope.azurestaticapps.net |
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.



Description
uui-ref-nodekeeps its actions inside the element when it isreadonlyand its name is long.A readonly ref node renders
#contentstraight into the host's flex row, without the#open-partwrapper. #1415 gave#open-partand#infomin-width: 0, but#contenthas none. So in the readonly branch its automatic minimum width is its full width (calc(100% - 2 * var(--uui-size-3))) as soon as the name is longer than the space available. That pushes theactionsslot past the border. This addsmin-width: 0to#content, so the name truncates with an ellipsis as it already does for a clickable ref node.ref-node.element.ts:#content { min-width: 0; }. The otheruui-ref-node-*elements only overriderenderDetail()and reuseUUIRefNodeElement.styles, so they get the fix too.ref-node.story.ts: new Readonly Long Name story.ref-node.test.ts: a layout test for a clickable and a readonly ref node with a long name in a 340px container. The readonly case fails without the fix (the action ends at 548px in a 340px-wide element).Related CMS issue: umbraco/Umbraco-CMS#23088 (comment). In the CMS, the link picker dialog shows the picked document read-only when it is opened from the rich text editor or the Markdown editor, so a long page name pushes "Remove" out of view there.
Types of changes
Motivation and context
#1415 fixed long names for ref nodes you can click, but the readonly branch never renders
#open-part, so it kept the old behaviour. On a readonly ref with a long name, the actions slot overflowed by about 70px in a 420px container.How to test?
npx vitest run src/components/ref-node: the newlayouttests cover the clickable and readonly variants.uui-ref-node*story at 1280px and 360px with and without the rule: only Readonly Long Name moves.Screenshots (if appropriate)
Before (Readonly Long Name story, 420px):
After:
Checklist
🤖 Generated with Claude Code