-
Notifications
You must be signed in to change notification settings - Fork 189
Fix: inconsistent sidebar state on mobile/tablet viewport #2320
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
Conversation
ConsoleProject ID: Sites (2)
Note You can use Avatars API to generate QR code for any text or URLs. |
Warning Rate limit exceeded@ItzNotABug has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 26 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (1)
Walkthrough
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/subNavigation.svelte (1)
137-159
: Avoid blank mobile header when database name is unavailableSwitching
{:else}
to{:else if data?.database?.name}
can render no header on mobile/tablet while data is loading or absent, removing the table selector and causing layout shift. Consider adding a fallback{:else}
that keeps the Navbar visible with a placeholder to preserve UX.-{:else if data?.database?.name} +{:else if data?.database?.name} <Navbar.Base> <div slot="left"> <Layout.Stack direction="row" alignItems="center" gap="s"> <Icon icon={IconDatabase} size="s" color="--neutral-300" /> <Link.Anchor href={`${base}/project-${region}-${project}/databases/database-${databaseId}`} variant="quiet-muted"> {data.database.name} </Link.Anchor> <span style:margin-left="8px">/</span> <Button text extraCompact on:click={() => (openBottomSheet = !openBottomSheet)}> <Typography.Text variant="m-400"> {selectedTable?.name} </Typography.Text> <Icon icon={IconChevronDown} size="s" /> </Button> </Layout.Stack> </div> </Navbar.Base> -{/if} +{:else} + <Navbar.Base> + <div slot="left"> + <Layout.Stack direction="row" alignItems="center" gap="s"> + <Icon icon={IconDatabase} size="s" color="--neutral-300" /> + <Typography.Text variant="m-400">Database</Typography.Text> + </Layout.Stack> + </div> + </Navbar.Base> +{/if}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/lib/layout/shell.svelte
(2 hunks)src/routes/(console)/project-[region]-[project]/databases/database-[database]/subNavigation.svelte
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: e2e
🔇 Additional comments (2)
src/lib/layout/shell.svelte (2)
21-21
: Import looks goodUsing
isTabletViewport
here is appropriate to gate mobile/tablet behavior.
105-123
: I need to inspect the codebase to verify the reactive state derivation and transitions. Running a few scripts for context and pattern searches.
What does this PR do?
Fixes an issue with sidebar always opening on small viewports on databases screens.
Test Plan
Manual.
Screen.Recording.2025-09-04.at.10.04.03.AM.mov
Related PRs and Issues
N/A.
Have you read the Contributing Guidelines on issues?
Yes.
Summary by CodeRabbit
New Features
Bug Fixes
Chores