Skip to content

feat(ui5-notification-list-item, ui5-tab): add semantic click event#13373

Open
tsanislavgatev wants to merge 6 commits intomainfrom
click-nli
Open

feat(ui5-notification-list-item, ui5-tab): add semantic click event#13373
tsanislavgatev wants to merge 6 commits intomainfrom
click-nli

Conversation

@tsanislavgatev
Copy link
Copy Markdown
Contributor

@tsanislavgatev tsanislavgatev commented Apr 7, 2026

NotificationListItem overrode both _onclick and fireItemPress
without calling super, bypassing the ListItemBase click event added
in #13315. Both methods now call stopPropagation on the native
event and fire the semantic click CustomEvent with { item, originalEvent }.

Tab receives its own click event fired by TabContainer after a
successful tab selection, carrying { tab, originalEvent } so
consumers can distinguish programmatic from user-initiated selection.

Add a semantic click CustomEvent that fires on both mouse/tap and
keyboard (Enter/Space) activation. It replaces the propagated native
click (via stopPropagation) with a composed CustomEvent that includes
item/tab and originalEvent in its detail, enabling consumers to
distinguish component-level clicks from raw DOM events.

ListItemBase gets the event as the base implementation for all list items.
Tab fires it from TabContainer when a tab is selected.

Fixes #13328

@tsanislavgatev tsanislavgatev requested a review from a team April 7, 2026 14:07
@tsanislavgatev tsanislavgatev marked this pull request as ready for review April 7, 2026 14:08
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Apr 9, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 9, 2026 09:42 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 20, 2026 06:40 Inactive
Copy link
Copy Markdown
Member

@TeodorTaushanov TeodorTaushanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let’s wait for the other teams to review.

@TeodorTaushanov TeodorTaushanov self-requested a review April 20, 2026 12:12
Copy link
Copy Markdown
Contributor

@dobrinyonkov dobrinyonkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved from List side

Copy link
Copy Markdown
Contributor

@nikoletavnv nikoletavnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest for 1 test per component where the new click event details are propagated. Otherwise the change is working in the input components

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.

[Feature Request]: NotificationListItem and Tab need semantic click event (sub-issue of #13304)

5 participants