Skip to content

fix(ui5-tokenizer): sync popover list items with token text changes #11854

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

Merged
merged 7 commits into from
Jul 10, 2025

Conversation

ndeshev
Copy link
Contributor

@ndeshev ndeshev commented Jul 4, 2025

  • The token's text now is bound to the text property of the ListItemStandard element and not rendered as its default slot, because after feat(ui5-li): add text wrapping support #11108 dynamic updates in it doesn't get reflected (do not cause re-rendering of the list item).

Note: The problem in the ListItemStandard occurs only with wrappingType set to Normal because it uses the ui5-expandable-text component. That component has its own text property which is getting updated when the text property of the ListItemStandart is updated, but not when its slot is.

  • Add invalidateOnChildChange config to tokens slot to watch for text property changes to ensure popover list items automatically update when token text is modified

fixes: #11825

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

This PR ensures that popover list items reflect updates to token text by invalidating the slot when a child's text property changes, and adds Cypress tests to verify this behavior.

  • Added invalidateOnChildChange slot configuration to watch token text changes.
  • Introduced Cypress tests for single and multiple token text updates in the popover.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/main/src/Tokenizer.ts Added invalidateOnChildChange to tokens slot configuration.
packages/main/cypress/specs/Tokenizer.cy.tsx New tests verifying popover list item text updates on token changes.
Comments suppressed due to low confidence (1)

packages/main/src/Tokenizer.ts:336

  • [nitpick] Consider adding a brief JSDoc comment above the invalidateOnChildChange slot config to explain its purpose (watching text property changes) so future maintainers understand why this is needed.
		invalidateOnChildChange: {

@StefanDimitrov04 StefanDimitrov04 self-requested a review July 8, 2025 13:15
@ndeshev ndeshev force-pushed the tokenizer-token-list-update branch from 6bee33f to cd8b660 Compare July 9, 2025 10:05
ndeshev added 6 commits July 9, 2025 18:37
- Add invalidateOnChildChange config to tokens slot to watch for text property changes
to ensure popover list items automatically update when token text is modified

fixes: #11825
use the StandardListItem 'text' property instead of slot
to ensure correct text rendering in popover list items
@ndeshev ndeshev force-pushed the tokenizer-token-list-update branch from 2316d0e to 5fe328d Compare July 9, 2025 15:55
@ndeshev ndeshev merged commit 1c38b60 into main Jul 10, 2025
19 of 20 checks passed
@ndeshev ndeshev deleted the tokenizer-token-list-update branch July 10, 2025 08:14
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.13.0-rc.1 🎉

The release is available on v2.13.0-rc.1

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui5-tokenizer: the list item texts in the more popover are not updated
3 participants