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

Spike: Refactor style extraction mechanism #10419

Open
danielmx-dev opened this issue Feb 20, 2025 · 0 comments
Open

Spike: Refactor style extraction mechanism #10419

danielmx-dev opened this issue Feb 20, 2025 · 0 comments

Comments

@danielmx-dev
Copy link
Contributor

danielmx-dev commented Feb 20, 2025

Description

The current style extraction mechanism has a couple drawbacks:

Acceptance criteria

  • Define a solution that help us overcome the listed drawbacks.
  • A proof of concept is desirable.

Dev notes

  • Can we centralize the style extraction by defining a global store/Provider that will emit updates to react to changes?
  • We could perform the style incrementally, so we can render the stripe form as soon as possible, then re-compute the styles once we make sure all CSS is fully loaded.
    • We can also react to other events, for example, in the site editor we can monitor if colors/background change and react accordingly.
  • For classic checkout, we can call elements.update( { appearance } ); when styles change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants