-
Notifications
You must be signed in to change notification settings - Fork 265
feat: add ec_color_scheme query parameter to embedded checkouts #157
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
base: main
Are you sure you want to change the base?
feat: add ec_color_scheme query parameter to embedded checkouts #157
Conversation
Allow hosts to specify color scheme preference (light/dark/auto) when loading embedded checkout, enabling visual consistency with host apps.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Breaking Changes / Removal Justification(Please provide a detailed technical and strategic rationale here for why this |
igrigorik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more suggestions.
|
|
||
| - By default, the Embedded Checkout **SHOULD** respect the buyer's system | ||
| color scheme preference and listen for changes to update accordingly | ||
| - When `ec_color_scheme` is explicitly provided, it **SHOULD** override the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - When `ec_color_scheme` is explicitly provided, it **SHOULD** override the | |
| - When `ec_color_scheme` is explicitly provided, it **MUST** override the |
| color scheme preference and listen for changes to update accordingly | ||
| - When `ec_color_scheme` is explicitly provided, it **SHOULD** override the | ||
| system preference and be applied immediately upon load | ||
| - The color scheme is a hint; businesses **MAY** ignore unsupported values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - The color scheme is a hint; businesses **MAY** ignore unsupported values | |
| - Businesses **MAY** ignore unsupported values |
|
|
||
| **Default Behavior:** | ||
|
|
||
| When `ec_color_scheme` is not provided, the Embedded Checkout **SHOULD** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When `ec_color_scheme` is not provided, the Embedded Checkout can
| **Default Behavior:** | ||
|
|
||
| When `ec_color_scheme` is not provided, the Embedded Checkout **SHOULD** | ||
| respect the buyer's system preference via the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| respect the buyer's system preference via the | |
| use the buyer's system preference via the |
Keep this paragraph as "can", we define the must/should below.
| - By default, the Embedded Checkout **SHOULD** respect the buyer's system | ||
| color scheme preference and listen for changes to update accordingly | ||
| - When `ec_color_scheme` is explicitly provided, it **SHOULD** override the | ||
| system preference and be applied immediately upon load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| system preference and be applied immediately upon load | |
| system preference, be applied immediately upon load, and be enforced | |
| for the duration of the session. |
Description
Allow hosts to specify color scheme preference (light/dark/auto) when loading embedded checkout, enabling visual consistency with host apps.
Type of change
Please delete options that are not relevant.
functionality to not work as expected, including removal of schema files
or fields)
Is this a Breaking Change or Removal?
If you checked "Breaking change" above, or if you are removing any schema
files or fields:
!to my PR title (e.g.,feat!: remove field).Checklist