Skip to content

Pending-edits button color + Cap widget dark-mode theming#261

Open
HugoGresse wants to merge 1 commit into
mainfrom
speaker-self-edit-ui-polish
Open

Pending-edits button color + Cap widget dark-mode theming#261
HugoGresse wants to merge 1 commit into
mainfrom
speaker-self-edit-ui-polish

Conversation

@HugoGresse
Copy link
Copy Markdown
Owner

Summary

Two small UI tweaks on the speaker self-edit surface:

  1. Pending-edits button color — drops from variant="contained" color="warning" to variant="outlined" color="primary" when the pending queue is empty, so the speaker self-edit accordion does not look perpetually alarmed. As soon as the queue is non-empty it flips back to contained orange so admins notice the work to review.
  2. Cap captcha widget dark-modeCapWidget now reads useTheme() and writes the colour CSS custom properties on its container div. CSS variables cascade to the <cap-widget> child so the widget blends with the surrounding Paper instead of glowing white against the dark theme.
    • Light mode keeps the exact upstream defaults so existing deployments do not change.
    • Dark mode maps to MUI palette tokens (background.paper, text.primary, divider, action.hover, action.disabledBackground) and follows whatever palette overrides a deploy applies.
    • Only the colour vars are themed — sizing / radius / padding stay on the widget defaults.

Test plan

  • Frontend tsc clean; vite build succeeds.
  • Manual: open the speakers page on an event with no pending edits — button outlined-blue. Submit one self-edit — button contained-orange.
  • Manual: open the public speaker-edit page on light + dark themes; verify the Cap widget background tracks the surrounding Paper.

🤖 Generated with Claude Code

Two small UI tweaks asked for after the last self-edit pass:

1) Pending-edits button is no longer perpetually orange. When the
   pending queue is empty the button drops to variant="outlined"
   + color="primary" so the speaker self-edit accordion does not look
   alarmed by default. As soon as pendingCount > 0 it switches to
   variant="contained" + color="warning" so admins notice they have
   work to review.

2) Cap captcha widget now follows the host MUI theme. The upstream
   defaults are tuned for light surfaces and produce a near-white
   box on the dark theme, which clashes hard with Paper. CapWidget
   now reads useTheme() and writes the colour CSS custom properties
   (background, border, text, checkbox, spinner) on its container
   div. CSS variables cascade to the widget child, so the widget
   picks the overrides up without us reaching into its internals.
   Sizing / radius / padding stay on the widget defaults — only the
   colour tokens are themed.

   Light mode keeps the exact upstream values to avoid regressing
   existing deployments. Dark mode maps to MUI palette tokens
   (background.paper, text.primary, divider, action.hover,
   action.disabledBackground) so the widget tracks any theme
   customisation a deploy might apply.

Frontend tsc clean; vite build succeeds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 21:39
@HugoGresse HugoGresse deployed to GitHub Action PR May 25, 2026 21:39 — with GitHub Actions Active
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes two focused UI adjustments for speaker self-editing: it tones down the pending-edits button when there is no review queue and themes the Cap captcha widget to match dark-mode surfaces.

Changes:

  • Pending-edits button now uses outlined primary styling when the queue is empty, and contained warning styling when pending edits exist.
  • CapWidget now derives Cap CSS color variables from the active MUI theme, preserving light defaults and applying dark palette tokens.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/public/speakerEdit/CapWidget.tsx Adds MUI theme-based CSS custom properties for Cap widget colors.
src/events/page/speakers/components/SpeakerSelfEditSettings.tsx Makes pending-edits button styling conditional on pendingCount.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit dfde5e0):

(expires Mon, 01 Jun 2026 21:40:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0c15c45ea5a4c54095387eacf30c3755c9260f22

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.

2 participants