Repository navigation
feat: create product thumbnail - #2700
Merged
hellofanny merged 28 commits intoMar 14, 2025
Merged
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
artursantiago
marked this pull request as ready for review
February 21, 2025 19:02
artursantiago
requested review from
eduardoformiga and
hellofanny
and removed request for
a team
February 21, 2025 19:02
hellofanny
reviewed
Mar 10, 2025
artursantiago
force-pushed
the
feat/create-product-thumbnail
branch
2 times, most recently
from
March 12, 2025 17:07
c697ba3 to
84d8cd4
Compare
hellofanny
reviewed
Mar 12, 2025
Contributor
Contributor
Author
hellofanny
reviewed
Mar 13, 2025
hellofanny
reviewed
Mar 13, 2025
hellofanny
reviewed
Mar 13, 2025
hellofanny
reviewed
Mar 13, 2025
hellofanny
approved these changes
Mar 13, 2025
lucasfp13
approved these changes
Mar 14, 2025
lucasfp13
left a comment
Contributor
There was a problem hiding this comment.
LGTM after the changes
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
artursantiago
force-pushed
the
feat/create-product-thumbnail
branch
from
March 14, 2025 13:21
1519e69 to
8bc28e3
Compare
artursantiago
added a commit
that referenced
this pull request
Mar 17, 2025
>⚠️ THIS PR DEPENDS ON:⚠️ > - #2695 ## What's the purpose of this pull request? This PR introduces a new component called ProductThumbnail to the UI package. The component is designed to display product information (image and name) in a compact format, specifically for use within the AddReviewModal. ### Starters Deploy Preview [Preview](https://starter-git-feat-create-product-thumbnail-vtex.vercel.app/) ## References [FEATURE BRANCH](#2676) [Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=128-22351&t=zALRZSwDWuF6UrjH-4) [SFS-2168](https://vtex-dev.atlassian.net/browse/SFS-2168)  [SFS-2168]: https://vtex-dev.atlassian.net/browse/SFS-2168?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Fanny Chien <[email protected]>
artursantiago
added a commit
that referenced
this pull request
Mar 24, 2025
>⚠️ THIS PR DEPENDS ON:⚠️ > - #2707 > - #2695 > - #2700 ## What's the purpose of this pull request? This PR implements the "Add Review" form functionality within the core package. > [!NOTE] > I also made some adjustments to global components (Rating, Textarea, CheckboxField, InputField). I've included them in this PR for efficiency, but can move them to separate PRs targeting main if preferred. ## How it works? - Review Modal Form: - Adjust AddReviewModal.tsx in the core package with form handling, validation, success states, and error management Integrated - Couldn't focus on checkbox field so I add a scrollIntoView for it -  - Add new cms configuration in `sections.json` - GraphQL Integration: - Added CreateProductReview mutation to handle the submission of review data - Defined appropriate types and integrated mutation documents in GraphQL schema - Developed a useAddReview hook that leverages useLazyQuery for handling review submission - Global Component Enhancements: - Rating: Added type="button" attribute so that it doesn't trigger submit inside form - CheckboxField: Implemented checkboxRef prop for better form control and adjusted label sizing - Textarea: Adjust label sizing - InputField: Fixed label positioning when error messages are present by updating positioning calculation -  ## How to test it? - Navigate to any product page and click on "Write a Review" - Test form validation by submitting without required fields - Verify rating selection works properly - Submit a complete review and confirm success state appears - Check error handling: - Not logged in - Duplicate review ### Starters Deploy Preview [Preview](https://starter-git-feat-add-review-modal-form-vtex.vercel.app/) <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References [FEATURE BRANCH](#2676) [Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=128-22351&t=zALRZSwDWuF6UrjH-4) [SFS-2082](https://vtex-dev.atlassian.net/browse/SFS-2082) [SFS-2169](https://vtex-dev.atlassian.net/browse/SFS-2169)  [SFS-2082]: https://vtex-dev.atlassian.net/browse/SFS-2082?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




What's the purpose of this pull request?
This PR introduces a new component called ProductThumbnail to the UI package. The component is designed to display product information (image and name) in a compact format, specifically for use within the AddReviewModal.
Starters Deploy Preview
Preview
References
FEATURE BRANCH
Figma
SFS-2168