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 feature to have custom src per account #41

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

wender
Copy link
Contributor

@wender wender commented Jul 11, 2023

What problem is this solving?

When you have different accounts using the same theme and need different URLs

How to test it?

In your theme, use the following syntax for the iframe.

  "iframe#logout": {
    "props": {
      "src": "//www.mywebsiteprod.com/logout",
      "srcAccount": {
        "mywebsiteprod": "//www.mywebsite.com/logout",
        "mywebsiteqa": "//qa.mywebsite.com/logout"
      },
      "onLoad": "setTimeout(() => {window.location.href='/'}, 5000)",
      "className": "iframeLogout",
      "id": "iframeLogout"
    }
  },

It will always fallback to the src if the srcAccount is incorrect.

@wender wender requested review from a team as code owners July 11, 2023 02:59
@wender wender requested review from georgebrindeiro and removed request for a team July 11, 2023 02:59
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Jul 11, 2023

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@wender wender requested review from filipewl, icazevedo and lucasfp13 and removed request for a team July 11, 2023 02:59
Copy link

@georgebrindeiro georgebrindeiro left a comment

Choose a reason for hiding this comment

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

LGTM

@wender wender merged commit 0afce7b into master Jul 11, 2023
1 of 3 checks passed
@wender wender deleted the feature/srcAccount-prop branch July 11, 2023 13:06
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Jul 11, 2023

Your PR has been merged! App is being published. 🚀
Version 0.6.0 → 0.7.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.iframe@0.7.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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