You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pass focus color and blended background to Stripe Link - #3582
Part of Strategy11/formidable-pro#6864 (items 2 and 3 only, Lite side).
What was broken
Stripe Link's "Send code to email instead", "Change" and kebab menu used Stripe's default blue, because loadStripeLinkElements() never set colorPrimary.
maybeAdjustColorForStripe() converted rgba to hex by dropping the alpha, so a transparent or translucent field background reached Stripe as solid #ffffff.
What changed
colorPrimary is now the style's active (focus) border color. get_appearance_rules() already builds a .Input:focus rule, so it now also carries borderColor, which makes Stripe's focus border match the form style too. Chosen over the submit button color because that would need a new lookup, and the focus color is the style's accent.
Stripe's Appearance API variables don't take rgba (the existing comment says so), so rgba colors are now blended over the first solid background behind the card element, falling back to white, instead of dropping the alpha. A partly transparent ancestor is skipped, so the result is approximate there.
frmstrp.min.js regenerated with the repo's npm run minimize command (unchanged source reproduces the committed min byte for byte).
Not in this PR
Item 1 (web fonts via fonts on stripe.elements()), item 4 (deferred intent, needs a design decision), and the matching formidable-stripe add-on change.
How it was verified
A node harness around the extracted maybeAdjustColorForStripe(): red first (translucent white over black returned #ffffff, fully transparent returned #ffffff), green after the change (#1a1a1a and the backdrop color). Opaque rgba and hex pass through unchanged.
PHPUnit assertion added to test_empty_style_context_has_all_appearance_keys for the new .Input:focus key. Not run locally. CI's PHPUnit job fails before any test runs (Could not read "phpunit9.xml", deleted on master in 6a6ad92, also fails on other PRs), so this assertion has not been run.
No live Stripe Link render and no before/after screenshot yet. The Link iframe needs a real publishable key and client secret.
Stripe Link used its default blue because no colorPrimary was set, and
a translucent field background became a solid color when its alpha was
dropped. Take colorPrimary from the style's active border color and
blend rgba colors over the solid background behind the field.
Part of Strategy11/formidable-pro#6864
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
We reviewed changes in 40f899d...3119ee1 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
@Crabcyborg I can't finish this one without a decision from you.
Blocked: a before/after screenshot of Stripe Link. The Link controls only show up with a real Stripe key, and I don't have one. I did not send this to Franky, because a screenshot is required for style changes.
PHPUnit: I added run tests. The job fails before any test runs: Could not read "phpunit9.xml". Commit 6a6ad92 deleted that file on master, but phpunit.yml still uses it. Other PRs fail the same way, so I left it alone.
DeepSource: the assertArrayHasKey warning is a false positive. The same file already calls it three times.
Analysis checks: all passed on this commit (3119ee1) on Oct 17.
Pick one and re-add vivi-pickup with a note:
Send it to Franky without a Link screenshot.
Give me a Stripe test publishable key path, and I'll capture one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of Strategy11/formidable-pro#6864 (items 2 and 3 only, Lite side).
What was broken
loadStripeLinkElements()never setcolorPrimary.maybeAdjustColorForStripe()converted rgba to hex by dropping the alpha, so a transparent or translucent field background reached Stripe as solid#ffffff.What changed
colorPrimaryis now the style's active (focus) border color.get_appearance_rules()already builds a.Input:focusrule, so it now also carriesborderColor, which makes Stripe's focus border match the form style too. Chosen over the submit button color because that would need a new lookup, and the focus color is the style's accent.frmstrp.min.jsregenerated with the repo'snpm run minimizecommand (unchanged source reproduces the committed min byte for byte).Not in this PR
fontsonstripe.elements()), item 4 (deferred intent, needs a design decision), and the matching formidable-stripe add-on change.How it was verified
maybeAdjustColorForStripe(): red first (translucent white over black returned#ffffff, fully transparent returned#ffffff), green after the change (#1a1a1aand the backdrop color). Opaque rgba and hex pass through unchanged.test_empty_style_context_has_all_appearance_keysfor the new.Input:focuskey. Not run locally. CI's PHPUnit job fails before any test runs (Could not read "phpunit9.xml", deleted on master in 6a6ad92, also fails on other PRs), so this assertion has not been run.🤖 Generated with Claude Code