-
Notifications
You must be signed in to change notification settings - Fork 81
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-1321 - Empty Commerce tab in page properties #256
Conversation
* added commerce tab in page properties with appropriate render conditions for custom PDPs and PLPs
selectionId="id"> | ||
<granite:rendercondition jcr:primaryType="nt:unstructured" | ||
sling:resourceType="core/cif/components/renderconditions/pagetemplate" | ||
templatePath="/conf/atest/settings/wcm/templates/category-page"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is /conf/atest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we need the templatePath
here, which we don't have, should we move the portions or the entire dialog to the archetype?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've eliminated the page template from the render conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now
<granite:rendercondition | ||
jcr:primaryType="nt:unstructured" | ||
sling:resourceType="core/cif/components/renderconditions/pagetemplate" | ||
templatePath="/conf/atest/settings/wcm/templates/product-page"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
* added new render condtion to avoid using page templates in render conditions for page properties of custom PDPs and PLPs * deprecated old render condition
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
============================================
+ Coverage 62.28% 62.32% +0.04%
- Complexity 724 728 +4
============================================
Files 171 171
Lines 5236 5240 +4
Branches 817 820 +3
============================================
+ Hits 3261 3266 +5
+ Misses 1864 1862 -2
- Partials 111 112 +1
Continue to review full report at Codecov.
|
@@ -34,6 +34,8 @@ | |||
/** | |||
* This servlet handles <code>granite:rendercondition</code> requests from the CIF page component, | |||
* in order to decide if the product and category pickers should be displayed in the page properties dialog. | |||
* | |||
* @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no remove this Servlet? This is "internal" used, nothing customers directly dependent on. And if you replace it we don't need it. Customers which don't upgrade can still use the older version of the bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle this servlet is public API because it's exposed publicly via the resource type core/cif/components/renderconditions/pagetemplate. If a customer is using it somewhere in a similar way as it was used in the archetype then that code will break.
Strictly speaking the new servlet is not a drop-in replacement for this because it's doing different kind of checks and it's not using templates, it's part of a different approach to solve the issue in the page properties dialog.
Nevertheless, if we decide to remove it, I'm also fine with that because the likelihood of somebody using it elsewhere may be quite small. I just thought that deprecation is the safer way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevertheless, if we decide to remove it, I'm also fine with that because the likelihood of somebody using it elsewhere may be quite small. I just thought that deprecation is the safer way.
+1 for remove, the number of customers using this might be overseeable. Most might be even on CIF versions before it was introduced.
* removed old render condition and related unit test
Added commerce tab in page properties with appropriate render conditions for custom PDPs and PLPs.
Description
Empty commerce tab (no fields only a text "Magento Store Configuration") is displayed in the page properties of storefront pages: "us", "en", "search".
The solution moves the 'Commerce' tab from the archetype to the aem-core-cif-components project and adds render conditions to the tab to be displayed only when it's needed.
Related PR: adobe/aem-cif-project-archetype#103
Related Issue
CIF-1321
How Has This Been Tested?
Manually.
Types of changes
Checklist: