Skip to content

feat: message hover and click behavior and modal #2352

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

Merged
merged 17 commits into from
Mar 28, 2024

Conversation

danzhaaspaypal
Copy link
Contributor

@danzhaaspaypal danzhaaspaypal commented Mar 4, 2024

Description

  • Ensure on message click a modal is opened up on the parent page
  • Modal should display the product and amount for the message that was clicked
  • Modal should lazy load modal.js upon click
  • If the messages component exists on the page, leverage the MessagesModal component instead
  • Ensure appropriate analytics are fired for the click event into the XO endpoint

Why are we making these changes? Include references to any related Jira tasks or GitHub Issues

Reproduction Steps (if applicable)

Screenshots (if applicable)

Dependent Changes (if applicable)

Groups who should review (if applicable)

❤️ Thank you!

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 78.04878% with 9 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (feature/dynamic-messaging@11989d5). Click here to learn what that means.

Files Patch % Lines
src/zoid/buttons/util.js 78.26% 5 Missing ⚠️
src/ui/buttons/props.js 66.66% 2 Missing ⚠️
src/zoid/buttons/component.jsx 83.33% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##             feature/dynamic-messaging    #2352   +/-   ##
============================================================
  Coverage                             ?   52.79%           
============================================================
  Files                                ?      106           
  Lines                                ?     2146           
  Branches                             ?      643           
============================================================
  Hits                                 ?     1133           
  Misses                               ?      910           
  Partials                             ?      103           
Flag Coverage Δ
jest 31.98% <0.00%> (?)
karma 52.28% <82.05%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@danzhaaspaypal danzhaaspaypal marked this pull request as ready for review March 18, 2024 21:01
@danzhaaspaypal danzhaaspaypal requested a review from a team as a code owner March 18, 2024 21:01
[FPTI_KEY.BUTTON_SESSION_UID]: buttonSessionID,
});

const modalInstance = await getModal(clientID, merchantID);
Copy link
Contributor

Choose a reason for hiding this comment

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

In the error scenario inside getModal that results in undefined being returned here. We may want to include a check against that before calling modalInstance.show() which would then throw another error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do we do if getModal is undefined, just not return anything?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. Something as simple as return modalInstance?.show() would work.

creditProductIdentifier,
}) => {
const { message, buttonSessionID } = props;
const amount = message?.amount;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this able to be directly included in the logger like the other fields instead of creating a variable that isn't really reused?

@danzhaaspaypal
Copy link
Contributor Author

@wsbrunson we're ready for you to take another look at this PR, at your convenience

@Seavenly Seavenly merged commit 0e7a439 into feature/dynamic-messaging Mar 28, 2024
2 of 4 checks passed
@Seavenly Seavenly deleted the feature/btn-msg-click-logic1 branch March 28, 2024 17:32
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