Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix/1395 gallery spacing #3174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pardhan03 wants to merge 2 commits into GetStream:develop
base: develop
Choose a base branch
Loading
from pardhan03:fix/1395-gallery-spacing

Conversation

@pardhan03
Copy link

@pardhan03 pardhan03 commented Jul 21, 2025

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

solution

solution1

Copy link
Member

simulator_screenshot_765058C4-2104-426B-AD6C-BD52EC58D506

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.

Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Extra spacing around gallery when both images and files are attached in a message

AltStyle によって変換されたページ (->オリジナル) /