Skip to content

Convert rule drawer to responsive right-side panel#2

Merged
RexO77 merged 3 commits into
mainfrom
side-drawer-responsive
Jun 1, 2026
Merged

Convert rule drawer to responsive right-side panel#2
RexO77 merged 3 commits into
mainfrom
side-drawer-responsive

Conversation

@RexO77

@RexO77 RexO77 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the full-height bottom drawer with a docked right-side panel that coexists with the sidebar and content as a three-lane layout.

  • Vaul direction="right", non-modal (modal=false + noBodyStyles) so the page stays interactive and cards re-target the panel without a body-position lock
  • Content swap on the keyed wrapper animates in with a staggered blur/rise (per the make-interfaces-feel-better skill)
  • Content lane reserves the panel footprint via a viewport-coupled clamp() so it shifts only as much as needed; sidebar clearance held via a --sidebar-open flag to prevent the lane sliding under the sidebar at 1366–1680px widths
  • Drawer renders full-screen below xl (1280px) so tablets avoid a cramped three-column squeeze; docked side panel at xl+
  • Lane left-shift formula inverted to shrink with width (tight gutter on narrow screens, natural centering on wide)

Verification

Measured clearance via DOM inspection across widths (both panels open):

Width Mode Left gap Right gap Result
900 (tablet) full-screen drawer covers screen
1280 side panel 28 28
1440 side panel 28 28 ✓ (was broken)
1512 side panel 28 28 ✓ (was broken)
1920 side panel 168 28
2560 side panel clears clears

No overlap at any width, no console errors, typecheck clean.

🤖 Generated with Claude Code

Replace the full-height bottom drawer with a docked right-side panel that
coexists with the sidebar and content as a three-lane layout.

- Vaul direction="right", non-modal (modal=false + noBodyStyles) so the page
  stays interactive and cards re-target the panel without a body-position lock
- Content swap on the keyed wrapper animates in with a staggered blur/rise
- Content lane reserves the panel footprint via a viewport-coupled clamp so it
  shifts only as much as needed; sidebar clearance held via a --sidebar-open
  flag to prevent the lane sliding under the sidebar at 1366-1680px widths
- Drawer renders full-screen below xl (1280px) so tablets avoid a cramped
  three-column squeeze; docked side panel at xl+
- Lane left-shift formula inverted to shrink with width (tight gutter on
  narrow screens, natural centering on wide)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 1, 2026 15:24
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
axiom-ui Ready Ready Preview, Comment Jun 1, 2026 3:50pm

@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: 95b3023f4e

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

Comment thread src/components/features/rules/rule-drawer.tsx Outdated

Copilot AI 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.

Pull request overview

This PR updates the rule detail “drawer” interaction to use a responsive right-side panel layout on desktop (xl+) while keeping a full-screen experience on smaller viewports, and adjusts layout CSS variables so the main content lane reserves space appropriately alongside the sidebar and panel.

Changes:

  • Convert the rule drawer to a right-side Vaul panel (non-modal) with updated content layout and animation hooks.
  • Add layout coordination between sidebar open state and content lane padding via CSS variables and a data-drawer-open attribute.
  • Introduce global CSS for responsive lane reservation and staggered panel-content animations.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/components/layout/sidebar.tsx Sets --sidebar-open and updates root CSS variables so the content lane can reserve sidebar clearance correctly.
src/components/features/rules/rule-drawer.tsx Switches Vaul drawer to a right-side panel and adjusts internal structure for the new layout/animation.
src/app/page.tsx Adds data-drawer-open attribute to enable CSS-driven lane reservation when the drawer is open.
src/app/globals.css Adds responsive padding/reservation logic for the three-lane layout and defines stagger animation styles.
.claude/launch.json Adds a dev launch configuration file (not directly related to the UI/layout change).

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

Comment thread src/components/features/rules/rule-drawer.tsx
Comment thread src/app/globals.css Outdated
Comment thread .claude/launch.json Outdated
On md–<xl widths the drawer renders full-screen but sat at z-[70], below the
desktop sidebar's z-[80] container, leaving the sidebar visible and clickable
on top. Bump the drawer to z-[90] so full-screen mode fully covers it. Safe at
xl+ where the docked panel and sidebar don't overlap.

Addresses Codex review on PR #2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Stagger animation: target header/section/aside by tag+class instead of
  :nth-child, which mismatched because the sr-only <Drawer.Description> is the
  first child of .rule-drawer-content. Delays now resolve to 0/80/160ms.
- Remove .claude/launch.json from the PR (local preview tooling, unrelated to
  this change) and gitignore .claude/.

Addresses Codex/Copilot review on PR #2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

@RexO77 RexO77 merged commit 53a6842 into main Jun 1, 2026
3 checks passed
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