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

fix: Snippet config extra params reactivity #1628

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

annacv
Copy link
Contributor

@annacv annacv commented Sep 30, 2024

Pull request template

This PR checks if the extra params object has really changed to avoid unnecessary event emissions.

Motivation and context

In some customers, when a snippetConfig callback is executed, ExtraParamsProvided and ExtraParamsChanged events are fired even if they have not changed (and, as a consequence all the rest of the chained events that react to ExtraParamsChanged event emission).

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: RST-2269

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?

An open PR can be used to see the implementation when a callback is executed & check:

  • No events are emitted if the extraParams object has not changed
  • No unnecessary endpoint calls (regarding chained events).

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 September 30, 2024 11:45
@diegopf diegopf merged commit c87788a into main Oct 3, 2024
4 checks passed
@diegopf diegopf deleted the bugfix/Snippet-config-extra-params-reactivity branch October 3, 2024 11:43
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