feat(TWO-25326): unify Luma order-intent checking UI with the other plugins - #329
Merged
Merged
Conversation
The order-intent check looked different on every plugin. Luma showed a wordless spinner while it ran, then stated an approval in brand blue, a decline in a warm red, and an error only as a checkout toast. Converged on the shared target: the spokes figure with the sentence "Checking availability" beside it while the check runs, and all three outcomes — approved, declined, errored — in one bordered box carrying the semantic palette (success green, danger red, neutral for an error), with the intent message alone inside it and no title above it. Also clears the previous verdict as a new check STARTS rather than when its answer arrives. The company-change subscriptions did not cover that: a re-render re-applying the captured company, or a repeat pick of the company already in the field, writes unchanged values and knockout notifies nobody — so the previous company's approval sat on screen for the whole of the next request. The specs pinning the "cleared at start" rule use an observable with real knockout's equality semantics, because the AMD harness's double notifies on every write and would have made that assertion vacuous. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
Adversarial self-review — round 1, cleanReviewed the full diff against No findings. Specifically checked and confirmed:
The clear-at-start behaviour is mutation-checked: removing the call fails exactly one spec, so that assertion is not vacuous.
Review performed by Claude. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Unifies the order-intent checking UI on Luma with the other three plugins (TWO-25326).
Before, Luma showed a wordless spinner while the check ran, then stated an approval in the module's brand blue, a decline in a warm red, and an error only as a checkout toast. Each plugin looked different.
Now:
images/loader.gif, already shipped) with the sentence "Checking availability" beside it. Translated in every locale this module ships (nb_NO, nl_NL, sv_SE); the retiredChecking companyrow is removed from all of them. The visible text names therole="status"region, so the figure carriesaria-hiddenand the oldaria-labelis gone.Why (3) was actually broken
The company-change subscriptions looked like they covered it, and they do not. They fire when a company observable changes; a check can start with those observables already holding the same values — a re-render re-applying the captured company, or a repeat pick of the company already in the field — and knockout notifies nobody. In exactly those cases the previous company's approval stayed on screen for the whole of the next request, under a spinner checking something else.
Tests
npm run test:js— 29 suites, 383 tests, green. New/changed coverage:aria-labelgone, and every shipped locale CSV carries a non-stub translation of the new string (asserted against the CSVs on disk, so a locale added later is covered without editing the spec)text:-bound message and no headingSCHEMA_ERROR's per-field errors still go to the fieldsMutation-checked: removing the clear-at-start call fails exactly one spec.
Notes
The palette values match the reference box style being normalised on PrestaShop in the same batch, so a buyer meeting two of the four plugins reads the same colour for the same outcome. No brand overlay styles these classes, so nothing downstream is silently overridden.