Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the ProductDetails.tsx section and breaks into its main components. The goal is to compose these components in our CMS to recreate ProductDetails.tsx without any code. With this, we are able to create other variants of ProductDetails and image galleries without ever touching the code.
This PR introduces 4 new
Layout
sections, Flex.tsx, Grid.tsx, Container.tsx and GridItem.tsx, alongside 5 newProduct
sections,ProductInfo.tsx
,NotFound.tsx
,NotFoundChallenge.tsx
, ImageGallerySlider.tsx andImageGalleryFrontBack.tsx
.With these sections, I was able to reproduce the current production
ProductDetails.tsx
section by composing these sections in our CMS.Guidelines:
You may be asking yourself: "why create
Product
sections when we could compose everything on the CMS?". This is because there's a tradeoff between creating UIs on code vs creating UIs on the CMS. For instance, I'd love to have Flex and Grid on the CMS for composing complex building blocks, but I don't want to waist time composing how and where zoom buttons will appear. For this, our current guidelines are the following.These complex sections are:
Adding new ImageGallery.
To add a new image gallery, create a new section and start from the Poduct Details template at Gallery.tsx