Skip to content

Conversation

@LSantha
Copy link
Collaborator

@LSantha LSantha commented Mar 29, 2021

  • added category UID support for navigation component

Related Issue

CIF-1974

Motivation and Context

Manually.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #528 (08fd892) into master (b16ca65) will decrease coverage by 0.05%.
The diff coverage is 81.48%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #528      +/-   ##
============================================
- Coverage     87.47%   87.41%   -0.06%     
- Complexity     1267     1268       +1     
============================================
  Files           232      232              
  Lines          5955     5968      +13     
  Branches        874      878       +4     
============================================
+ Hits           5209     5217       +8     
- Misses          582      583       +1     
- Partials        164      168       +4     
Flag Coverage Δ Complexity Δ
integration 64.08% <55.55%> (-0.20%) 0.00 <7.00> (ø)
jest 83.33% <ø> (ø) 0.00 <ø> (ø)
karma 94.54% <ø> (ø) 0.00 <ø> (ø)
unittests 87.51% <81.48%> (-0.11%) 0.00 <7.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...ommerce/core/examples/servlets/GraphqlServlet.java 87.95% <33.33%> (-0.40%) 45.00 <0.00> (+2.00) ⬇️
.../internal/models/v1/navigation/NavigationImpl.java 87.96% <81.81%> (-0.32%) 25.00 <0.00> (ø)
.../models/v1/navigation/GraphQLCategoryProvider.java 89.28% <92.30%> (-10.72%) 12.00 <7.00> (-1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b16ca65...08fd892. Read the comment docs.

LSantha added 3 commits March 30, 2021 16:09
# Conflicts:
#	examples/bundle/src/main/java/com/adobe/cq/commerce/core/examples/servlets/GraphqlServlet.java
 * added support for URLProvider driven UID rendering in URLs
@herzog31 herzog31 added the enhancement New feature or request label Apr 1, 2021
LSantha added 2 commits April 8, 2021 11:36
# Conflicts:
#	examples/bundle/src/main/java/com/adobe/cq/commerce/core/examples/servlets/GraphqlServlet.java

private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLCategoryProvider.class);
private static final Function<CategoryTreeQuery, CategoryTreeQuery> CATEGORIES_QUERY = q -> q.id().name().urlPath().position();
private static final Function<CategoryTreeQuery, CategoryTreeQuery> CATEGORIES_QUERY = q -> q.id().uid().name().urlPath().position();
Copy link
Contributor

Choose a reason for hiding this comment

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

To make this backwards compatible, the uid should be included in the query only if UID support is enabled

Copy link
Member

Choose a reason for hiding this comment

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

How does this break backwards compatibility? Next version of CIF components will require 2.4.2 and you can always query for the UID. The only place where we have to be careful is when we query by UID.

Copy link
Collaborator Author

@LSantha LSantha Apr 8, 2021

Choose a reason for hiding this comment

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

@laurentiumagureanu , could you please clarify? I also think that in Magento 2.4.2 the category uid will be always available.

You can find similar code in master, like here: https://github.com/adobe/aem-core-cif-components/blob/master/bundles/core/src/main/java/com/adobe/cq/commerce/core/components/internal/models/v1/breadcrumb/BreadcrumbRetriever.java#L191

@mhaack mhaack merged commit 47342bf into master Apr 13, 2021
@mhaack mhaack deleted the CIF-1974 branch April 13, 2021 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants