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 restriction to only allow one customer account page render per extension #4489

Closed

Conversation

brianshen1990
Copy link

@brianshen1990 brianshen1990 commented Sep 20, 2024

WHY are these changes introduced?

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

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 Sep 20, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.02% (-0.07% 🔻)
8391/11492
🟡 Branches
69.57% (-0% 🔻)
4095/5886
🟡 Functions
71.75% (-0.12% 🔻)
2179/3037
🟡 Lines
73.36% (-0.07% 🔻)
7940/10823
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / marketing_activity.ts
25% (-75% 🔻)
100%
0% (-100% 🔻)
25% (-75% 🔻)
🟢
... / conf-store.ts
100%
90.24% (-2.44% 🔻)
100% 100%
🟡
... / session.ts
76.92% (-1.34% 🔻)
64.77% (-2.25% 🔻)
90% (-1.67% 🔻)
77.17% (-1.19% 🔻)
🟡
... / exchange.ts
75.44% (-7.89% 🔻)
77.78%
80% (-10% 🔻)
75% (-8.05% 🔻)
🟢
... / session.ts
82.86% (-0.48% 🔻)
83.87% 71.43%
81.82% (-0.53% 🔻)

Test suite run success

1890 tests passing in 857 suites.

Report generated by 🧪jest coverage report action from 0022560

@brianshen1990 brianshen1990 changed the title only allow one customer account page render Add restriction to only allow one customer account page render Sep 20, 2024
@brianshen1990 brianshen1990 self-assigned this Sep 20, 2024
@brianshen1990 brianshen1990 added the gsd:42302 Customer accounts supports markets label Sep 20, 2024
@brianshen1990 brianshen1990 marked this pull request as ready for review September 20, 2024 01:40

This comment has been minimized.

@brianshen1990 brianshen1990 changed the title Add restriction to only allow one customer account page render Add restriction to only allow one customer account page render per extension Sep 20, 2024
@brianshen1990 brianshen1990 force-pushed the only-allow-one-customer-account-page-render branch from f8780d0 to 27aad0d Compare September 20, 2024 01:44
Copy link
Contributor

@lihaokx lihaokx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lihaokx lihaokx left a comment

Choose a reason for hiding this comment

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

LGTM

We may also need the gating on the BED. Since if devs using earlier version cli, the error message is not shown.

Copy link
Contributor

@jrrafols jrrafols left a comment

Choose a reason for hiding this comment

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

LGTM in general. Left one comment around wording, but code looks good otherwise. Also, you may want to get someone from the CLI team to 👀 this PR as well just to make sure they're aligned with the change.
🎩 ✅

@brianshen1990 brianshen1990 force-pushed the only-allow-one-customer-account-page-render branch from 31dc17f to 0022560 Compare September 23, 2024 20:55
@jrrafols
Copy link
Contributor

Hey @jrrafols you have created CLI-related PRs before. Do you know someone from the CLI team that I can assign to review this? thanks

I think @Shopify/app-ui might be the team to ping on this? You can also drop into #help-cli and ask for a review there.

Copy link
Contributor

@alfonso-noriega alfonso-noriega left a comment

Choose a reason for hiding this comment

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

@brianshen1990, the CLI is trying to move away as much as possible from extension specific logic like this (correct me if wrong @isaacroldan ). And, as mentioned by @lihaokx, having the validation in the CLI only applies to developers running the release with this changes.
IMO this validation should live in the BE, specifically in the group definition. The requires property allows to define a list of targets valid to be deployed with the current one and it can be easily extended to define a list of targets which it can not coexist.
FYI @vividviolet

@Shopify Shopify deleted a comment from vividviolet Sep 25, 2024
@Shopify Shopify deleted a comment from vividviolet Sep 25, 2024
@Shopify Shopify deleted a comment from alfonso-noriega Sep 25, 2024
@Shopify Shopify deleted a comment from jrrafols Sep 25, 2024
@Shopify Shopify deleted a comment from deannatron Sep 25, 2024
@Shopify Shopify deleted a comment from lihaokx Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsd:42302 Customer accounts supports markets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants