[message-list] implement a scrollTo(item) or similar
Describe your motivation
When using message list in a AI like chat, it should happen that each time we write new tokens to the message item, we could do something like messageList.scrollTo(item, bottom) so as we can read new text without having to manually scroll.
Describe the solution you'd like
.
Describe alternatives you've considered
No response
Additional context
No response
There’s already a feature that keeps the list scrolled to the bottom if the user hasn't scrolled too far from it (50 px threshold): https://github.com/vaadin/web-components/blob/0f061c16a036aebeaabfd8502bf4a286bad5567c/packages/message-list/src/vaadin-message-list-mixin.js#L98-L108
Perhaps that doesn't work when tokens are appended to the last message?
Related feature request to scroller: https://github.com/vaadin/web-components/issues/10257
There’s already a feature that keeps the list scrolled
Is there any java api for that?
feature request to scroller
It means that messageList needs to be encapsulated in a scroller in flow?
Is there any java api for that?
Should happen automatically/by default whenever new messages are added to the list.