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-1502 - XF based page header with authoring support #176

Merged
merged 6 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion it.tests/src/main/resources/datalayer/grouped-product.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"product-ed0cbc4aea": {
"product-5e145aefa3": {
"xdm:listPrice": 14.0,
"xdm:categories": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"product-6603d4b5bd": {
"product-07f0c0ddb7": {
"xdm:listPrice": 9.99,
"xdm:categories": [],
"xdm:SKU": "product-sku",
Expand Down
2 changes: 1 addition & 1 deletion it.tests/src/main/resources/datalayer/simple-product.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"product-500741b9f1": {
"product-9b9fa3d1aa": {
"xdm:listPrice": 52.0,
"xdm:categories": [
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<vault.user>admin</vault.user>
<vault.password>admin</vault.password>
<core.wcm.components.version>2.17.2</core.wcm.components.version>
<core.cif.components.version>2.0.0</core.cif.components.version>
<core.cif.components.version>2.0.1-SNAPSHOT</core.cif.components.version>
buuhuu marked this conversation as resolved.
Show resolved Hide resolved
<graphql.client.version>1.7.2</graphql.client.version>
<magento.graphql.version>9.0.0-magento242ee</magento.graphql.version>
<bnd.version>5.1.2</bnd.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?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:Component"
sling:resourceSuperType="core/cif/components/commerce/accountdetails/v1/accountdetails"
componentGroup="Venia - Commerce"
jcr:title="Account Details">
</jcr:root>
xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
sling:resourceSuperType="core/cif/components/commerce/accountdetails/v2/accountdetails"
componentGroup="Venia - Commerce"
jcr:title="Account Details"/>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
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="Commerce Address Book"
sling:resourceSuperType="core/cif/components/commerce/addressbook/v1/addressbook"
jcr:title="Address Book"
sling:resourceSuperType="core/cif/components/commerce/addressbook/v2/addressbook"
componentGroup="Venia - Commerce" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:description="Logo Component"
jcr:primaryType="cq:Component"
jcr:title="Logo"
componentGroup="Venia - Header"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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="nt:unstructured"
jcr:title="Logo"
sling:resourceType="cq/gui/components/authoring/dialog"
trackingFeature="venia:logo">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<id jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="HTML ID attribute to apply to the component."
fieldLabel="ID"
name="./id"/>
</items>
</column>
</items>
</content>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--/*
Copyright 2021 Adobe Systems Incorporated

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/-->
<sly data-sly-use.component="com.adobe.cq.wcm.core.components.models.Component"
data-sly-use.header="com.adobe.cq.commerce.core.components.models.header.Header"
data-sly-use.templates="core/wcm/components/commons/v1/templates.html"
data-sly-set.logoName="logo.svg"/>
<a id="${component.id}" class="logo__link" href="${header.navigationRootPageUrl}">
<img data-sly-set.testPath="${logoName}/jcr:primaryType"
data-sly-test.hasImage="${resource[testPath]}"
class="logo__image"
src="${resource.path}/${logoName}"
height="24"
alt="${header.navigationRootPageTitle}"
title="${header.navigationRootPageTitle}" />
<sly data-sly-test="${!hasImage}">${header.navigationRootPageTitle}</sly>
</a>
<sly data-sly-call="${templates.placeholder @ isEmpty = !hasImage && !header.navigationRootPageTitle}"/>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<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="Mini Account"
sling:resourceSuperType="core/cif/components/content/miniaccount/v1/miniaccount"
componentGroup=".hidden"/>
sling:resourceSuperType="core/cif/components/content/miniaccount/v2/miniaccount"
componentGroup="Venia - Header"/>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<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="Mini Cart"
sling:resourceSuperType="core/cif/components/commerce/minicart/v1/minicart"
componentGroup=".hidden" />
sling:resourceSuperType="core/cif/components/commerce/minicart/v2/minicart"
componentGroup="Venia - Header" />
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
jcr:description="The commerce top level navigation component"
jcr:primaryType="cq:Component"
jcr:title="Commerce Navigation"
componentGroup="Venia - Structure"
componentGroup="Venia - Header"
sling:resourceSuperType="core/cif/components/structure/navigation/v2/navigation"/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?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:title="Reset Password Form"
sling:resourceSuperType="core/cif/components/commerce/resetpassword/v1/resetpassword"
jcr:primaryType="cq:Component" />
jcr:title="Reset Password"
sling:resourceSuperType="core/cif/components/commerce/resetpassword/v2/resetpassword"
jcr:primaryType="cq:Component"
componentGroup="Venia - Commerce"/>
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
jcr:description="Searchbar component that displays input field for product search"
jcr:primaryType="cq:Component"
jcr:title="Searchbar"
sling:resourceSuperType="core/cif/components/commerce/searchbar/v1/searchbar"
componentGroup=".hidden"/>
sling:resourceSuperType="core/cif/components/commerce/searchbar/v2/searchbar"
componentGroup="Venia - Header"/>
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
jcr:primaryType="nt:unstructured"
jcr:title="XF Root"
sling:resourceType="wcm/core/components/policy/policy"
components="[group:Venia - Content,group:Venia - Commerce,/apps/venia/components/form/container]">
components="[group:Venia - Content,group:Venia - Commerce,/apps/venia/components/form/container,group:Venia - Header]">
<jcr:content jcr:primaryType="nt:unstructured"/>
<cq:authoring jcr:primaryType="nt:unstructured">
<assetToComponentMapping jcr:primaryType="nt:unstructured">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
cq:policy="venia/components/container/policy_1574694950110"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<header cq:policy="venia/components/experiencefragment/policy_header"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping" />
<container
cq:policy="venia/components/container/policy_1574695586800"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<container
cq:policy="venia/components/container/policy_1574695586800"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping"/>
</container>
<title
cq:policy="venia/components/title/policy_641475696923109"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping"/>
</root>
</jcr:content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,33 @@
cq:template="/conf/venia/settings/wcm/templates/page-content"
jcr:primaryType="cq:PageContent"
sling:resourceType="venia/components/page">
<root
jcr:primaryType="nt:unstructured"
<root jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container">
<container
jcr:primaryType="nt:unstructured"
<header jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/experiencefragment"
fragmentVariationPath="/content/experience-fragments/venia/us/en/site/header/master"/>
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
editable="{Boolean}true"
layout="responsiveGrid"/>
layout="responsiveGrid">
<breadcrumb jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/breadcrumb"
startLevel="3"
structureDepth="2"/>
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
editable="{Boolean}true" />
</container>
<footer jcr:created="{Date}2019-03-05T11:43:17.308+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2019-03-05T11:43:17.308+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/experiencefragment"
fragmentVariationPath="/content/experience-fragments/venia/us/en/site/footer/master"/>
</root>
<cq:responsive jcr:primaryType="nt:unstructured">
<breakpoints jcr:primaryType="nt:unstructured">
<phone
jcr:primaryType="nt:unstructured"
<phone jcr:primaryType="nt:unstructured"
title="Smaller Screen"
width="{Long}768"/>
<tablet
jcr:primaryType="nt:unstructured"
<tablet jcr:primaryType="nt:unstructured"
title="Tablet"
width="{Long}1200"/>
</breakpoints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<root cq:policy="venia/components/container/policy_1574694950110"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<experiencefragment-header cq:policy="venia/components/experiencefragment/policy_header"
<header cq:policy="venia/components/experiencefragment/policy_header"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping" />
<experiencefragment-footer cq:policy="venia/components/experiencefragment/policy_footer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,65 +9,34 @@
jcr:primaryType="cq:PageContent"
sling:resourceType="venia/components/commerce/catalogpage">
<root jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
layout="simple">
<header jcr:created="{Date}2019-03-05T11:43:21.074+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2019-03-05T11:43:21.074+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/header">
<logo.svg />
<navigation collectAllPages="false"
jcr:primaryType="nt:unstructured"
navigationRoot="/content/venia/us/en"
skipNavigationRoot="true"
sling:resourceType="venia/components/commerce/navigation"
structureDepth="2">
<miniaccount jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/miniaccount" />
</navigation>
<miniaccount jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/miniaccount" />
<minicart jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/minicart" />
<searchbar jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/searchbar" />
</header>
<!-- <experiencefragment-header jcr:primaryType="nt:unstructured" sling:resourceType="venia/components/experiencefragment" fragmentVariationPath="/content/experience-fragments/venia/us/en/site/header/master" /> -->
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container">
<header jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/experiencefragment"
fragmentVariationPath="/content/experience-fragments/venia/us/en/site/header/master"/>
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
layout="responsiveGrid">
<breadcrumb
jcr:created="{Date}2020-08-17T16:22:56.378+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2020-08-17T16:22:56.378+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
<breadcrumb jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/breadcrumb"
startLevel="3"
structureDepth="2"/>
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
editable="{Boolean}true" />
</container>

<footer jcr:created="{Date}2019-03-05T11:43:17.308+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2019-03-05T11:43:17.308+02:00"
jcr:lastModifiedBy="admin"
<footer jcr:created="{Date}2019-03-05T11:43:17.308+02:00"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/experiencefragment"
fragmentVariationPath="/content/experience-fragments/venia/us/en/site/footer/master"/>
</root>
<cq:responsive jcr:primaryType="nt:unstructured">
<breakpoints jcr:primaryType="nt:unstructured">
<phone jcr:primaryType="nt:unstructured"
title="Smaller Screen"
width="{Long}768" />
<tablet jcr:primaryType="nt:unstructured"
title="Tablet"
width="{Long}1200" />
<phone jcr:primaryType="nt:unstructured"
title="Smaller Screen"
width="{Long}768"/>
<tablet jcr:primaryType="nt:unstructured"
title="Tablet"
width="{Long}1200"/>
</breakpoints>
</cq:responsive>
</jcr:content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<root cq:policy="venia/components/container/policy_1574694950110"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<experiencefragment-header cq:policy="venia/components/experiencefragment/policy_header"
<header cq:policy="venia/components/experiencefragment/policy_header"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping" />
<experiencefragment-footer cq:policy="venia/components/experiencefragment/policy_footer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,9 @@
<root jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
layout="simple">
<header jcr:created="{Date}2019-03-05T11:43:21.074+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2019-03-05T11:43:21.074+02:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/header">
<logo.svg />
<navigation collectAllPages="false"
jcr:primaryType="nt:unstructured"
navigationRoot="/content/venia/us/en"
skipNavigationRoot="true"
sling:resourceType="venia/components/commerce/navigation"
structureDepth="2">
<miniaccount jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/miniaccount" />
</navigation>
<miniaccount jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/miniaccount" />
<minicart jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/minicart" />
<searchbar jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/commerce/searchbar" />
</header>
<!-- <experiencefragment-header jcr:primaryType="nt:unstructured" sling:resourceType="venia/components/experiencefragment" fragmentVariationPath="/content/experience-fragments/venia/us/en/site/header/master" /> -->
<header jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/experiencefragment"
fragmentVariationPath="/content/experience-fragments/venia/us/en/site/header/master"/>
<container jcr:primaryType="nt:unstructured"
sling:resourceType="venia/components/container"
layout="responsiveGrid">
Expand All @@ -51,8 +30,7 @@
sling:resourceType="venia/components/container"
editable="{Boolean}true" />
</container>

<footer jcr:created="{Date}2019-03-05T11:43:17.308+02:00"
<footer jcr:created="{Date}2019-03-05T11:43:17.308+02:00"
jcr:createdBy="admin"
jcr:lastModified="{Date}2019-03-05T11:43:17.308+02:00"
jcr:lastModifiedBy="admin"
Expand Down
Loading