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

CIF-1256 - Better customizable PLP/PDP URL generation #248

Merged
merged 12 commits into from
Apr 15, 2020
Merged

Conversation

cjelger
Copy link
Contributor

@cjelger cjelger commented Apr 2, 2020

Related PR: adobe/aem-cif-project-archetype#100

Description

This PR adds an OSGi service to provide configurable PDP and PLP urls. See the related PR in the archetype repo for an example. The documentation will be added to the wiki after the PR is merged.

The PR is large but the main code to review is in UrlProvider and UrlProviderImpl. The rest is the refactoring to replace SiteNavigation by UrlProvider in all the components and tests.

How Has This Been Tested?

Extended unit tests and manually tested.

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:

  • 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.

cjelger added 8 commits March 25, 2020 17:15
- added an OSGi service to generate PDP and PLP urls based on string templates
- modified product and productList components and retrievers to parse and fetch data based on the configuration of the UrlProvider service
- replace deprecated SiteNavigation methods with UrlProvider
@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #248 into master will increase coverage by 0.42%.
The diff coverage is 89.28%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #248      +/-   ##
============================================
+ Coverage     60.50%   60.93%   +0.42%     
- Complexity      568      582      +14     
============================================
  Files           151      153       +2     
  Lines          4631     4710      +79     
  Branches        767      775       +8     
============================================
+ Hits           2802     2870      +68     
- Misses         1742     1748       +6     
- Partials         87       92       +5     
Flag Coverage Δ Complexity Δ
#jest 39.75% <ø> (ø) 0.00 <ø> (ø)
#karma 94.83% <ø> (ø) 0.00 <ø> (ø)
#unittests 85.68% <89.28%> (+0.01%) 582.00 <31.00> (+14.00)
Impacted Files Coverage Δ Complexity Δ
...models/v1/productcarousel/ProductCarouselImpl.java 87.50% <ø> (ø) 22.00 <0.00> (ø)
...nal/models/v1/searchresults/SearchResultsImpl.java 96.36% <ø> (ø) 22.00 <0.00> (ø)
...ts/models/retriever/AbstractCategoryRetriever.java 93.93% <33.33%> (-6.07%) 13.00 <0.00> (ø)
...nts/models/retriever/AbstractProductRetriever.java 84.78% <42.85%> (-7.91%) 18.00 <1.00> (ø)
...onents/internal/models/v1/product/ProductImpl.java 85.08% <66.66%> (-1.00%) 42.00 <3.00> (-1.00)
...nternal/models/v1/productlist/ProductListImpl.java 78.84% <66.66%> (-1.16%) 37.00 <0.00> (-1.00)
.../components/internal/services/UrlProviderImpl.java 84.09% <84.09%> (ø) 19.00 <19.00> (?)
...internal/models/v1/common/ProductListItemImpl.java 100.00% <100.00%> (ø) 10.00 <2.00> (ø)
.../internal/models/v1/navigation/NavigationImpl.java 86.82% <100.00%> (+0.75%) 25.00 <0.00> (ø)
...s/internal/models/v1/product/ProductRetriever.java 100.00% <100.00%> (ø) 35.00 <2.00> (+1.00)
... and 11 more

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 1555d3f...99cd7d7. Read the comment docs.

- removed code moved to UrlProviderImpl
bundles/core/pom.xml Outdated Show resolved Hide resolved
cjelger added 2 commits April 3, 2020 10:59
- revert change to dispatcher config (no longer needed)
# Conflicts:
#	bundles/core/src/test/java/com/adobe/cq/commerce/core/components/internal/models/v1/product/ProductImplTest.java
@cjelger cjelger merged commit 5bd2035 into master Apr 15, 2020
@cjelger cjelger deleted the CIF-1256 branch April 15, 2020 12:25
@herzog31 herzog31 added the feature New feature or request label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request verified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants