Skip to content

Commit 5f72b09

Browse files
authored
fix: message gallery overflow styles (#3615)
## 🎯 Goal This PR addresses an unfortunate regression introduced in [this PR](#3600). We need the `overflow: 'hidden'` after all, for single image messages. Regardless, everything mentioned in the previous PR still holds true; we just force the rendering into a bounding rectangle once again by applying `borderWidth` (which even if `0`, still forces the shape as it exists). ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android
1 parent c286c5b commit 5f72b09

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

package/src/components/Message/MessageItemView/MessageContent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,8 @@ const styles = StyleSheet.create({
656656
containerInner: {
657657
borderTopLeftRadius: components.messageBubbleRadiusGroupBottom,
658658
borderTopRightRadius: components.messageBubbleRadiusGroupBottom,
659+
overflow: 'hidden',
660+
borderWidth: 0,
659661
},
660662
contentBody: {
661663
flexShrink: 1,

package/src/components/Thread/__tests__/__snapshots__/Thread.test.tsx.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ exports[`Thread should match thread snapshot 1`] = `
506506
{
507507
"borderTopLeftRadius": 20,
508508
"borderTopRightRadius": 20,
509+
"borderWidth": 0,
510+
"overflow": "hidden",
509511
},
510512
{
511513
"backgroundColor": "#ebeef1",
@@ -848,6 +850,8 @@ exports[`Thread should match thread snapshot 1`] = `
848850
{
849851
"borderTopLeftRadius": 20,
850852
"borderTopRightRadius": 20,
853+
"borderWidth": 0,
854+
"overflow": "hidden",
851855
},
852856
{
853857
"backgroundColor": "#ebeef1",
@@ -1223,6 +1227,8 @@ exports[`Thread should match thread snapshot 1`] = `
12231227
{
12241228
"borderTopLeftRadius": 20,
12251229
"borderTopRightRadius": 20,
1230+
"borderWidth": 0,
1231+
"overflow": "hidden",
12261232
},
12271233
{
12281234
"backgroundColor": "#ebeef1",
@@ -1556,6 +1562,8 @@ exports[`Thread should match thread snapshot 1`] = `
15561562
{
15571563
"borderTopLeftRadius": 20,
15581564
"borderTopRightRadius": 20,
1565+
"borderWidth": 0,
1566+
"overflow": "hidden",
15591567
},
15601568
{
15611569
"backgroundColor": "#ebeef1",

0 commit comments

Comments
 (0)