Skip to content

Conversation

@ard1498
Copy link
Collaborator

@ard1498 ard1498 commented Nov 26, 2025

Description

As per the concluded associate UI feature, this PR reflects the required changes to be able to read the associate properties container, "fd:associate".

Related Issue

FORMS-22032

How Has This Been Tested?

This has been verified e2e on a local cloud based setup, apart from the validation by existing tests and pipelines.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X ] I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [X ] 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.
  • [X ] I ran all tests locally and they pass.

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ore/components/util/AbstractFormComponentImpl.java 50.00% 4 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

Please add test cases and validate the schema changes, you can check the existing test suite

if (FormConstants.CHANNEL_PRINT.equals(this.channel) && resource != null) {
Resource associatePropertiesResource = resource.getChild(CUSTOM_ASSOCIATE_PROPERTY_WRAPPER);
if (associatePropertiesResource != null) {
AssociateProperties associateProperties = associatePropertiesResource.adaptTo(AssociateProperties.class);
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 an NPE check here. It shouldn’t occur due to continuous upgrade, but having a safeguard in place would still be helpful.

For example, if someone is using a very old add-on on cloud, this could potentially happen—even though the chances are quite low.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rismehta I am not sure where to put the NPE check? We already have a NPE check for "associateProperties" at line 618 before it's usage.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This import will be undefined

import com.adobe.cq.forms.core.components.models.form.print.associate.AssociateProperties

in case of old addon, you would have to add a safe check if this class is not present

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@ard1498 ard1498 requested a review from rismehta November 28, 2025 06:46
@ard1498
Copy link
Collaborator Author

ard1498 commented Nov 28, 2025

Please add test cases and validate the schema changes, you can check the existing test suite

@rismehta I have added a feasible test case covering majority part of the added code, but coverage is still failing. Can we take an exception here, since only 2 lines are remaining to be covered and there is no straightforward approach to cover because:
It requires the import of AssoicatePropertiesImpl class that is part of print-core which is already dependent on this module .i.e. af-core. If we do include that dependency it will cause cyclic dependency.

cc: @sufyanharoon

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

check comments

@ard1498 ard1498 requested a review from rismehta November 28, 2025 08:56
Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

RTC. Approved. Spec changes are already reviewed

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@ard1498 ard1498 merged commit e76276c into dev Nov 28, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants