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

Click Collection Configuration Validation #1216

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Click Collection Configuration Validation #1216

wants to merge 2 commits into from

Conversation

shammowla
Copy link
Collaborator

Description

Add a validation to configure so that it logs a warning if you specify a onBeforeLinkClickSend or download link qualifier with clickCollectionEnabled set to false.

Overview

Adds validation warnings when click collection configurations are provided but will be ignored due to clickCollectionEnabled: false. This helps developers identify potential configuration issues early.

Changes

  • Added new validateClickCollectionConfig.js module
  • Added validation for onBeforeLinkClickSend and downloadLinkQualifier when click collection is disabled
  • Added functional tests to verify warning behavior
  • Verified getLinkDetails functionality remains unaffected

Test Cases

  • Warns when onBeforeLinkClickSend provided with clickCollectionEnabled: false
  • Warns when custom downloadLinkQualifier provided with clickCollectionEnabled: false
  • No warning for default downloadLinkQualifier value
  • No warnings when clickCollectionEnabled: true
  • Verified getLinkDetails works regardless of clickCollectionEnabled setting

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

Copy link
Contributor

@jonsnyder jonsnyder left a comment

Choose a reason for hiding this comment

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

Good work

OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
// src/components/ActivityCollector/validateClickCollectionConfig.js
Copy link
Contributor

Choose a reason for hiding this comment

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

(non-blocking nitpick) Will you remove this duplicated license header?

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.

3 participants