Skip to content

feat(ui5-shellbar): add revealedItems to content-item-visibility-change event - #14202

Open
PetyaMarkovaBogdanova wants to merge 1 commit into
mainfrom
feat/shellbar-content-item-visibility-revealed
Open

PetyaMarkovaBogdanova wants to merge 1 commit into
mainfrom
feat/shellbar-content-item-visibility-revealed

Conversation

@PetyaMarkovaBogdanova

@PetyaMarkovaBogdanova PetyaMarkovaBogdanova commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds revealedItems: Array<HTMLElement> to the content-item-visibility-change event payload
  • revealedItems contains items that were hidden in the previous state but are now visible again (space recovered)
  • items continues to carry the currently-hidden set, unchanged

Motivation

The event previously only told consumers which items are currently hidden. To know which items just became visible again (e.g. when the ShellBar grows wider, or when the search field closes), consumers had to cache the previous items array and diff it themselves.

This is a real-world gap: when search opens, the available space inside the ShellBar shrinks without any viewport resize. When search closes, space recovers — but items relying purely on a viewport ResizeObserver never fire, so they stay hidden. The revealedItems payload gives consumers an explicit ShellBar-level signal to restore those items.

Behaviour

Scenario items revealedItems
Items hidden (space decreases) newly hidden + previously hidden []
Items revealed (space recovers) remaining hidden items items that just became visible
No change — event not fired — —

Test plan

  • Resize ShellBar narrower → items overflow → items populated, revealedItems is []
  • Resize ShellBar wider → items reappear → revealedItems contains the restored elements
  • Open search field → items grows (less space), revealedItems is []
  • Close search field → revealedItems contains items that fit again
  • Run yarn test:cypress:single cypress/specs/ShellBar.cy.tsx → all tests pass

Internal reference: DINC0866495

…ge event

The `content-item-visibility-change` event previously only carried
`items` — the currently-hidden content-slot elements. Consumers had
no explicit signal for which items transitioned from hidden back to
visible (e.g. when the ShellBar grows wider or search closes), forcing
them to maintain their own diff state.

This adds `revealedItems: Array<HTMLElement>` to the event payload:
the subset of previously-hidden items that are now visible again.

Consumers can now react directly to `revealedItems` without tracking
state across events, which closes the design gap reported by FLP where
items hidden via the ShellBar's overflow were never explicitly told to
reappear when space recovered — particularly when available space
changes without a viewport resize (e.g. search field open/close).
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
netlify-preview — ed98e2e1 Deployed Oct 23, 2026 by PetyaMarkovaBogdanova via deploy-preview #3564
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.

1 participant