Skip to content

feat(print-properties): Adding dorContainer in each component and pageTemplate in FormContainer and new print specific components #1567

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

Open
wants to merge 571 commits into
base: dev
Choose a base branch
from

Conversation

DhruvSharma-845
Copy link

@DhruvSharma-845 DhruvSharma-845 commented Mar 27, 2025

Description

  • Adding pageTemplate in FormContainer to describe master page related properties for DoR.
  • Adding dorContainer in each Component to describe print related properties for DoR.
  • Print specific properties will be exported in CRISPR json only when present in JCR(i.e. in case of print only).
  • Adding new components for print: PageSet, PageArea, Content, Medium and Proto. Keeping the implementations in a separate module.

Related Issue

Motivation and Context

It will enable the support for print related properties in CRISPR json(mainly layout and style related properties).

How Has This Been Tested?

UTs have been added.

Screenshots (if appropriate):

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:

  • I have signed the Adobe Open Source CLA.
  • 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.

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.22%. Comparing base (42562b2) to head (8a3b3e8).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #1567      +/-   ##
============================================
- Coverage     82.32%   82.22%   -0.11%     
- Complexity     1000     1008       +8     
============================================
  Files           108      108              
  Lines          2603     2633      +30     
  Branches        370      377       +7     
============================================
+ Hits           2143     2165      +22     
- Misses          272      278       +6     
- Partials        188      190       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DhruvSharma-845 DhruvSharma-845 changed the title feat(print-properties): Adding dorContainer in each component and pageTemplate in FormContainer and new print specific components feat(print-properties): RTC - Adding dorContainer in each component and pageTemplate in FormContainer and new print specific components Mar 27, 2025
@DhruvSharma-845 DhruvSharma-845 changed the title feat(print-properties): RTC - Adding dorContainer in each component and pageTemplate in FormContainer and new print specific components feat(print-properties): Adding dorContainer in each component and pageTemplate in FormContainer and new print specific components Mar 27, 2025
@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 99 96 96 75

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 86 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
page-has-heading-one moderate
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@DhruvSharma-845 DhruvSharma-845 self-assigned this Mar 27, 2025
@DhruvSharma-845 DhruvSharma-845 added enhancement New feature or request java Pull requests that update Java code labels Mar 27, 2025
@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 88 96 96 75

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 99 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
page-has-heading-one moderate
target-size serious

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
page-has-heading-one moderate
target-size serious

@@ -0,0 +1,21 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add these interfaces in a different package inside form

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
page-has-heading-one moderate
target-size serious

@JsonIgnore
public Map<String, Object> getDorContainer() {
if (resource != null) {
Resource dorContainerResource = resource.getChild("fd:dorContainer");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rismehta : Here I am assuming dorContainer node will be named as fd:dorContainer in JCR, keeping it in consistency with fd:rules and 'fd:events. I hope it is okay.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take this in spec review meeting

return customDorProperties;
}

private Map<String, Object> getPageTemplate() {
if (resource != null) {
Resource pageTemplateResource = resource.getChild("fd:pagetemplate");
Copy link
Author

@DhruvSharma-845 DhruvSharma-845 Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rismehta : pageTemplate node is assumed to be persisted with name fd:pageTemplate. I hope it is fine.

@@ -126,14 +128,14 @@ public static void testSchemaValidation(@NotNull Object model) {
// create an instance of the JsonSchemaFactory using version flag
JsonSchemaFactory schemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);
try {
InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.14.2/adaptive-form.schema.json");
InputStream schemaStream = Utils.class.getResourceAsStream("/schema/0.15.1/adaptive-form.schema.json");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rismehta : Have added new schema files versioned 0.15.1. Also, have updated version number here in schema validation. Please let me know if anything else needs to be done w.r.t. new schema

@@ -52,6 +52,6 @@
"grammar": "json-formula-1.0.0",
"version": "1.0.0"
},
"adaptiveform": "0.14.2",
"adaptiveform": "0.15.1",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rismehta :
Updating version number here in test baseline files is breaking a PR check. What is the right way to update this files?

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 87 96 96 75

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@github-actions github-actions bot force-pushed the print-core-components-models branch from 0f90aa9 to e6fcb2b Compare May 13, 2025 06:07
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@vdua
Copy link
Collaborator

vdua commented May 13, 2025

I have one doubt regarding the dorContainer. I thought the dorContainer properties will come with different View (not author/publish) ? I do not see that change here ?

@DhruvSharma-845
Copy link
Author

DhruvSharma-845 commented May 13, 2025

I have one doubt regarding the dorContainer. I thought the dorContainer properties will come with different View (not author/publish) ? I do not see that change here ?

I have added @JsonView annotation on getDorContainer method. Please refer here: https://github.com/adobe/aem-core-forms-components/pull/1567/files#diff-83ed79b144226c70d6b93ceaa9b25d5d243edacab1730e932f106c5e02a2df0cR84

I took the inspiration from getDorProperties method: https://github.com/adobe/aem-core-forms-components/pull/1567/files#diff-83ed79b144226c70d6b93ceaa9b25d5d243edacab1730e932f106c5e02a2df0cL73

@vdua
Copy link
Collaborator

vdua commented May 14, 2025

I have one doubt regarding the dorContainer. I thought the dorContainer properties will come with different View (not author/publish) ? I do not see that change here ?

I have added @JsonView annotation on getDorContainer method. Please refer here: https://github.com/adobe/aem-core-forms-components/pull/1567/files#diff-83ed79b144226c70d6b93ceaa9b25d5d243edacab1730e932f106c5e02a2df0cR84

I took the inspiration from getDorProperties method: https://github.com/adobe/aem-core-forms-components/pull/1567/files#diff-83ed79b144226c70d6b93ceaa9b25d5d243edacab1730e932f106c5e02a2df0cL73

Sorry. Missed that. Looks okay to me.

Copy link
Collaborator

@vdua vdua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Ensure

  • the tests pass before merging
  • use squash and merge rather than adding these 571 commits to the repo.

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants