-
Couldn't load subscription status.
- Fork 712
Prevent text overflow in resource action URLs #9314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent text overflow in resource action URLs #9314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to prevent text overflow in resource action URLs by updating the CSS styling and ensuring the proper class is applied to the menu item.
- Added a CSS rule with text ellipsis styling on resource action URLs.
- Updated the ResourceMenuItems model to apply the new CSS class.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Aspire.Dashboard/wwwroot/css/app.css | Introduces a new CSS selector for resource action URLs with ellipsis styling. |
| src/Aspire.Dashboard/Model/ResourceMenuItems.cs | Applies the new CSS class to the resource action URL menu item. |
c76c2fb to
ba41dc1
Compare
|
PR has changes from #9317 as well? |
| Text = url.Text, | ||
| Tooltip = url.Url, | ||
| Icon = s_linkIcon, | ||
| Class = "resource-actions-url-menuitem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to not apply the class to all menu items at a lower level?
Or add a style to the fluent menu in AspireMenu, and that style applies to all items inside the fluent menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, I imagine this problem could also happen if there is a very long command name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason, added to all fluent-menu-items.
|
Add a long URL to a resource in the stress test playground for testing now and in the future. Edit: And a resource command with a very long display name. |
… set max and min width for all fluent menus.
df795be to
ca6ef3e
Compare
Seems like it's actually the FluentMenuButton with the max and min width defined (368px and 64px respectively), though I can't find these values in the fluentui-blazor repo. They were not being applied to the resource actions graph context menu because (for some reason) min-width is set to fit-content. I added styling in |

Description
Add text-overflow to the menu item content. We have to set width to 100%, as otherwise width is set to the width of the text content.
Fixes #9222
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate