-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Masonry Grid Layout for Uploaded Images with Expandable View #40
Conversation
✅ Deploy Preview for reachat-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@steppy452 @amcdnl Please review this PR when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you address some of the feedback, we can merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a really good progress! I just have one comment aside from Austin's
Hi @amcdnl @steppy452, Thank you for your feedback. I've fixed the issues you pointed out. Please review the changes and let me know your thoughts. |
<div | ||
className={cn( | ||
theme.messages.message.files.base, | ||
imageFiles.length < 4 || expanded ? '' : 'grid grid-cols-3 gap-2 w-1/2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here we can use truncateImages
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AntonJames-Sistence just a minor comment to help w/ future maintenance but otherwise lgtm!
…nt breakpoints for masonry grid; apply minor style improvements for handling more than 3 images in the Masonry layout
@steppy452, thanks for the review. I addressed your comment and Implemented the maxImageLength variable, let me know what you think. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, when users upload images, there is no masonry layout or a way to handle displaying more than three images in a compact and user-friendly manner.
Issue Number: 7
What is the new behavior?
This PR introduces a new feature that allows users to view their uploaded images in a masonry grid layout. When users upload more than three images, the first three images are displayed in a compact masonry grid. If there are more than three images, a +N overlay appears on the third image, indicating the number of additional images. When the user clicks on the +N overlay, the grid expands to show all images.
The update leverages native CSS for the masonry layout, ensuring that the layout is handled efficiently by the browser without the need for additional JavaScript for positioning. This improves both performance and user experience.
Does this PR introduce a breaking change?
Other information