-
Notifications
You must be signed in to change notification settings - Fork 682
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
Gallery Refactor #1791
Gallery Refactor #1791
Conversation
If your PR is missing information, check against the original template here. At a minimum you must have the section headers from the template and provide some information in each section. |
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 fine. Overall, I don't think there's a lot of value in eliminating GalleryItems
, but it's good to strip out the hardcoded pageSize
.
I disagree -- |
I was going to create a talon for the
Gallery
component and I started doing a little refactoring. Turns out we can pretty much remove theGalleryItems
component and we can simplify how Gallery works. In doing this I discovered that there's pretty much no talon to be written forGallery
.It is important to note that
Gallery
is used inCategory
and inSearch
. In both cases there may be a different number of incoming or expected items being rendered which was counterintuitive when you looked at the hardcodedpageSize
value.So what I did was remove the
pageSize
prop and instead put the onus on the parent component. In this case,Category
knows that it expects 6 items so it generates an empty placeholder array.