Skip to content

feat: nav dropdown, mobile drawer, phosphor icons, dark mode fix, responsive scale#846

Merged
ashleyshaw merged 2 commits into
developfrom
feat/ui-redesign-modes-icons-menus-Jw2jw
Jun 5, 2026
Merged

feat: nav dropdown, mobile drawer, phosphor icons, dark mode fix, responsive scale#846
ashleyshaw merged 2 commits into
developfrom
feat/ui-redesign-modes-icons-menus-Jw2jw

Conversation

@ashleyshaw

Copy link
Copy Markdown
Member
  • Replace all icons with Phosphor Icons (CDN CSS, ph-* class approach)
  • Fix dark mode nav: header now uses dark semi-transparent bg in dark theme
  • Add desktop Browse hover dropdown with 8 categories in a 4-column grid
  • Add mobile full-height slide-out drawer from right with all nav items
  • Add responsive scale overrides for spacing/font sizes at mobile breakpoints
  • Add color-scheme per theme to prevent OS-level dark UI glitches
  • Update CATEGORIES icon names to valid Phosphor icon identifiers

https://claude.ai/code/session_017G3gEzdfRafmqFno5dfWQH

…ponsive scale

- Replace all icons with Phosphor Icons (CDN CSS, ph-* class approach)
- Fix dark mode nav: header now uses dark semi-transparent bg in dark theme
- Add desktop Browse hover dropdown with 8 categories in a 4-column grid
- Add mobile full-height slide-out drawer from right with all nav items
- Add responsive scale overrides for spacing/font sizes at mobile breakpoints
- Add color-scheme per theme to prevent OS-level dark UI glitches
- Update CATEGORIES icon names to valid Phosphor icon identifiers

https://claude.ai/code/session_017G3gEzdfRafmqFno5dfWQH
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 67ec99d6-373f-4b77-89bf-007e4ad16496

📥 Commits

Reviewing files that changed from the base of the PR and between fe2c7b9 and cf80cb1.

📒 Files selected for processing (4)
  • website/src/components/AwesomeGithub/AwesomeGithubNav.astro
  • website/src/layouts/AwesomeGithubLayout.astro
  • website/src/lib/catalogue.ts
  • website/src/styles/awesome-github.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ui-redesign-modes-icons-menus-Jw2jw

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 and usage tips.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ A merged PR reached develop without passing the template content guardrail.

Missing required section(s): Linked issues, Changelog, Global DoD checklist

This is a post-merge backstop for admin bypasses. Please review branch protection for develop.

@mergify

mergify Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ The sha of the head commit of this PR conflicts with #845. Mergify cannot evaluate rules on this PR. Once #845 is merged or closed, Mergify will resume processing this PR. ⚠️

@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: a4966f4d52

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


