Improve Spright chat message sizing for wide content - #3038
Draft
jattasNI wants to merge 9 commits into
Draft
Conversation
rajsite
reviewed
Aug 21, 2026
| export const styles = css` | ||
| ${display('flex')} | ||
|
|
||
| :host { |
Member
There was a problem hiding this comment.
Dunno if we need any additional confirmation but my understanding is this component is ready to delete / unmaintained. Example, was not included as part of auto scroll support: #2975 (comment)
Contributor
Author
There was a problem hiding this comment.
It is deprecated but some repos are still using it. But yeah probably best just to leave it untouched. https://github.com/search?q=repo%3Ani%2Ftesthub+spright-chat-message&type=code
rajsite
reviewed
Aug 21, 2026
| @@ -0,0 +1,7 @@ | |||
| { | |||
Member
There was a problem hiding this comment.
If you are out here tweaking the styles a bit, would be great to enable scrollbar gutters in scrollable containers
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.
Pull Request
🤨 Rationale
Fixes #2607. Also addresses an issue where clients setting max-width on a message wasn't respected, causing content to grow the width of the conversation and show a horizontal scrollbar and whitespace.
👩💻 Implementation
The end result is that messages will default to never being wider than the conversation and the message (rather than the conversation) will show a horizontal scrollbar if their content is too wide. Clients can now configure what the max-width is if they want different behavior.
Changes to achieve this:
On all message types,
calc(90%)to90%because they are equivalent.align-selfstyling because this caused some inbound messages to no longer be right aligned.align-selfis a better way to align an item within its container.max-width: 100%to themessage-contentelement andwidth: 100%to thecontainerelement. This prevents messages with wide content from growing beyond the message max-width.On inbound message, change initial
max-widthto 100% as requested in #2607 and I agree in SystemLink it looks better for wide content like tables.🧪 Testing
In storybook you can see all messages (except the deprecated
chat-message) now respect the max-width and show a horizontal scrollbar.I see the same thing in a markdown table in SystemLink:

✅ Checklist