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

feat(installer): implementation of snippet config getter #1378

Conversation

lauramargar
Copy link
Contributor

@lauramargar lauramargar commented Dec 28, 2023

Pull request template

Provide a method InterfaceX.getSnippetConfig() that returns the init params of the snippet for both cases of initialization:

  • window.initX
  • InterfaceX.init()

Customers, kams, devs, etc... are always asking us how to get the snippetConfig configuration of any setup. With this new method they can obtain the configuration quickly and easily, regardless of the way they initialized the project.

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-3012

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?

If you run the serve script in your local and run InterfaceX.getSnippetConfig() in the console of the devtools, you should obtain an object with the snippetConfig configuration.

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.

@lauramargar lauramargar requested a review from a team as a code owner December 28, 2023 11:24
@herrardo
Copy link
Contributor

🥳

Copy link
Contributor

@diegopf diegopf left a comment

Choose a reason for hiding this comment

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

Great job!

@diegopf diegopf merged commit a76e1b7 into main Dec 29, 2023
4 checks passed
@diegopf diegopf deleted the feature/EMP-3012-get-params-have-been-sent-to-the-snippet-in-any-case branch December 29, 2023 09:07
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