Skip to content

feat: switch to Masonry view on small screens#470

Draft
PouyaMohseni wants to merge 1 commit intodevelopfrom
mobile-list-view
Draft

feat: switch to Masonry view on small screens#470
PouyaMohseni wants to merge 1 commit intodevelopfrom
mobile-list-view

Conversation

@PouyaMohseni
Copy link
Copy Markdown
Contributor

  • Hide the standard view button
  • Add window resize listener

resolves #468

- Hide the standard view  button
- Add window resize listener

resolves #468
@yinanazhou
Copy link
Copy Markdown
Member

The referenced issue is closed.

I wouldn't recommend to force masonry view on small screens. Masonry view is not very efficient. If we need to choose one view for small screen, I would use standard view for better performance, and use styles to make the images fit better.

});

// Force Masonry view on small screens
window.addEventListener('resize', () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resize event listeners are usually not performant, and can cause performance problems. Use ResizeObserver instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Thank you.

@PouyaMohseni PouyaMohseni marked this pull request as draft January 21, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In the mobile layout, Standard view is the same as Masonry, just with more space

2 participants