Skip to content

fix: allow mobile sidebar to reopen after closing#119

Open
riffingonsoftware wants to merge 3 commits intotrunkfrom
codex/fix-sidebar-navigation-buttons-on-mobile
Open

fix: allow mobile sidebar to reopen after closing#119
riffingonsoftware wants to merge 3 commits intotrunkfrom
codex/fix-sidebar-navigation-buttons-on-mobile

Conversation

@riffingonsoftware
Copy link
Copy Markdown
Owner

Summary

  • toggle sidebar container's pointer events so the menu button works after closing on mobile
  • use type-only imports and explicit paginate types to satisfy TypeScript checks

Testing

  • pnpm format:check
  • pnpm build

https://chatgpt.com/codex/tasks/task_e_68bb48e00ff483278bfa22b1538d4b33

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

cloudflare-workers-and-pages Bot commented Sep 5, 2025

Deploying blog with  Cloudflare Pages  Cloudflare Pages

Latest commit: baed920
Status: ✅  Deploy successful!
Preview URL: https://3900b6e8.blog-eqd.pages.dev
Branch Preview URL: https://codex-fix-sidebar-navigation.blog-eqd.pages.dev

View logs

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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 suggestions.

Reply with @codex fix comments to fix any unresolved comments.

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, or 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 fix this CI failure" or "@codex address that feedback".

Comment thread src/components/Sidebar.astro Outdated
Comment on lines +8 to +13
<div class="pointer-events-none fixed inset-y-0 left-0 z-40 md:relative" id="sidebar">
<!-- Hidden overlay for mobile - shown when sidebar is open -->
<div class="fixed inset-0 hidden bg-black/50 transition-opacity md:hidden" id="sidebar-overlay"></div>
<div class="fixed inset-0 z-10 hidden bg-black/50 transition-opacity md:hidden" id="sidebar-overlay"></div>

<aside
class="bg-sidebar flex hidden h-screen w-[15rem] flex-col px-2 pt-2 text-white md:sticky md:top-0 md:flex"
class="bg-sidebar relative z-20 flex hidden h-screen w-[15rem] flex-col px-2 pt-2 text-white md:sticky md:top-0 md:flex"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P0] Pointer events disabled for desktop sidebar

The sidebar wrapper now defaults to pointer-events-none, but the script only flips it when toggle() runs. On desktop (md and up) the sidebar is always visible and the toggle event is never dispatched, so the container keeps pointer-events: none permanently. This makes every link and button in the sidebar unclickable on desktop and causes clicks to fall through to the page content. Consider leaving pointer events enabled for desktop (e.g., md:pointer-events-auto) or enabling them on mount when the sidebar is already open.

Useful? React with 👍 / 👎.

Sign up for free to 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.

1 participant