Skip to content

Conversation

PetyaMarkovaBogdanova
Copy link
Contributor

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova commented Jun 17, 2025

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

Copy link
Contributor

@Copilot Copilot AI left a 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 () => {

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova marked this pull request as ready for review June 18, 2025 07:10
Copy link

cla-assistant bot commented Sep 9, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ didip1000
✅ PetyaMarkovaBogdanova
❌ Petya Markova


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.

@PetyaMarkovaBogdanova
Copy link
Contributor Author

Handled with: #12285

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.

[ui5-toolbar]: content flickering
3 participants