Repository navigation
feat(ui5-shellbar): add revealedItems to content-item-visibility-change event - #14202
Open
PetyaMarkovaBogdanova wants to merge 1 commit into
Open
PetyaMarkovaBogdanova wants to merge 1 commit into
PetyaMarkovaBogdanova wants to merge 1 commit into
Conversation
…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).
PetyaMarkovaBogdanova
deployed
to
netlify-preview
October 23, 2026 14:04 — with
GitHub Actions
Active
|
🚀 Deployed on https://pr-14202--ui5-webcomponents-preview.netlify.app |
This branch was successfully deployed
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.
Summary
revealedItems: Array<HTMLElement>to thecontent-item-visibility-changeevent payloadrevealedItemscontains items that were hidden in the previous state but are now visible again (space recovered)itemscontinues to carry the currently-hidden set, unchangedMotivation
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
itemsarray 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
ResizeObservernever fire, so they stay hidden. TherevealedItemspayload gives consumers an explicit ShellBar-level signal to restore those items.Behaviour
itemsrevealedItems[]Test plan
itemspopulated,revealedItemsis[]revealedItemscontains the restored elementsitemsgrows (less space),revealedItemsis[]revealedItemscontains items that fit againyarn test:cypress:single cypress/specs/ShellBar.cy.tsx→ all tests passInternal reference: DINC0866495