fix: Message overflow in thread & display command list above upload previews #75
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.
🎯 Goal
Provide a general css rule impacting all types of messages that would prevent messages' inner content to overflow from their message container.
Display the command list (Giphy) for message input above upload previews.
🛠 Implementation details
Message content overflowed in case of messages displaying uploaded file and in the past it was the case for the other message types too. Adding this rule should work for all the message types because the underlying problem is that the children of a flex container (
str-chat__message-simple
) havemin-width
value set by default toauto
. This can make the block elements take up much more space than desired, resulting in overflow. Therefore the elements with classstr-chat__message-inner
get rulemin-width:0;
Command list container got
z-index: 10001
. The system of z-indices should be reviewed in order to avoid getting to so high values for the rule (the close button on image preview hasz-index: 10000
).🎨 UI Changes
Message overflow
Before:
After:
Command list
Before:
After: