Skip to content
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

Feat: adds stars to RatingResponse #265

Merged
merged 8 commits into from
Jan 29, 2025
Merged

Conversation

eduardoformiga
Copy link
Member

What problem is this solving?

This PR aims to add the stars (StarsFive, StarsFour, StarsThree, StarsTwo, StarsOne) to the rating response (REST), the same way the graphql response works when dealing with averageRatingByProductId.graphql

How to test it?

[Workspace](Link goes here!)

Screenshots or example usage:

Describe alternatives you've considered, if any.

Related to / Depends on

How does this PR make you feel? 🔗

![](put .gif link here - can be found under "advanced" on giphy)

Copy link

vtex-io-ci-cd bot commented Jan 27, 2025

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Jan 27, 2025

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Copy link

github-actions bot commented Jan 27, 2025

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 26, PR deletions = 2

Generated by 🚫 dangerJS against a075c54

Copy link
Contributor

@lariciamota lariciamota left a comment

Choose a reason for hiding this comment

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

Tested using laricia workspace:
Screenshot 2025-01-28 at 10 24 55
It returns a response even without product ID. I don't know how/if it was working previously, but testing changing from id to productId on lines 296 and 297 worked here.

@eduardoformiga
Copy link
Member Author

eduardoformiga commented Jan 28, 2025

Tested using laricia workspace: It returns a response even without product ID. I don't know how/if it was working previously, but testing changing from id to productId on lines 296 and 297 worked here.

I'm not sure if I should add this, but I added a productId validation here.
The change from id to productId hasn't made a difference here since it's just the param reference received in the function.
both work as expected, but if we change the param name in these lines, we also need to change all the references from this method. I think it wasn't worth it. WDYT?

Edit: we decide on remove the validation. Thus, 400 status not exist anymore.

Before After 200 After 400
Screenshot 2025-01-28 at 12 55 33 Screenshot 2025-01-28 at 12 54 26 Screenshot 2025-01-28 at 12 55 03

lariciamota
lariciamota previously approved these changes Jan 29, 2025
Copy link
Contributor

@lariciamota lariciamota left a comment

Choose a reason for hiding this comment

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

LGTM!
Tested using id as query param and it's working as expected!

Mecrano
Mecrano previously approved these changes Jan 29, 2025
Copy link
Collaborator

@Mecrano Mecrano left a comment

Choose a reason for hiding this comment

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

LGTM

@wender wender dismissed stale reviews from Mecrano and lariciamota via 4ad9897 January 29, 2025 19:26
@wender wender merged commit d58c39a into master Jan 29, 2025
2 of 3 checks passed
@wender wender deleted the feat/adds-stars-to-rating-response branch January 29, 2025 19:32
Copy link

vtex-io-ci-cd bot commented Jan 29, 2025

Your PR has been merged! App is being published. 🚀
Version 3.17.0 → 3.18.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

4 participants