-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Mobile messages fix #2846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile messages fix #2846
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughInitial panel selection and right-panel visibility now depend on route params and viewport size. On mobile, right panels default closed; on larger screens, open. Layouts initialize currentPanel to "main" when programSlug/partnerId exists, otherwise "index". Legacy searchParams-driven toggling and related hook/effect were removed in one layout. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Layout as MessagesLayout
participant Route as Route Params (programSlug/partnerId)
participant Panel as Right Panel
participant MQ as useMediaQuery
User->>Layout: Open messages page
Layout->>Route: Read programSlug/partnerId
alt Param present
Layout->>Layout: currentPanel = "main"
else No param
Layout->>Layout: currentPanel = "index"
end
Layout->>MQ: query("(max-width: ...)")
MQ-->>Layout: isMobile
Layout->>Panel: setOpen(!isMobile)
sequenceDiagram
autonumber
participant Old as Old Layout (before)
participant New as New Layout (now)
participant SP as searchParams
participant Route as Route Params
Old->>SP: useEffect listens to searchParams
SP-->>Old: Toggle currentPanel based on URL params
New->>Route: Read partnerId/programSlug once
Route-->>New: Initialize currentPanel ("main" or "index")
Note over New: No searchParams-based toggling effect
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
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. Comment |
When opening a program/partner messages page directly on mobile:
Summary by CodeRabbit
New Features
Refactor
Chores