You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 🎯 Goal
This PR provides SVG image awareness to our default `Image` rendering
component. Historically, we've never supported SVG rendering within the
`ImageGallery`, message images as well as the `ImageGrid`. This PR
should address that.
The default component used for `ImageComponent` is now `SvgAwareImage`
from the SDK. This should of course be non-breaking as it doesn't affect
rendering at all.
Unfortunately, not all places could default to using `ImageComponent`,
specifically `AnimatedGalleryImage.tsx` and the images within
`ImageGrid.tsx`. The reason behind this is the fact that also
historically, we've only used `ImageComponent` within the confines of
the `Chat` component. This means that some integrations might actually
depend on this in respect to rendering the `ImageComponent` itself (a
popular usecase would be to `useChatContext` to know if we're offline or
not, for example). Since the gallery still lives typically outside of
`Chat`, we can't safely move this up there without breaking various
integrations. This will be addressed in the next major version for sure
and is now on my radar.
And last, but not least, this PR addresses a similar issue where opening
the `ImageGrid` with videos would crash. The reason is of course the
usage of `LoadingImage`, which also assumes it lives within `Chat`.
## 🛠 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
0 commit comments