Skip to content

feat: add theme variants for message list and its items - #9979

Merged
web-padawan merged 4 commits into
mainfrom
feat/message-list-variants
Sep 1, 2026
Merged

web-padawan merged 4 commits into
mainfrom
feat/message-list-variants

Conversation

@web-padawan

@web-padawan web-padawan commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Description

Follow-up to vaadin/web-components#12490

  • Added MessageListVariant with BUBBLE and ONE_TO_ONE, and made MessageList implement HasThemeVariant<MessageListVariant>
  • Added MessageListItemVariant with SELF and FULL_WIDTH for the variants of a single message
  • Added addThemeVariants, removeThemeVariants, setThemeVariants, setThemeVariant and hasThemeVariant to MessageListItem
    • MessageListItem is not a Component, so it cannot implement HasThemeVariant. The methods are copied onto it, the same way the existing addThemeNames / removeThemeNames / hasThemeName methods are copied from HasTheme
    • setThemeVariants clears all theme names first, matching HasThemeVariant.setThemeVariants
  • Documented in Javadoc that ONE_TO_ONE, SELF and FULL_WIDTH only take effect when the list uses BUBBLE. Invalid combinations are not validated, per guidelines/theming.md
  • Added unit tests for the serialized theme property of an item and for the theme attribute of the list

Type of change

  • Feature

Note

Should be merged after upgrading web components to 25.3.0-alpha15 when it's published.

Expose the bubble, one-to-one, self and full-width theme variants added
in vaadin/web-components#12490. MessageListItem is not a Component, so
the typed variant methods are copied onto it, like the existing theme
name methods.
@web-padawan
web-padawan force-pushed the feat/message-list-variants branch from 7e956cb to ff25c21 Compare August 28, 2026 10:25
Drop the HasThemeVariant behavior tests, per CONVENTIONS.md, and move
the bubble disclaimer onto the item variant constants.
The variant methods delegate to the theme name methods, which are
already covered. Keep only what the delegation itself can break.
@web-padawan
web-padawan removed the request for review from vursen August 31, 2026 13:22
@web-padawan

Copy link
Copy Markdown
Member Author

I'll release WC 25.3.0-beta1 today, this can be merged once @NpmPackage is updated tomorrow.

@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@web-padawan
web-padawan added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit f5b1ed3 Sep 1, 2026
17 checks passed
@web-padawan
web-padawan deleted the feat/message-list-variants branch September 1, 2026 14:33
sissbruecker pushed a commit that referenced this pull request Sep 1, 2026
…25.3) (#10011)

This PR cherry-picks changes from the original PR #9979 to branch 25.3.
---
#### Original PR description
> ## Description
> 
> Follow-up to vaadin/web-components#12490
> 
> - Added `MessageListVariant` with `BUBBLE` and `ONE_TO_ONE`, and made
`MessageList` implement `HasThemeVariant<MessageListVariant>`
> - Added `MessageListItemVariant` with `SELF` and `FULL_WIDTH` for the
variants of a single message
> - Added `addThemeVariants`, `removeThemeVariants`, `setThemeVariants`,
`setThemeVariant` and `hasThemeVariant` to `MessageListItem`
> - `MessageListItem` is not a `Component`, so it cannot implement
`HasThemeVariant`. The methods are copied onto it, the same way the
existing `addThemeNames` / `removeThemeNames` / `hasThemeName` methods
are copied from `HasTheme`
> - `setThemeVariants` clears all theme names first, matching
`HasThemeVariant.setThemeVariants`
> - Documented in Javadoc that `ONE_TO_ONE`, `SELF` and `FULL_WIDTH`
only take effect when the list uses `BUBBLE`. Invalid combinations are
not validated, per `guidelines/theming.md`
> - Added unit tests for the serialized `theme` property of an item and
for the `theme` attribute of the list
> 
> ## Type of change
> 
> - Feature
> 
> ## Note
> 
> Should be merged after upgrading web components to `25.3.0-alpha15`
when it's published.

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
tomivirkki added a commit to vaadin/docs that referenced this pull request Sep 29, 2026
## Summary
- The Message List docs didn't cover the theme variants added in 25.3
(vaadin/web-components#12490, vaadin/flow-components#9979) or the Flow
typing indicator (vaadin/web-components#12577,
vaadin/flow-components#10116). The styling page now documents the
variants with live examples, and the component page has a section on the
typing indicator.
- The `--vaadin-message-attachment-*` properties have been public API
since 25.1 but were missing from the style properties table. Font size
and text color are marked Aura only, because Lumo overrides them.
- The feature flags page listed `messageListTypingIndicator` twice. It
now has one entry, and it and the AI docs link to the new section.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.4.0-alpha1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants