Skip to content

Commit

Permalink
Merge pull request #310 from adobe/dev
Browse files Browse the repository at this point in the history
@releng - merge dev into main before release
  • Loading branch information
LSantha authored Sep 2, 2022
2 parents 36bb1a1 + 03aa3cb commit 0a43305
Show file tree
Hide file tree
Showing 24 changed files with 273 additions and 58 deletions.
20 changes: 20 additions & 0 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.adobe.aem</groupId>
<artifactId>aemanalyser-maven-plugin</artifactId>
<version>1.4.10</version>
<extensions>true</extensions>
<executions>
<execution>
<id>analyse-project</id>
<phase>verify</phase>
<goals>
<goal>project-analyse</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -202,6 +217,11 @@
<!-- D E P E N D E N C I E S -->
<!-- ====================================================================== -->
<dependencies>
<dependency>
<artifactId>aem-cif-sdk-api</artifactId>
<groupId>com.adobe.aem</groupId>
<version>${aem.cif.sdk.api}</version>
</dependency>
<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-cif-guides-venia.ui.apps</artifactId>
Expand Down
9 changes: 0 additions & 9 deletions classic/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@
<artifactId>magento-graphql</artifactId>
<target>/apps/venia-vendor-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
<target>/apps/venia-vendor-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
Expand Down Expand Up @@ -310,10 +305,6 @@
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-extensions-product-recs-bundle</artifactId>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>magento-graphql</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "editor",
"types": [
"catalog-page",
"workflow",
"launches"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
import javax.annotation.PostConstruct;

import com.adobe.cq.commerce.core.components.datalayer.ProductData;
import com.adobe.cq.commerce.core.components.models.common.CombinedSku;
import com.adobe.cq.commerce.core.components.models.common.CommerceIdentifier;
import com.adobe.cq.commerce.core.components.models.common.Price;
import com.adobe.cq.commerce.core.components.models.productteaser.ProductTeaser;
import com.adobe.cq.commerce.core.components.models.retriever.AbstractProductRetriever;

import com.adobe.cq.commerce.magento.graphql.FilterRangeTypeInput;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.models.annotations.Model;
Expand Down Expand Up @@ -58,6 +61,14 @@ public void initModel() {
// automatically take care of executing your query as soon
// as you try to access any product property.
productRetriever.extendProductQueryWith(p -> p.createdAt());

// Extend the product attribute query by passing a partial filter to the ProductRetriever.
// Alternatively you can also return your own instance of ProductAttributeFilterInput to
// completely replace the filter.
productRetriever.extendProductFilterWith(f -> f
.setPrice(new FilterRangeTypeInput()
.setFrom("0")
.setTo("50000")));
}
}

Expand Down Expand Up @@ -150,4 +161,10 @@ public boolean getAddToWishListEnabled() {
public String getLinkTarget() {
return productTeaser.getLinkTarget();
}

@Override
public CombinedSku getCombinedSku() {
return productTeaser.getCombinedSku();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package com.venia.core.models.commerce;

import com.adobe.cq.commerce.core.components.datalayer.ProductData;
import com.adobe.cq.commerce.core.components.models.common.CombinedSku;
import com.adobe.cq.commerce.core.components.models.common.CommerceIdentifier;
import com.adobe.cq.commerce.core.components.models.common.Price;
import com.adobe.cq.commerce.core.components.models.productteaser.ProductTeaser;
Expand Down Expand Up @@ -221,6 +222,15 @@ void testIsVirtualProduct() throws Exception {
Assertions.assertFalse(underTest.isVirtualProduct());
}

@Test
public void testGetCombinedSku() throws Exception {
setup(PRODUCTTEASER_NO_BADGE);
Mockito.doReturn(new CombinedSku("foo", "bar")).when(productTeaser).getCombinedSku();
Assertions.assertNotNull(underTest.getCombinedSku());
Assertions.assertEquals("foo", underTest.getCombinedSku().getBaseSku());
Assertions.assertEquals("bar", underTest.getCombinedSku().getVariantSku());
}


@Test
void testGetCommerceIdentifier() throws Exception {
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,16 @@
<vault.user>admin</vault.user>
<vault.password>admin</vault.password>
<core.wcm.components.version>2.18.6</core.wcm.components.version>
<core.cif.components.version>2.10.0</core.cif.components.version>
<core.cif.components.version>2.11.0</core.cif.components.version>
<graphql.client.version>1.7.10</graphql.client.version>
<magento.graphql.version>9.0.0-magento242ee</magento.graphql.version>
<magento.graphql.version>9.1.0-magento242ee</magento.graphql.version>
<bnd.version>5.1.2</bnd.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<uber.jar.version>6.5.0</uber.jar.version>
<jacoco.version>0.8.7</jacoco.version>
<aem.sdk.api>2020.9.4277.20200929T030741Z-200924</aem.sdk.api>
<aem.cif.sdk.api>2022.08.02.00</aem.cif.sdk.api>
<componentGroupName>Venia</componentGroupName>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
jcr:primaryType="cq:ClientLibraryFolder"
allowProxy="{Boolean}true"
categories="[venia.base]"
embed="[core.wcm.components.accordion.v1,core.wcm.components.tabs.v1,core.wcm.components.carousel.v1,core.wcm.components.image.v2,core.wcm.components.breadcrumb.v2,core.wcm.components.search.v1,core.wcm.components.form.text.v2,core.wcm.components.pdfviewer.v1,core.wcm.components.commons.datalayer.v1,venia.grid]"/>
embed="[core.wcm.components.accordion.v1,core.wcm.components.tabs.v1,core.wcm.components.carousel.v1,core.wcm.components.image.v2,core.wcm.components.breadcrumb.v2,core.wcm.components.search.v1,core.wcm.components.form.text.v2,core.wcm.components.pdfviewer.v1,venia.grid]"/>
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
cssProcessor="[default:none,min:none]"
jsProcessor="[default:none,min:none]"
categories="[venia.cif]"
embed="[core.cif.components.common,core.cif.components.product.v3,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1,core.cif.components.storefront-events.v1,core.cif.components.extensions.product-recs.storefront-events-collector.v1]" />
embed="[core.cif.components.common,core.cif.components.product.v3,core.cif.components.productcarousel.v1,core.cif.components.productcollection.v2,core.cif.components.productteaser.v1,core.cif.components.searchbar.v2,core.cif.components.header.v1,core.cif.components.carousel.v1,core.cif.components.categorycarousel.v1,core.cif.components.featuredcategorylist.v1,core.cif.components.storefront-events.v1,core.cif.components.extensions.product-recs.storefront-events-collector.v1,core.wcm.components.commons.site.link]" />
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<div
data-sly-test="${isConfigured && hasProduct}"
data-product-sku="${product.sku}"
data-product-base-sku="${product.combinedSku.baseSku}"
id="${product.id}"
class="item__root"
data-cmp-is="productteaser"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="List"
sling:resourceSuperType="core/wcm/components/list/v2/list"
sling:resourceSuperType="core/cif/components/commerce/list/v1/list"
teaserDelegate="venia/components/commerce/teaser"
componentGroup="Venia - Content"/>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
cq:graphqlClient="default"
magentoRootCategoryId="Mg=="
magentoStore="default"
enableUIDSupport="true"/>
enableUIDSupport="true"
enableClientSidePriceLoadin="{Boolean}true"/>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@
showTitle="true"
showImage="true">
<jcr:content jcr:primaryType="nt:unstructured"/>
<fragmentStyles jcr:primaryType="nt:unstructured">
<item0
jcr:primaryType="nt:unstructured"
fragmentStyleCssClass="marketing-content__row-2"
fragmentStyleName="Second Row"/>
</fragmentStyles>
<cq:styleGroups jcr:primaryType="nt:unstructured">
<item0
cq:styleGroupLabel="Layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
cq:template="/conf/venia/settings/wcm/templates/landing-page"
jcr:primaryType="cq:PageContent"
jcr:title="Site Landing Page"
sling:resourceType="venia/components/page">
sling:resourceType="venia/components/page"
navRoot="{Boolean}true">
<root jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container">
<container jcr:primaryType="nt:unstructured"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:lastModified="{Date}2021-10-11T13:25:56.554+02:00"
cq:lastModifiedBy="admin"
cq:tags="[]"
cq:template="/libs/cq/experience-fragments/components/experiencefragment/template"
jcr:primaryType="cq:PageContent"
jcr:title="Dresses Category Productlist Content"
sling:resourceType="cq/experience-fragments/components/experiencefragment"/>
<master/>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:lastModified="{Date}2021-10-11T14:30:58.039+02:00"
cq:lastModifiedBy="admin"
cq:categories="Mzc="
cq:template="/conf/venia/settings/wcm/templates/xf-web-variation"
cq:xfMasterVariation="{Boolean}true"
cq:xfVariantType="web"
jcr:primaryType="cq:PageContent"
jcr:title="Dresses Category Productlist Content"
sling:resourceType="venia/components/xfpage"
fragmentLocation="grid">
<root
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
layout="responsiveGrid">
<image
alt="An elegant dress for dinner."
altValueFromDAM="false"
displayPopupTitle="false"
titleValueFromDAM="false"
jcr:title="An elegant dress for dinner."
jcr:createdBy="admin"
jcr:lastModified="{Date}2021-10-11T14:13:06.288+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/image"
fileReference="/content/dam/venia/shop_the_latest_image1.jpg">
<cq:responsive jcr:primaryType="nt:unstructured">
<default
jcr:primaryType="nt:unstructured"
offset="0"
width="6"/>
</cq:responsive>
</image>
<image_880932412
alt="A comfortable dress for a walk."
altValueFromDAM="false"
displayPopupTitle="false"
titleValueFromDAM="false"
jcr:title="A comfortable dress for a walk."
jcr:created="{Date}2021-10-11T14:13:10.571+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2021-10-11T14:13:10.571+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/image"
fileReference="/content/dam/venia/landing_page_image3.jpg">
<cq:responsive jcr:primaryType="nt:unstructured">
<default
jcr:primaryType="nt:unstructured"
offset="0"
width="6"/>
</cq:responsive>
</image_880932412>
</root>
<cq:metadata jcr:primaryType="nt:unstructured"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
layout="responsiveGrid">
<productlist cq:styleIds="[1570700958199]"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/productlist" />
sling:resourceType="venia/components/commerce/productlist">
<fragments jcr:primaryType="nt:unstructured">
<item0 jcr:primaryType="nt:unstructured"
fragmentLocation="grid"
fragmentPage="1"
fragmentCssClass="marketing-content__row-2"/>
</fragments>
</productlist>
</container>
</container>
</root>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@
sling:resourceType="venia/components/container"
layout="responsiveGrid">
<productlist cq:styleIds="[1570700958199]"
jcr:primaryType="nt:unstructured"
jcr:mixinTypes="[cq:LiveRelationship]"
sling:resourceType="venia/components/commerce/productlist" />
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/productlist">
<fragments jcr:primaryType="nt:unstructured">
<item0 jcr:primaryType="nt:unstructured"
fragmentLocation="grid"
fragmentPage="1"
fragmentCssClass="marketing-content__row-2"/>
</fragments>
</productlist>
</container>
</container>
</root>
Expand Down
12 changes: 6 additions & 6 deletions ui.frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui.frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
"webpack-merge": "^4.2.1"
},
"dependencies": {
"@adobe/aem-core-cif-product-recs-extension": "2.9.0",
"@adobe/aem-core-cif-react-components": "2.9.0",
"@adobe/aem-core-cif-product-recs-extension": "2.11.0",
"@adobe/aem-core-cif-react-components": "2.11.0",
"@apollo/client": "^3.5.5",
"@babel/runtime": "^7.4.5",
"@magento/peregrine": "11.0.0",
Expand Down
8 changes: 8 additions & 0 deletions ui.frontend/src/main/site/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,11 @@ button:disabled {
cursor: default;
touch-action: none;
}

.cmp-link__screen-reader-only {
position: absolute;
width: 1px;
clip: rect(0 0 0 0);
overflow: hidden;
white-space: nowrap;
}
4 changes: 4 additions & 0 deletions ui.frontend/src/main/styles/commerce/_productlist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@
text-align: center;
width: 150px;
}

.marketing-content__row-2 {
grid-row: 2;
}
Loading

0 comments on commit 0a43305

Please sign in to comment.