-
Notifications
You must be signed in to change notification settings - Fork 278
fix(ui5-toolbar): fix ToolbarSelect flickering #11747
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
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
Fixes a flickering issue in ToolbarSelect
by adjusting item measurement and CSS application when the select overflows its toolbar.
- Scopes popover item width and alignment only when the select is overflowed
- Introduces a rendering flag to delay width measurement until after initial render
- Updates toolbar logic to skip items still rendering and adds an overflow behavior test
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ToolbarSelect.css | Changed .ui5-tb-popover-item rules to apply only under is-overflowed and set width to 100% |
ToolbarSelect.ts | Conditional width style: unset when overflowed |
ToolbarItem.ts | Added _isRendering flag and onAfterRendering hook |
Toolbar.ts | Updated getItemWidth to ignore items while _isRendering |
Toolbar.cy.tsx | Introduced a Cypress test for overflow scenario (uses it.only ) |
Comments suppressed due to low confidence (1)
packages/main/cypress/specs/Toolbar.cy.tsx:410
- The use of
it.only
will cause all other tests to be skipped. Remove.only
to ensure the full test suite runs.
it.only("Should handle toolbar-select with width larger than the toolbar", async () => {
Petya Markova seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
…ts into fix-toolbar-flicke4r
…ts into fix-toolbar-flicke4r
Handled with: #12285 |
When the toolbar width changes the toolbar layout is recalculated based on actual widths of the elements, instead of their widths only when inline ordered in the Toolbar and this is a problem, because they are changed to 100% when they are inside OverflowPopover. We change the calculations to take the widths from the cached values if the element is currntly in the Popover.
Fixes: 11666