.ag-browse-panel {
position: absolute;
top: calc(100% + 8px);

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 Remove the gap that closes Browse before use

On desktop pointer devices, the Browse panel is opened by mouseenter but closed on mouseleave of the wrapper; positioning the panel at top: calc(100% + 8px) creates an 8px dead zone between the trigger and the panel. Moving the cursor from the button toward any category crosses that gap, fires mouseleave, and hides the menu before the links can be reached, so the hover dropdown is effectively unusable without keyboard/touch-specific interaction.

Useful? React with 👍 / 👎.

Comment on lines +557 to +559
width: 100%;
height: 100dvh;
z-index: 200;

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 Keep a visible pointer control to close the drawer

At the mobile breakpoint, the drawer opens as a full-viewport fixed element while the overlay is behind it and the hamburger/close button remains in the nav underneath; because the drawer appears later in the DOM at the same z-index, it covers the changed “X” control. Touch or mouse users who open the drawer and then choose not to navigate have no visible pointer target to close it, so the drawer can only be dismissed via Escape or by following a link.

Useful? React with 👍 / 👎.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the navigation header to introduce a sticky navigation bar featuring a desktop 'Browse' mega-dropdown, a mobile full-screen drawer, and a backdrop overlay. It also integrates Phosphor Icons, minifies the theme initialization script to prevent theme flashing, and implements event delegation for theme toggling. The review feedback highlights several critical accessibility and usability improvements: resolving a z-index conflict that traps mobile users in the drawer, refactoring the mobile scroll-lock to use CSS classes instead of direct inline styles, restoring dynamic aria-label updates for the hamburger button, and converting the dropdown menu to a Disclosure pattern to comply with ARIA guidelines.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

height: 72px;
padding: 0 var(--gutter);
background: rgba(255, 255, 255, 0.97);
z-index: 200;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

Both .ag-nav and .ag-mobile-drawer are configured with z-index: 200. Because the drawer is defined later in the DOM, it will render on top of the header, completely covering the hamburger/close button. Since there is no close button inside the drawer and the overlay is also covered (due to width: 100%), mobile users will be trapped in the drawer with no way to close it. Increasing the header's z-index to 210 ensures it stays on top of the drawer, keeping the close button accessible.

    z-index: 210;

Comment on lines +235 to +246
const openDrawer = () => {
hamburger.setAttribute("aria-expanded", "true");
drawer.setAttribute("aria-hidden", "false");
overlay.setAttribute("aria-hidden", "false");
document.body.style.overflow = "hidden";
};
const closeDrawer = () => {
hamburger.setAttribute("aria-expanded", "false");
drawer.setAttribute("aria-hidden", "true");
overlay.setAttribute("aria-hidden", "true");
document.body.style.overflow = "";
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This block has two issues:

  1. Setting document.body.style.overflow = "hidden" directly in JS causes the page to remain unscrollable if the user resizes the window to desktop width while the drawer is open. Toggling a class on document.body and handling the overflow lock in CSS inside the mobile media query is much more robust.
  2. The hamburger button's aria-label is statically set to "Open navigation menu", which is a regression from the original code that dynamically updated it to "Close navigation menu" when open.
    const openDrawer = () => {
      hamburger.setAttribute("aria-expanded", "true");
      hamburger.setAttribute("aria-label", "Close navigation menu");
      drawer.setAttribute("aria-hidden", "false");
      overlay.setAttribute("aria-hidden", "false");
      document.body.classList.add("ag-drawer-open");
    };
    const closeDrawer = () => {
      hamburger.setAttribute("aria-expanded", "false");
      hamburger.setAttribute("aria-label", "Open navigation menu");
      drawer.setAttribute("aria-hidden", "true");
      overlay.setAttribute("aria-hidden", "true");
      document.body.classList.remove("ag-drawer-open");
    };

Comment on lines +665 to 668
@media (max-width: 960px) {
.ag-nav-desktop { display: none; }
.ag-hamburger-btn { display: flex; }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Add the :global(body.ag-drawer-open) rule inside the mobile media query to lock scrolling only on mobile viewports when the drawer is open.

  @media (max-width: 960px) {
    .ag-nav-desktop { display: none; }
    .ag-hamburger-btn { display: flex; }
    :global(body.ag-drawer-open) {
      overflow: hidden;
    }
  }

Comment on lines +44 to +49
<button
class="ag-nav-link ag-browse-trigger"
aria-expanded="false"
aria-haspopup="menu"
aria-controls="ag-browse-panel"
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using role="menu" and role="menuitem" without implementing keyboard arrow navigation violates ARIA guidelines and confuses screen reader users. Since this is a simple list of navigation links, it is highly recommended to use the Disclosure pattern instead by removing aria-haspopup="menu", role="menu", and role="menuitem".

        <button
          class="ag-nav-link ag-browse-trigger"
          aria-expanded="false"
          aria-controls="ag-browse-panel"
        >

Comment on lines +53 to +58
<div
class="ag-browse-panel"
id="ag-browse-panel"
role="menu"
aria-label="Browse categories"
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Part of the Disclosure pattern conversion. Remove role="menu" and aria-label from the panel container.

        <div
          class="ag-browse-panel"
          id="ag-browse-panel"
        >

Comment on lines +61 to +65
<a
href={`${base}c/${cat.id}/`}
class="ag-browse-card"
role="menuitem"
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Part of the Disclosure pattern conversion. Remove role="menuitem" from the category links.

              <a
                href={`${base}c/${cat.id}/`}
                class="ag-browse-card"
              >

Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@mergify

mergify Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ The sha of the head commit of this PR conflicts with #845. Mergify cannot evaluate rules on this PR. Once #845 is merged or closed, Mergify will resume processing this PR. ⚠️

@github-actions github-actions Bot added status:needs-review Awaiting code review type:feature Feature or enhancement priority:normal Default priority lang:js JavaScript/TypeScript lang:css Stylesheets (CSS/Sass/etc.) type:chore Chore / small hygiene change type:bug Bug or defect meta:needs-changelog Requires a changelog entry before merge labels Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #846

CI Status:success
Files changed: 4
Risk Distribution: 0 critical, 0 high, 4 medium, 0 low

Recommendations

  • Ready to proceed pending human review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the “Awesome GitHub” website UI to introduce a new navigation experience (desktop browse dropdown + mobile drawer), improve responsive spacing/type scaling, and refine theme handling (including color-scheme hints and updated icon usage).

Changes:

  • Adds responsive CSS variable overrides (gutters, section spacing, heading/lead scale) and sets color-scheme per theme to reduce OS/UI theme glitches.
  • Updates catalogue category icon identifiers to match Phosphor icon naming.
  • Refactors layout/theme initialisation and introduces Phosphor web icon stylesheet; nav is reworked for desktop browse dropdown and a mobile right-side drawer.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
website/src/styles/awesome-github.css Adds breakpoint-based variable overrides and color-scheme rules per theme.
website/src/lib/catalogue.ts Updates category icon names for Phosphor compatibility.
website/src/layouts/AwesomeGithubLayout.astro Adds early theme init script changes and includes Phosphor web CSS; adjusts main layout sizing + skip link styling.
website/src/components/AwesomeGithub/AwesomeGithubNav.astro Large nav refactor: desktop “Browse” panel, mobile drawer/overlay, new icon markup, and associated JS/CSS changes.
Comments suppressed due to low confidence (1)

website/src/components/AwesomeGithub/AwesomeGithubNav.astro:125

  • There is a leftover template fragment from the previous nav ({link.label} / </a> / </nav>) immediately after the new .ag-nav-actions. This leaves the <header>/.ag-nav-inner structure unbalanced and will break Astro compilation/rendering. Close the new .ag-nav-inner + <header> here, and remove the legacy nav markup that follows (lines 127–160).

        {link.label}
      </a>
    ))}
  </nav>

