Fix/1395 gallery spacing
Fixes #1395 : Extra Spacing in Gallery When Images and Files Are Attached
This PR addresses a UI issue where extra spacing was introduced around the gallery component when both images and files (e.g., image or documents) were attached in a single message.
🧩 Fix
- Adjusted layout logic and spacing in FileAttachment.tsx.
- Ensured that mixed media (files + images) render in a consistent and visually correct layout.
After Fix
Hey the fix Doesn't seem to be correct as it trims the file attchment width to a very small one. I will look into it and try to add a new fix. Probably we need to center the image instead of playing with the file attachment height.
@khushal87 I removed the maxWidth property and added flex: 1, so now the component takes up the full width of its parent. To control the minimum size, we can set a minWidth property. This way, it won’t shrink too small if the parent has limited space. However, when using minWidth, the image may end up with extra space around it depending on how it scales.