vector-icons
vector-icons copied to clipboard
feat: improve IconList layout with responsive columns
Why
The icon list provides a way for users to navigate through supported icons. It currently supports only one column (implemented with a FlatList). On desktop, we can improve browsing experience by adding support for multiple column layout (grid-like), ensuring ample spacing between the items so they don't feel cramped together.
How
- [x] Adjust the number of columns based on the window's width using
useWindowDimensionshook. - [x] The FlatList key must be changed when numColumns is changed for the list to be rerendered, this doesn't cause any visual fluctuations.
- [ ] However, due to the key change, there could be room for scroll preservation, please let me know if this is required and I'll look into it.
https://github.com/user-attachments/assets/a6c09eae-13de-4a6f-9df6-49d562007d6f
@ophirbucai is attempting to deploy a commit to the Expo Team on Vercel.
A member of the Team first needs to authorize it.