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

Add vanity url support for embedded URLs #1862

Merged
merged 3 commits into from
May 1, 2023

Conversation

joshuamsager
Copy link
Contributor

@joshuamsager joshuamsager commented Apr 27, 2023

Currently, only cdn.shopify.com links are rewritten when they are embedded in CSS/JS. This change also supports links that are served off of the shop's host.

WHY are these changes introduced?

Bugfix; without this, shops with vanity domains on their shop will have trouble loading their scripts locally.

Part of: #1859

WHAT is this pull request doing?

Simple gsub

How to test your changes?

Visit a shop with query param: ?force_vanity_url=true

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@github-actions
Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/theme-code-tools
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@joshuamsager joshuamsager force-pushed the add-local-dev-support-vanity-urls branch from f00b307 to 48e59c5 Compare April 27, 2023 17:00
@joshuamsager joshuamsager force-pushed the add-local-dev-support-vanity-urls branch 3 times, most recently from 957beeb to 2c0df3f Compare April 27, 2023 17:16
@joshuamsager joshuamsager force-pushed the add-local-dev-support-vanity-urls branch from 2c0df3f to 809b697 Compare April 27, 2023 17:17
@github-actions
Copy link
Contributor

github-actions bot commented Apr 27, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 73.17% 4378/5983
🟡 Branches 69.56% 2013/2894
🟡 Functions 70.68% 1157/1637
🟡 Lines 74.58% 4183/5609

Test suite run success

1131 tests passing in 548 suites.

Report generated by 🧪jest coverage report action from 1eda576

@joshuamsager joshuamsager marked this pull request as ready for review April 27, 2023 17:29
@github-actions
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

Copy link
Contributor

@yknx4 yknx4 left a comment

Choose a reason for hiding this comment

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

lgtm. lets wait for the owners approval

Copy link
Contributor

@amcaplan amcaplan left a comment

Choose a reason for hiding this comment

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

Didn't 100% figure out how to 🎩 but the code change is small and the test is pretty clear. I assume @yknx4 already did due diligence on the completeness of the fix.

@joshuamsager joshuamsager added this pull request to the merge queue May 1, 2023
Merged via the queue into main with commit bfe1184 May 1, 2023
1 check passed
@joshuamsager joshuamsager deleted the add-local-dev-support-vanity-urls branch May 1, 2023 13:38
@shopify-shipit shopify-shipit bot temporarily deployed to nightly May 1, 2023 13:38 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production May 2, 2023 12:19 Inactive
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.

None yet

4 participants