Skip to content

Update syntax of contrast-color() function on marker popovers, ensure e2e test works - #1062

Merged
mdo merged 1 commit into
mainfrom
mdo/marker-color-contrast
Aug 6, 2026
Merged

Update syntax of contrast-color() function on marker popovers, ensure e2e test works#1062
mdo merged 1 commit into
mainfrom
mdo/marker-color-contrast

Conversation

@mdo

@mdo mdo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Aug 6, 2026 5:06am
pierre-docs-diffshub Ready Ready Preview Aug 6, 2026 5:06am
pierre-docs-trees Ready Ready Preview Aug 6, 2026 5:06am
pierrejs-diff-demo Ready Ready Preview Aug 6, 2026 5:06am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7dfa7b383

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

// contrast-color() always resolves to pure black or white, so any other
// value means the declaration was invalid and `color` fell back to the
// inherited editor foreground.
if (sample!.supportsContrastColor) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exercise the supported contrast-color branch

In the inspected E2E configuration, the only project is the Chromium bundled with @playwright/test 1.51.1 (packages/diffs/test/e2e/playwright.config.ts:43-47, pnpm-workspace.yaml:65), which predates Chromium support for contrast-color(). Therefore this condition is false in every CI run and the new assertion is always skipped, so restoring the invalid two-argument declaration would still leave the regression test green. Run this check in a browser/channel that supports the function or add a test that actually exercises the supported declaration path.

Useful? React with 👍 / 👎.

@necolas

necolas commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@mdo This agent run wrote some helpers to fill the css feature gap in the test harness #1061. Might be worth incorporating?

@mdo

mdo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@necolas I'm down for either PR! Left a code comment on yours about the fallback intent here for the CSS vars.

@necolas

necolas commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Yeah interesting that the model didn't infer that! I'd point your agent at the other branch, suggest it adds a similar fallback test that we keep while the pw chromium lacks support for that CSS. Not a blocker on merging this fix

@amadeus amadeus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me! annoying lil syntax issue there. Not sure about the validity of the codex review though

@mdo
mdo merged commit 4b0e439 into main Aug 6, 2026
8 checks passed
@mdo
mdo deleted the mdo/marker-color-contrast branch August 6, 2026 14:53
@mdo

mdo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Will follow up with another iteration that addresses comments here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants