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

Show warnings in action editors when components are excluded from the build #450

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

Conversation

shammowla
Copy link
Contributor

Description

Added alerts to notify users when required components are disabled:

  • applyPropositions.jsx: Alert for disabled Personalization component
  • setConsent.jsx: Alert for disabled Consent component
  • sendStreamingMediaEvent.jsx: Alert for disabled Streaming Media component
  • createMediaTracker.jsx: Alert for disabled Media Analytics Bridge component
  • evaluateRulesets.jsx: Alert for disabled Rules Engine component

Each action view will now display a red alert message using React Spectrum's InlineAlert
component when its required component is disabled in the extension configuration.

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.
  • I've updated the schema in extension.json or no changes are necessary.
  • My change requires a change to the documentation.

@shammowla shammowla changed the base branch from main to custom_build_config January 9, 2025 21:05
@carterworks
Copy link
Contributor

carterworks commented Jan 13, 2025

Should we also show a warning in the send event action when the activity collection component is disabled?

Jon's PR #449 will remove the sections and replace them with a "this component is disabled" message. We should unify on one strategy and messaging.

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.

You missed:

  • subscribeRulesetItem event - rulesEngine
  • eventMergeId dataElement - eventMerge
  • resetEventMergeId action - eventMerge

@@ -17,8 +17,13 @@ import textField from "../forms/textField";
import objectArray from "../forms/objectArray";
import dataElement from "../forms/dataElement";
import comboBox from "../forms/comboBox";
import ExcludedComponentNotice from "../forms/excludedComponentNotice";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this lowercase like the others? "excludedComponentNotice"

@@ -360,6 +359,10 @@ const SetConsent = () => {
const orgId = instanceSettings?.orgId ?? initInfo.company.orgId;
return (
<FormElementContainer>
<ExcludedComponentNotice
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you need to use the componentDependencyAlert directly. This view has not been converted to the form component system yet so it just uses regular React components. (Be sure to pass the initInfo. The React component needs this parameter)

@@ -45,6 +46,10 @@ const evaluateRulesetsForm = form(
wrapGetSettings,
},
[
ExcludedComponentNotice({
requiredComponent: "decisioningEngine",
Copy link
Contributor

Choose a reason for hiding this comment

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

This has been renamed to rulesEngine


const createMediaTrackerForm = form({}, [
ExcludedComponentNotice({
requiredComponent: "legacyMediaAnalytics",
Copy link
Contributor

Choose a reason for hiding this comment

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

This has been renamed to mediaAnalyticsBridge

@@ -360,6 +359,10 @@ const SetConsent = () => {
const orgId = instanceSettings?.orgId ?? initInfo.company.orgId;
return (
<FormElementContainer>
<ExcludedComponentNotice
requiredComponent="privacy"
Copy link
Contributor

Choose a reason for hiding this comment

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

This has been renamed to consent

<Content>
This action requires the {componentLabel} component which is currently
disabled in the extension configuration. Please enable it to use this
action.
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of "Please enable it..." how about, "If you do not enable the component in the extension configuration, this will not work."

@@ -27,6 +27,7 @@ import dataElement from "../forms/dataElement";
import mediaStates from "./constants/mediaStates";
import mediaContentTypes from "./constants/mediaContentTypes";
import mediaShowTypes from "./constants/mediaShowTypes";
import ExcludedComponentNotice from "../forms/excludedComponentNotice";
Copy link
Contributor

Choose a reason for hiding this comment

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

lowercase e

@jonsnyder
Copy link
Contributor

Also, rebase with main and resolve the conflicting package-lock

@shammowla shammowla changed the base branch from custom_build_config to main January 21, 2025 17:47
@shammowla shammowla force-pushed the PDCL-12822 branch 2 times, most recently from c495ee8 to 0cfaf99 Compare January 21, 2025 18:12
@jonsnyder
Copy link
Contributor

Should we also show a warning in the send event action when the activity collection component is disabled?

Jon's PR #449 will remove the sections and replace them with a "this component is disabled" message. We should unify on one strategy and messaging.

When activity collection component is disabled, sendEvent still works. This does bring up a good point though because for example personalization fields in the send event action aren't going to work when personalization component is disabled.

Regarding your second suggestion to replace the form with a this component is disabled. Let's discuss when we review this tomorrow during standup.

@shammowla shammowla force-pushed the PDCL-12822 branch 2 times, most recently from 64fec03 to 0cfaf99 Compare January 21, 2025 18:24
.gitignore Outdated
@@ -8,4 +8,3 @@ coverage
.parcel-cache
.token-cache.json
extension.json
.DS_Store
Copy link
Contributor

Choose a reason for hiding this comment

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

This should stay in the .gitignore

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