-
Notifications
You must be signed in to change notification settings - Fork 79
CIF-2022: Fix category URL for UID #538
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
Conversation
- The order of categories and filter identifiers is now identical
herzog31
left a comment
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.
Do we have some kind of documentation of migration guide, when a customer should start using uidAndUrlPath?
|
@herzog31 CIF-2021 should cover the docs |
| .position() | ||
| .image(); | ||
|
|
||
| if (enableUIDSupport || identifierType == UrlProvider.CategoryIdentifierType.UID) { |
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.
We should also only query id if we are using it. See line 36.
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.
The condition here is for if it's supported to query a category by UID. So you can query for the UID anytime, no condition needed.
| .map(); | ||
| .urlPath(category.getUrlPath()); | ||
|
|
||
| if (enableUIDSupport || categoryIdentifierType == CategoryIdentifierType.UID) { |
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.
Same as above, if uid is used we should not add id to the params.
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.
At this point we don't know. It depends on the configuration of the URLProvider.
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.
Arg, yes you are right we must query all options used by the URLProvider.
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.
Maybe the URLProvider should provide a method to return how the configuration is and what attribute is needed, this can then be used by the query.
Codecov Report
@@ Coverage Diff @@
## master #538 +/- ##
=========================================
Coverage 87.41% 87.42%
Complexity 1268 1268
=========================================
Files 232 232
Lines 5968 5971 +3
Branches 878 879 +1
=========================================
+ Hits 5217 5220 +3
Misses 583 583
Partials 168 168
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Description
Adds support for generating category URLs when UID support is enabled or UID is used as selection for custom category pages
Related Issue
CIF-2022
Motivation and Context
Adopt Magento GraphQL schema changes - Category UID
How Has This Been Tested?
Unit tests
Screenshots (if appropriate):
Types of changes
Checklist: