') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); feat(ui): Dev mode banner updates by alexcarpenter · Pull Request #8917 · clerk/javascript · GitHub
Skip to content

feat(ui): Dev mode banner updates - #8917

Merged
wobsoriano merged 17 commits into
mainfrom
carp/dev-mode-update
Jun 23, 2026
Merged

feat(ui): Dev mode banner updates#8917
wobsoriano merged 17 commits into
mainfrom
carp/dev-mode-update

Conversation

@alexcarpenter

@alexcarpenteralexcarpenter commented Jun 18, 2026

Copy link
Copy Markdown
Member

Description

Updates dev mode banner implementation.

BEFOREAFTER
Screenshot 2026-06-23 at 9 09 17 AMScreenshot 2026-06-23 at 9 09 43 AM
Screenshot 2026-06-23 at 9 10 22 AMScreenshot 2026-06-23 at 9 10 05 AM
Screenshot 2026-06-23 at 9 10 53 AMScreenshot 2026-06-23 at 9 11 12 AM
Screenshot 2026-06-23 at 9 11 43 AMScreenshot 2026-06-23 at 9 11 35 AM

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Bug Fixes

    • Updated development mode indicator styling for improved visual presentation across checkout, payment method, and card components.
  • Style

    • Refined development mode overlay rendering with updated SVG-based grid display.
    • Adjusted development mode notice spacing and alignment for better visual consistency.
  • Tests

    • Added test coverage for development mode indicator styling and visibility.

@changeset-bot

changeset-botBot commented Jun 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59af36

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
NameType
@clerk/uiPatch
@clerk/chrome-extensionPatch
@clerk/swingsetPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 18, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreview, CommentJun 23, 2026 1:18pm
swingsetReadyReadyPreview, CommentJun 23, 2026 1:18pm

Request Review

@coderabbitai

coderabbitaiBot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2ebcdcb2-30d4-4eb1-9380-5f22c441343d

📥 Commits

Reviewing files that changed from the base of the PR and between a536a0d and c59af36.

📒 Files selected for processing (9)
  • .changeset/clear-adults-pump.md
  • packages/ui/src/components/Checkout/CheckoutForm.tsx
  • packages/ui/src/components/PaymentMethods/TestPaymentMethod.tsx
  • packages/ui/src/elements/Card/CardClerkAndPagesTag.tsx
  • packages/ui/src/elements/Card/CardFooter.tsx
  • packages/ui/src/elements/Card/CardRoot.tsx
  • packages/ui/src/elements/Card/__tests__/CardRoot.test.tsx
  • packages/ui/src/elements/DevModeNotice.tsx
  • packages/ui/src/elements/Navbar.tsx

📝 Walkthrough

Walkthrough

Refactors DevModeOverlay from a repeating-linear-gradient approach to an SVG grid mask with DEV_MODE_GRID constants, removes its gradient prop, and updates all consumers (CheckoutForm, TestPaymentMethod, CardClerkAndPagesTag). Adds flush-mode CSS overrides in CardRoot to hide the overlay and center the notice, adjusts spacing in CardFooter and Navbar, and extends CardRoot tests for raised vs. flush dev-mode indicator behavior.

Changes

Dev Mode Indicator Styling

Layer / File(s)Summary
DevModeOverlay core rewrite (SVG grid mask)
packages/ui/src/elements/DevModeNotice.tsx
Replaces the repeating-gradient maskImage implementation with a DEV_MODE_GRID-driven SVG tile generator that produces two masked Box layers. Removes the gradient prop entirely. Adds data-clerk-dev-mode-overlay to the wrapper and data-clerk-dev-mode-notice to DevModeNotice, and removes the fontWeight default from DevModeNotice.
Payment component adoption
packages/ui/src/components/Checkout/CheckoutForm.tsx, packages/ui/src/components/PaymentMethods/TestPaymentMethod.tsx
Both components import DevModeOverlay, replace their inline gradient overlay blocks with <DevModeOverlay />, and add overflow: 'hidden' to their containers.
Card layout, spacing, and flush-mode suppression
packages/ui/src/elements/Card/CardClerkAndPagesTag.tsx, packages/ui/src/elements/Card/CardFooter.tsx, packages/ui/src/elements/Card/CardRoot.tsx, packages/ui/src/elements/Navbar.tsx
CardClerkAndPagesTag removes isolation: 'isolate' and the gradient={0} prop, and increases the Col gap token to $4. CardFooter adds a negative marginBottom calc for the notice. CardRoot.getFlushElements hides [data-clerk-dev-mode-overlay] and centers [data-clerk-dev-mode-notice] with adjusted margin/padding. Navbar passes devModeNoticeSx with matching padding and bottom margin to Card.ClerkAndPagesTag.
CardRoot tests and changeset
packages/ui/src/elements/Card/__tests__/CardRoot.test.tsx, .changeset/clear-adults-pump.md
Adds ClerkInstanceContext, EnvironmentProvider, and CardFooter imports, a devEnvironment stub, and a renderCardWithFooter helper. Extends flush tests to assert overlay hidden and notice alignment. Adds a new describe block covering raised (overlay + notice visible) vs flush (notice visible, overlay hidden) behavior. Changeset records a patch bump for @clerk/ui.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • kylemac

Poem

🐰 Hop hop, the gradient's gone today,
SVG grids have come to play!
A mask of tiles, a notice pinned below,
In flush or raised, the dev badge glows.
No more gradient={0} in sight —
The bunny refactored overnight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title 'feat(ui): Dev mode banner updates' directly describes the main change in the changeset: refactoring the dev mode banner/overlay implementation across multiple UI components with new styling and grid overlay design.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-newBot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8917

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8917

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8917

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8917

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@8917

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@8917

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@8917

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8917

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8917

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8917

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8917

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8917

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8917

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8917

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8917

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8917

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8917

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8917

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8917

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8917

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8917

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8917

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8917

commit: c59af36

prestonwebdevand others added 3 commits June 22, 2026 10:02
Replaces the dev mode banner with a faded pixel-grid overlay behind a
center-peaked accent line. Adds an oval mask (configurable curve, fade
strength, and center softness), matches the "Development mode" text to
the "Secured by" text, and adjusts footer spacing. Also fixes a type
error from the removed DevModeOverlay `gradient` prop.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The text Col already paints above the absolutely-positioned dev mode
overlay via DOM order with position: relative, so the explicit zIndex
and isolation are unnecessary.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drops the isolation, content wrapper, and z-index lift from the test
card panels. The dots render over the content like the prior striped
pattern did; only position: relative (to anchor the overlay) and
overflow: hidden (to clip the grid) remain.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread.changeset/clear-adults-pump.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-06-23T13:20:12.964Z

Summary

MetricCount
Packages analyzed19
Packages with changes0
🔴 Breaking changes0
🟡 Non-breaking changes0
🟢 Additions0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on c59af36.

@wobsoriano
wobsoriano merged commit 0c1a5d8 into mainJun 23, 2026
50 checks passed
@wobsoriano
wobsoriano deleted the carp/dev-mode-update branch June 23, 2026 16:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@alexcarpenter@wobsoriano@prestonwebdev