Skip to content

fix: align BottomDrawer breakpoint with @bp3 (1200px)#577

Merged
rickstaa merged 1 commit intomainfrom
fix/bottom-drawer-breakpoint-alignment
Mar 6, 2026
Merged

fix: align BottomDrawer breakpoint with @bp3 (1200px)#577
rickstaa merged 1 commit intomainfrom
fix/bottom-drawer-breakpoint-alignment

Conversation

@rickstaa
Copy link
Member

@rickstaa rickstaa commented Mar 4, 2026

Summary

  • Aligns the hardcoded 1020px BottomDrawer breakpoint with the design system's @bp3 (1200px)
  • Fixes a dead zone at 1020-1199px where mobile action buttons (delegate, undelegate, vote) were visible but tapping them did nothing because the drawer wouldn't open

Closes #578

Changed files

File Change
components/BottomDrawer/index.tsx Drawer open condition: width < 1020width < 1200
layouts/account.tsx Desktop widget condition: width > 1020width > 1200
layouts/main.tsx Body scroll lock/reset: 10201200
components/DelegatingWidget/Input.tsx Autofocus condition: width > 1020width > 1200

Test plan

  • At 1020-1199px: verify delegate/undelegate buttons open the bottom drawer
  • At 1020-1199px: verify vote buttons open the bottom drawer
  • At 1200px+: verify desktop widget renders inline (no drawer)
  • Below 1020px: verify drawer still works as before

🤖 Generated with Claude Code

@rickstaa rickstaa requested a review from ECWireless as a code owner March 4, 2026 09:34
Copilot AI review requested due to automatic review settings March 4, 2026 09:34
@vercel
Copy link
Contributor

vercel bot commented Mar 4, 2026

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

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Mar 6, 2026 5:31pm

Request Review

Copy link
Contributor

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

Aligns responsive behavior around the BottomDrawer + desktop widget to use the design system @bp3 breakpoint (1200px), removing the non-interactive “dead zone” window.

Changes:

  • Updated BottomDrawer open condition to use < 1200
  • Updated desktop widget rendering condition to use > 1200
  • Updated body scroll lock/reset and input autofocus logic to use 1200

Reviewed changes

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

File Description
layouts/main.tsx Updates scroll lock/reset breakpoint to 1200px
layouts/account.tsx Updates desktop widget rendering breakpoint to 1200px
components/DelegatingWidget/Input.tsx Updates autofocus breakpoint to 1200px
components/BottomDrawer/index.tsx Updates drawer open condition breakpoint to 1200px

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

</Flex>
{(isOrchestrator || isMyDelegate || isDelegatingAndIsMyAccountView) &&
(width > 1020 ? (
(width > 1200 ? (
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

Using width > 1200 creates a 1px gap at exactly 1200 where the desktop widget will not render (since 1200 > 1200 is false) while the drawer is also closed (width < 1200 is false). This reintroduces a dead zone at exactly 1200px. Consider switching desktop conditions to width >= 1200 (and keep the drawer as < 1200) so coverage is continuous.

Suggested change
(width > 1200 ? (
(width >= 1200 ? (

Copilot uses AI. Check for mistakes.
layouts/main.tsx Outdated
Comment on lines 212 to 218
if (width > 1200) {
document.body.removeAttribute("style");
}

if (width < 1020 && drawerOpen) {
if (width < 1200 && drawerOpen) {
document.body.style.overflow = "hidden";
}
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

At exactly width === 1200, the removeAttribute branch won’t run. If the user had overflow: hidden applied on mobile and then resizes to exactly 1200px, the page can remain scroll-locked. To avoid this, use width >= 1200 for the style reset (and keep the lock for < 1200).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing greater-than-or-equal operator update in pages/voting/[poll].tsx creates 1px dead zone at exactly 1200px where neither desktop widget nor mobile drawer renders

Fix on Vercel

The hardcoded 1020px breakpoint for the BottomDrawer was misaligned with
the design system's @BP3 (1200px) used for showing/hiding mobile action
buttons. This created a dead zone at 1020-1199px where buttons were
visible but the drawer wouldn't open on click.

Also uses >= for desktop conditions so exactly 1200px is covered
(matching CSS min-width: 1200px).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickstaa rickstaa force-pushed the fix/bottom-drawer-breakpoint-alignment branch from a04fb7e to af219ef Compare March 6, 2026 17:29
@rickstaa rickstaa merged commit d2612ee into main Mar 6, 2026
8 checks passed
@rickstaa rickstaa deleted the fix/bottom-drawer-breakpoint-alignment branch March 6, 2026 17:39
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.

Bottom drawer doesn't open at 1020-1199px screen widths

2 participants