Comment on lines +46 to +50
class="ag-nav-link ag-browse-trigger"
aria-expanded="false"
aria-haspopup="menu"
aria-controls="ag-browse-panel"
>
Comment on lines +55 to +59
class="ag-browse-panel"
id="ag-browse-panel"
role="menu"
aria-label="Browse categories"
>
Comment on lines +62 to +66
<a
href={`${base}c/${cat.id}/`}
class="ag-browse-card"
role="menuitem"
>
Comment on lines 159 to 160
</div>
</header>
Comment on lines +286 to 290
hamburger.addEventListener("click", () => {
hamburger.getAttribute("aria-expanded") === "true" ? closeDrawer() : openDrawer();
if (hamburger && menu) {
const closeMenu = () => {
hamburger.setAttribute("aria-expanded", "false");
Comment on lines +306 to 310
overlay.addEventListener("click", closeDrawer);

drawer.querySelectorAll("a").forEach((link) => {
link.addEventListener("click", closeDrawer);
// Close on link click (mobile)
Comment on lines +611 to 615
.ag-mobile-overlay[aria-hidden="false"] {
opacity: 1;
visibility: visible;
.theme-icon-light,
.theme-icon-dark {
Comment on lines +744 to 746
@media (max-width: 480px) {
.ag-brand-text { display: none; }
.ag-nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
Comment on lines +39 to +40
<!-- Phosphor Icons (regular weight) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css" />
@ashleyshaw ashleyshaw merged commit fa42baf into develop Jun 5, 2026
31 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:css Stylesheets (CSS/Sass/etc.) lang:js JavaScript/TypeScript meta:needs-changelog Requires a changelog entry before merge priority:normal Default priority status:needs-review Awaiting code review type:bug Bug or defect type:chore Chore / small hygiene change type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants