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

extension targeting preloads #4652

Merged
merged 3 commits into from
Oct 21, 2024
Merged

extension targeting preloads #4652

merged 3 commits into from
Oct 21, 2024

Conversation

cpeddecord
Copy link
Contributor

@cpeddecord cpeddecord commented Oct 15, 2024

WHY are these changes introduced?

closes https://github.com/Shopify/checkout-web/issues/39215

addresses part of https://github.com/Shopify/shopify/issues/545531 which implements extension.targeting.preloads as defined in this PR.

We need to introduce a preloading concept for UI extensions to statically define URLs preloads ahead of time for security and performance.

[[extensions.targeting]]
target = "purchase.checkout.chat.render"

[extensions.targeting.preloads]
chat = "/url"

WHAT is this pull request doing?

adding needed schemas to support the above static configurations for UI extensions.

How to test your changes?

pnpm run deploy should insert the records correctly.

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

@cpeddecord cpeddecord added the #gsd:39953 Chat apps in checkout pages label Oct 15, 2024
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/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

Copy link
Contributor

github-actions bot commented Oct 15, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.53% (+0.01% 🔼)
8404/11587
🟡 Branches
69.03% (+0.03% 🔼)
4120/5968
🟡 Functions 71.98% 2199/3055
🟡 Lines
72.8% (+0.01% 🔼)
7948/10917

Test suite run success

1918 tests passing in 871 suites.

Report generated by 🧪jest coverage report action from 851867c

Copy link
Contributor

@rcaplanshopify rcaplanshopify left a comment

Choose a reason for hiding this comment

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

Code LGTM!

@cpeddecord cpeddecord marked this pull request as ready for review October 16, 2024 18:58
@cpeddecord cpeddecord requested a review from a team as a code owner October 16, 2024 18:58

This comment has been minimized.

Copy link

@jffortier jffortier left a comment

Choose a reason for hiding this comment

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

Small things in the test, otherwise all good!

Comment on lines 1 to 5
---
'@shopify/app': patch
---

added extensions.targeting.preloads
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to run pnpm changeset add from the root, if you run it inside packages/app it won't work and adds a few extra files. (You'd need to delete packages/app/.changeset)

@cpeddecord cpeddecord requested a review from a team as a code owner October 21, 2024 15:29
@cpeddecord cpeddecord enabled auto-merge October 21, 2024 15:33
@cpeddecord cpeddecord added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 4830e15 Oct 21, 2024
@cpeddecord cpeddecord deleted the cp/preloads branch October 21, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:39953 Chat apps in checkout pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants