Skip to content

Add mobile header sidebar trigger#218

Open
yihyunjoon wants to merge 1 commit intohackers-pub:mainfrom
yihyunjoon:codex/mobile-header
Open

Add mobile header sidebar trigger#218
yihyunjoon wants to merge 1 commit intohackers-pub:mainfrom
yihyunjoon:codex/mobile-header

Conversation

@yihyunjoon
Copy link
Contributor

@yihyunjoon yihyunjoon commented Mar 10, 2026

Sidebar closed Sidebar opened
mobile-header side-bar-open

Added a mobile-only top header with a sidebar toggle button on the left. Users can now access the sidebar menu on mobile screens.

Summary by CodeRabbit

  • New Features

    • Added a fixed, translucent mobile header with a sidebar/menu trigger, responsive home link, and adjusted top padding for improved mobile/desktop layout and accessibility
    • Responsive dark/light logo handling for the home link
  • Localization

    • Added localized labels for site name, home link, and sidebar toggle across supported locales for clearer screen-reader text and anchors

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Warning

Rate limit exceeded

@yihyunjoon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa6d7b3e-a192-48da-8a49-22a4766b8391

📥 Commits

Reviewing files that changed from the base of the PR and between 1db68ba and f506ee7.

📒 Files selected for processing (6)
  • web-next/src/locales/en-US/messages.po
  • web-next/src/locales/ja-JP/messages.po
  • web-next/src/locales/ko-KR/messages.po
  • web-next/src/locales/zh-CN/messages.po
  • web-next/src/locales/zh-TW/messages.po
  • web-next/src/routes/(root).tsx
📝 Walkthrough

Walkthrough

Added a fixed translucent mobile header to the root layout with a SidebarTrigger, localized home link and responsive logo; updated useLingui usage and main content padding. Added i18n keys and references across locale message files.

Changes

Cohort / File(s) Summary
Root layout / Mobile header
web-next/src/routes/(root).tsx
Added A import from @solidjs/router; imported SidebarTrigger; destructured t from useLingui; inserted a fixed, translucent mobile header containing SidebarTrigger, a localized home anchor with responsive dark/light logo and accessibility labels; updated main content classes from w-full to w-full pt-14 md:pt-0.
Locale message files
web-next/src/locales/en-US/messages.po, web-next/src/locales/ja-JP/messages.po, web-next/src/locales/ko-KR/messages.po, web-next/src/locales/zh-CN/messages.po, web-next/src/locales/zh-TW/messages.po
Added translation keys Hackers' Pub home and Toggle sidebar (with locale-specific translations) and added/updated source reference lines for Hackers' Pub where applicable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • dahlia

Poem

🐰 I bounced a header into view so neat,
A button for the side and home to greet,
Logos that swap when dark meets light,
Strings tucked in every language, tight—
Mobile hops along, quick and fleet. 🌿✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a mobile header with a sidebar trigger button, which aligns with the route component updates and translation additions.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web-next/src/routes/`(root).tsx:
- Line 69: SidebarTrigger is rendered without an accessible name; update the
mobile menu button (SidebarTrigger) to provide an explicit accessible label by
adding either visible children text or an aria-label prop (e.g.,
aria-label="Open menu" or aria-label="Toggle navigation") to the SidebarTrigger
component invocation so screen readers can announce its purpose; ensure the prop
name matches the SidebarTrigger component API (ariaLabel/aria-label/children)
used in the component implementation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 548146d6-6f13-4aa4-960e-42d86aa5ef55

📥 Commits

Reviewing files that changed from the base of the PR and between de425b7 and b613b2c.

📒 Files selected for processing (1)
  • web-next/src/routes/(root).tsx

@yihyunjoon yihyunjoon force-pushed the codex/mobile-header branch from b613b2c to 059b2fc Compare March 10, 2026 14:46
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the mobile user experience by introducing a dedicated, fixed header for smaller screens. This header provides a convenient way to access the application's sidebar menu through a new toggle button, ensuring consistent navigation. It also includes a responsive home link with dynamic logo display and proper padding adjustments, making the interface more intuitive and visually appealing on mobile devices.

Highlights

  • Mobile Header Implementation: Implemented a new fixed, translucent header specifically for mobile devices, which includes a navigation menu trigger.
  • Sidebar Accessibility: Enabled users to access the sidebar menu on mobile screens via the new header's toggle button.
  • Dynamic Logo Rendering: Introduced dynamic rendering of the site logo, switching between dark and light versions based on the user's preferred color scheme.
  • Layout Adjustments: Adjusted the top padding of the main content area to accommodate the new mobile header, ensuring proper layout on both mobile and desktop.
  • Localization Updates: Added new localized strings for the site name and home link across all supported locales to improve accessibility and screen-reader labels.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • web-next/src/locales/en-US/messages.po
    • Added a new translation key for "Hackers' Pub home".
    • Updated the reference for the existing "Hackers' Pub" translation.
  • web-next/src/locales/ja-JP/messages.po
    • Added a new translation key for "Hackers' Pub home" with Japanese translation.
    • Updated the reference for the existing "Hackers' Pub" translation.
  • web-next/src/locales/ko-KR/messages.po
    • Added a new translation key for "Hackers' Pub home" with Korean translation.
    • Updated the reference for the existing "Hackers' Pub" translation.
  • web-next/src/locales/zh-CN/messages.po
    • Added a new translation key for "Hackers' Pub home" with Simplified Chinese translation.
    • Updated the reference for the existing "Hackers' Pub" translation.
  • web-next/src/locales/zh-TW/messages.po
    • Added a new translation key for "Hackers' Pub home" with Traditional Chinese translation.
    • Updated the reference for the existing "Hackers' Pub" translation.
  • web-next/src/routes/(root).tsx
    • Imported the SidebarTrigger component.
    • Destructured the t (translation function) from the useLingui hook.
    • Added a new header element for mobile-specific navigation, including a SidebarTrigger, a responsive <a> tag for the home link with a picture element for dark/light mode logos, and an empty div for spacing.
    • Modified the main element's class to include pt-14 md:pt-0 for proper top padding.
Activity
  • No specific human activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 introduces a mobile-only header with a sidebar toggle, which is a great enhancement for mobile usability. The implementation is clean and uses Tailwind CSS effectively for responsiveness. I've made one suggestion to use the <A> component for the home link to align with SPA best practices and ensure smooth client-side navigation. Overall, good work.

Note: Security Review did not run due to the size of the PR.

Comment on lines +70 to +84
<a href="/" aria-label={t`Hackers' Pub home`}>
<picture>
<source
srcset="/logo-dark.svg"
media="(prefers-color-scheme: dark)"
/>
<img
src="/logo-light.svg"
alt={t`Hackers' Pub`}
width={111}
height={28}
class="h-7 w-auto"
/>
</picture>
</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To ensure consistent client-side navigation and prevent unnecessary full-page reloads in this Single Page Application, it's recommended to use the <A> component from @solidjs/router instead of a standard <a> tag for internal links. This will improve performance and user experience.

You'll need to import A from @solidjs/router at the top of the file:

import { A, query, ... } from "@solidjs/router";
Suggested change
<a href="/" aria-label={t`Hackers' Pub home`}>
<picture>
<source
srcset="/logo-dark.svg"
media="(prefers-color-scheme: dark)"
/>
<img
src="/logo-light.svg"
alt={t`Hackers' Pub`}
width={111}
height={28}
class="h-7 w-auto"
/>
</picture>
</a>
<A href="/" aria-label={t`Hackers' Pub home`}>
<picture>
<source
srcset="/logo-dark.svg"
media="(prefers-color-scheme: dark)"
/>
<img
src="/logo-light.svg"
alt={t`Hackers' Pub`}
width={111}
height={28}
class="h-7 w-auto"
/>
</picture>
</A>

@yihyunjoon yihyunjoon force-pushed the codex/mobile-header branch from 059b2fc to 7edc99c Compare March 11, 2026 02:10
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
web-next/src/routes/(root).tsx (1)

1-6: Make RouteDefinition a type-only import.

It's only used in a type position via satisfies, so importing it as a value is unnecessary here.

♻️ Suggested cleanup
 import {
   A,
   query,
-  RouteDefinition,
+  type RouteDefinition,
   type RouteSectionProps,
 } from "@solidjs/router";

As per coding guidelines, "Use type keyword for type imports when appropriate in TypeScript".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web-next/src/routes/`(root).tsx around lines 1 - 6, The import currently
brings in RouteDefinition as a value; change it to a type-only import so
RouteDefinition is imported with the type modifier (e.g., "type
RouteDefinition") because it is only used in a type position via the satisfies
operator; update the import line that includes A, query, RouteDefinition, type
RouteSectionProps to import RouteDefinition with the type keyword while leaving
the other imports unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web-next/src/routes/`(root).tsx:
- Line 70: SidebarTrigger currently uses a hardcoded English aria-label causing
inconsistent localization; update the SidebarTrigger invocation in (root).tsx to
pass a localized aria-label using the same i18n function (t) used elsewhere
(e.g., the surrounding header strings), e.g. provide an aria-label prop like
aria-label={t('header.openNavigation')} or similar key, so the mobile nav
control is announced in the current locale; ensure the chosen i18n key exists in
translation files and matches naming used for header controls.

---

Nitpick comments:
In `@web-next/src/routes/`(root).tsx:
- Around line 1-6: The import currently brings in RouteDefinition as a value;
change it to a type-only import so RouteDefinition is imported with the type
modifier (e.g., "type RouteDefinition") because it is only used in a type
position via the satisfies operator; update the import line that includes A,
query, RouteDefinition, type RouteSectionProps to import RouteDefinition with
the type keyword while leaving the other imports unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 94f97f81-4049-45f2-815e-9557a18c95d5

📥 Commits

Reviewing files that changed from the base of the PR and between 059b2fc and 7edc99c.

📒 Files selected for processing (6)
  • web-next/src/locales/en-US/messages.po
  • web-next/src/locales/ja-JP/messages.po
  • web-next/src/locales/ko-KR/messages.po
  • web-next/src/locales/zh-CN/messages.po
  • web-next/src/locales/zh-TW/messages.po
  • web-next/src/routes/(root).tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • web-next/src/locales/zh-CN/messages.po
  • web-next/src/locales/en-US/messages.po
  • web-next/src/locales/ja-JP/messages.po
  • web-next/src/locales/ko-KR/messages.po
  • web-next/src/locales/zh-TW/messages.po

Copy link

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

Adds a mobile-only fixed top header to the root layout that provides a sidebar trigger and a home link/logo, and updates locale catalogs to include the new accessible home-link label.

Changes:

  • Added a fixed mobile header (md:hidden) with a sidebar toggle button and home link/logo in the root layout.
  • Adjusted main content padding on mobile (pt-14) to account for the fixed header.
  • Added/updated localized strings for the new home-link aria label across supported locales.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web-next/src/routes/(root).tsx Introduces the mobile header + sidebar trigger and offsets main content for the fixed header.
web-next/src/locales/en-US/messages.po Adds new msgid for the home-link aria label.
web-next/src/locales/ja-JP/messages.po Adds new msgid for the home-link aria label.
web-next/src/locales/ko-KR/messages.po Adds new msgid for the home-link aria label.
web-next/src/locales/zh-CN/messages.po Adds new msgid for the home-link aria label.
web-next/src/locales/zh-TW/messages.po Adds new msgid for the home-link aria label.

/>
<header class="fixed inset-x-0 top-0 z-40 border-b bg-background/80 backdrop-blur md:hidden">
<div class="flex h-14 items-center justify-between px-4">
<SidebarTrigger class="size-9 rounded-full" />
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

SidebarTrigger renders an English-only accessible label (it includes a sr-only "Toggle Sidebar" in components/ui/sidebar.tsx). Since this new mobile header is shown across the app, consider passing a localized aria-label/title here (using t) and adding the corresponding msgid to the locale catalogs so screen-reader users get a translated control label.

Suggested change
<SidebarTrigger class="size-9 rounded-full" />
<SidebarTrigger
class="size-9 rounded-full"
aria-label={t`Toggle sidebar`}
/>

Copilot uses AI. Check for mistakes.
@yihyunjoon yihyunjoon force-pushed the codex/mobile-header branch from 7edc99c to 1db68ba Compare March 11, 2026 02:25
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
web-next/src/routes/(root).tsx (1)

1-6: Make RouteDefinition a type-only import.

RouteDefinition is only used in a type position, so this import should use type as well.

Suggested fix
 import {
   A,
   query,
-  RouteDefinition,
+  type RouteDefinition,
   type RouteSectionProps,
 } from "@solidjs/router";

As per coding guidelines, "Use type keyword for type imports when appropriate in TypeScript".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web-next/src/routes/`(root).tsx around lines 1 - 6, RouteDefinition is only
used as a type and should be imported as a type-only import; update the import
statement to use the TypeScript "type" modifier for RouteDefinition (e.g.,
change the import so RouteDefinition is imported with "type RouteDefinition")
while leaving other imports (A, query, and type RouteSectionProps) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@web-next/src/routes/`(root).tsx:
- Around line 1-6: RouteDefinition is only used as a type and should be imported
as a type-only import; update the import statement to use the TypeScript "type"
modifier for RouteDefinition (e.g., change the import so RouteDefinition is
imported with "type RouteDefinition") while leaving other imports (A, query, and
type RouteSectionProps) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08ca93dc-caf8-4ade-82b7-f09abae43a62

📥 Commits

Reviewing files that changed from the base of the PR and between 7edc99c and 1db68ba.

📒 Files selected for processing (6)
  • web-next/src/locales/en-US/messages.po
  • web-next/src/locales/ja-JP/messages.po
  • web-next/src/locales/ko-KR/messages.po
  • web-next/src/locales/zh-CN/messages.po
  • web-next/src/locales/zh-TW/messages.po
  • web-next/src/routes/(root).tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • web-next/src/locales/ja-JP/messages.po
  • web-next/src/locales/ko-KR/messages.po
  • web-next/src/locales/en-US/messages.po
  • web-next/src/locales/zh-CN/messages.po

@yihyunjoon yihyunjoon force-pushed the codex/mobile-header branch from 1db68ba to f506ee7 Compare March 11, 2026 02:32
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