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-1630 - Configurable header tag for teaser and carousel components #410

Merged
merged 8 commits into from
Oct 1, 2020

Conversation

cjelger
Copy link
Contributor

@cjelger cjelger commented Sep 30, 2020

Similar to the Title component from the WCM components, this PR makes it possible to configure the HTML tag for the title element of the ProductCarousel, RelatedProducts, and FeaturedCategoryList components. Note that we do not need this for the CommerceTeaser because this feature already exists in the WCM Teaser parent component.

This PR makes it possible to:

  • configure the list of allowed HTML elements and the default tag in the template/component policy
  • configure the tag in the components dialog

To avoid duplicating the dialog part for the cq:design_dialog configuration, the PR adds a generic field element at apps/core/cif/components/authoring/dialog/titletypetab/titletypes similar to what is being done for the styletab field.

Related PR

adobe/aem-cif-guides-venia#66

How Has This Been Tested?

Extended unit tests.

Screenshots (if appropriate):

Screenshot 2020-09-30 at 09 18 52

Screenshot 2020-09-30 at 09 19 47

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.

- add title tag selection for product carousel
- add title tag selection for related products
- add title tag type selection for featured category list component
- remove inheritance with TitleTypeProvider as it would prevent sling models to extend other models
@codecov
Copy link

codecov bot commented Sep 30, 2020

Codecov Report

Merging #410 into master will decrease coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #410      +/-   ##
============================================
- Coverage     86.28%   86.27%   -0.01%     
- Complexity      950      954       +4     
============================================
  Files           198      199       +1     
  Lines          5053     5058       +5     
  Branches        729      729              
============================================
+ Hits           4360     4364       +4     
- Misses          551      552       +1     
  Partials        142      142              
Flag Coverage Δ Complexity Δ
#integration 67.32% <80.00%> (+0.02%) 695.00 <4.00> (+4.00)
#jest 82.32% <ø> (ø) 0.00 <ø> (ø)
#karma 94.24% <ø> (ø) 0.00 <ø> (ø)
#unittests 86.28% <80.00%> (-0.02%) 923.00 <4.00> (+4.00) ⬇️

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

Impacted Files Coverage Δ Complexity Δ
...s/internal/models/v1/common/TitleTypeProvider.java 50.00% <50.00%> (ø) 1.00 <1.00> (?)
...dels/v1/categorylist/FeaturedCategoryListImpl.java 90.38% <100.00%> (+0.18%) 17.00 <1.00> (+1.00)
...models/v1/productcarousel/ProductCarouselImpl.java 87.71% <100.00%> (+0.21%) 23.00 <1.00> (+1.00)
...models/v1/relatedproducts/RelatedProductsImpl.java 86.95% <100.00%> (+0.28%) 16.00 <1.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 6c566ae...3518180. Read the comment docs.

@cjelger cjelger added enhancement New feature or request To Verify labels Sep 30, 2020
@herzog31 herzog31 merged commit 8023b4f into master Oct 1, 2020
@herzog31 herzog31 deleted the CIF-1630 branch October 1, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request verified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants