Skip to content

Display dark mode availability on component cards and detail pages#703

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/track-display-dark-mode-availability
Draft

Display dark mode availability on component cards and detail pages#703
Copilot wants to merge 3 commits intomainfrom
copilot/track-display-dark-mode-availability

Conversation

Copy link
Copy Markdown

Copilot AI commented May 8, 2026

Dark mode support was already tracked per-component via dark: true in MDX frontmatter, but this information was never surfaced to users browsing the library.

Changes

ComponentCard.astro

  • Computes darkCount from the existing dark field on each component entry
  • Renders a Moon icon + count badge when darkCount > 0, positioned left of the arrow
  • Uses aria-label for accessibility (screen readers, keyboard users)

ComponentPost.astro (detail page)

  • Computes darkCount and totalCount from the components array
  • Renders a summary line at the top of the component list: "X of Y components have a dark mode variant/variants"
  • Only shown when at least one dark variant exists

Both additions are purely derived from existing data — no schema changes required.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperui/hyperui/node_modules/.bin/astro check (dns block)
  • workers.cloudflare.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/hyperui/hyperui/node_modules/.bin/astro check (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperui f6465eb Commit Preview URL

Branch Preview URL
May 08 2026, 06:17 PM

Agent-Logs-Url: https://github.com/markmead/hyperui/sessions/d462d958-a56b-489d-bd3e-b5bcf1391a35

Co-authored-by: markmead <50486078+markmead@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tracking and display for dark mode availability per component Display dark mode availability on component cards and detail pages May 8, 2026
Copilot AI requested a review from markmead May 8, 2026 18:17
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.

Track and Display Dark Mode Availability Per Component

2 participants