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

Added propositions option to sendEvent command to make display notifications easier #985

Closed
wants to merge 4 commits into from

Conversation

jonsnyder
Copy link
Contributor

Description

This PR adds a propositions option to the sendEvent command. This will be useful when doing top of page and bottom of page calls as it allows you to include the display notification along with the page view at the bottom of the page.

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.

if (propositions && propositions.length > 0) {
const propositionEventType =
event.getEventType() === "decisioning.propositionInteract" ||
event.getPropositionEventType() === "interact"
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) Change this to PropositionEventType.DISPLAY and PropositionEventType.INTERACT from src/components/Personalization/constants/propositionEventType.js.

({ id, scope, scopeDetails }) => ({ id, scope, scopeDetails })
),
propositionEventType: {
[propositionEventType]: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

What does the 1 mean?

);
});
});
// TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this TODO for? Is it "write a process destinations test?" Why was this test removed?

Copy link
Contributor

@ninaceban ninaceban left a comment

Choose a reason for hiding this comment

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

I'd like to have a test for the use case when there are both the propositions and _experience.decisioning.propositions passed in the same event. I would expect the propositions arrays to be merged and duplications excluded.

@jonsnyder
Copy link
Contributor Author

Closed in favor of #1036

@jonsnyder jonsnyder closed this Sep 21, 2023
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