This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Parse categories coming from the back-end as a json array #6358
Merged
+8
−4
Conversation
This file contains 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
rubikuserbot
requested review from
a team and
dinhtungdu
and removed request for
a team
May 3, 2022 10:45
The category ids that come from php are in json array format (e.g. '[40,41]'), so it's necessary to parse them and convert them into a js array before processing them. Otherwise the api request will fail.
albarin
force-pushed
the
fix/6347-reviews-by-category
branch
from
May 3, 2022 10:46
eba150d
to
9f547af
Compare
Size Change: +82 B (0%) Total Size: 871 kB
ℹ️ View Unchanged
|
tjcafferkey
reviewed
May 3, 2022
tjcafferkey
added
type: bug
The issue/PR concerns a confirmed bug.
block: reviews by category
Issues related to the Reviews by Category block.
labels
May 3, 2022
tjcafferkey
approved these changes
May 3, 2022
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.
Works as expected and the code LGTM! I've updated the labels on the PR to reflect the work too.
This was referenced Jul 4, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: reviews by category
Issues related to the Reviews by Category block.
type: bug
The issue/PR concerns a confirmed bug.
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.
The goal of this PR is to address a problem occurring when rendering the
Reviews by Category
block in the frontend.The category ids that come from PHP are in
JSON
array format (e.g. '[40,41]'), so it's necessary to parse them and convert them into a js array before processing them. Otherwise, the API request will fail because thecategoryIds
query param will becategoryIds=[40,41]
instead of the expectedcategoryIds=40,41
.Fixes #6347
Testing
Manual tests
Reviews by Category
block.Changelog