Repository navigation
Frontend tests: read the composer shadow and palette seeds where #12800 left them - #12810
Merged
Merged
Conversation
… left them #12800 moved the composer's shadow into --composer-shadow, set per mode and per palette. Two frontend unit tests read the stylesheet in a shape that no longer holds: - find-in-page compared the composer's literal box-shadow with the find bar's; the composer now reads var(--composer-shadow). The test resolves a variable to its light :root value, which is what the composer paints in light mode. - color-themes read the first block opening :root[data-palette=...]:not(.dark), and Neon Cyberpunk now opens it twice (the --composer-shadow block comes first). The test reads every block the palette opens.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
Since #12800 merged,
Frontend build + bundle sanityandFrontend unit tests (Windows)fail on main (for example #12800's own run, and #12782's) with two frontend unit tests:Both reproduce on main (
6f268e6cc5).Which side is wrong
The tests. #12800 moved the composer's shadow into a
--composer-shadowvariable so toasts can share it, set once in:rootand overridden for dark mode and the Neon Cyberpunk palettes. The light value is unchanged (0 2px 8px -2px rgba(0, 0, 0, 0.16)), and so is what the composer paints. The two tests read the stylesheet in a shape that no longer holds:find-in-page.test.tsread a literalbox-shadowout of.unsloth-composer-surface, which is nowvar(--composer-shadow).color-themes.test.tsread only the first block opening:root[data-palette="neon-cyberpunk"]:not(.dark) {. Neon Cyberpunk now opens that selector twice, and the new--composer-shadowblock comes before the one holding the palette's seeds.Change
find-in-page.test.ts: when a rule'sbox-shadowis avar(--name), the test reads that variable's value from the light:rootblock, so it still compares the composer's real light shadow with the find bar's.color-themes.test.ts: reads every block the palette opens with that selector, not only the first.No product change.
Verification
node --experimental-strip-types --test tests/color-themes.test.ts tests/find-in-page.test.ts tests/toast-composer-shadow.test.ts: 2 failures on main, 173 passed on this branch.--composer-shadowblur to 30px fails the find bar test (its 14px blur is no longer wider than the composer's);--th-accentto its page colour (in the second block, which the old test never reached) fails the accent floor test with1.00:1.