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

feature: Make Main Modal events configurable via props #1590

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

annacv
Copy link
Contributor

@annacv annacv commented Aug 12, 2024

Pull request template

Currently, when some customers want to implement features without leaving the search engine (ex. opening pop-ups), their flow is broken due to the UserClickedOutOfMainModal event being fired.

Motivation and context

A recent example is Tous, trying to open a modal when the add2Cart button is clicked, or Carrefour, with their wishlist integration.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

  1. in Home.vue:
<MainModal
      :animation="modalAnimation"
      :openEvents="['UserClickedOpenX', 'UserOpenXProgrammatically', 'MyCustomXEvent']"
      :outOfModalClickEvent="null"
    >.........</MainModal>
  1. Check devTools events' props are updated accordingly.
  2. Change change x-modal styles to check that clicking out of the modal doesn't close it, + query & results are not being cleared (so the UserClickedOutOfMainModal event is not being fired):
.x-modal {
    width: 60% !important;
    left: 615px !important;
  }

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@annacv annacv requested a review from a team as a code owner August 12, 2024 10:28
@diegopf diegopf merged commit 60d630c into main Aug 13, 2024
4 checks passed
@diegopf diegopf deleted the feature/Configurable-events-main-modal branch August 13, 2024 15:33
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.

2 participants