-
-
Notifications
You must be signed in to change notification settings - Fork 53
Bugfix double scrollbar #816
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
|
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
docs/app/docs/layout.tsxOops! Something went wrong! :( ESLint: 8.56.0 ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct. The config "next/core-web-vitals" was referenced from the config file in "/docs/.eslintrc.json". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. WalkthroughThe pull request involves minor layout adjustments in two files: Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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 (2)
docs/app/docs/layout.tsx (2)
11-11: Consider using CSS custom properties for viewport heights.While reducing the height from 94vh to 90vh helps address the double scrollbar issue, consider using CSS custom properties to make these magic numbers more maintainable:
-<div data-accent-color="blue" className="flex space-x-2 w-full h-[90vh] overflow-hidden"> +<div data-accent-color="blue" className="flex space-x-2 w-full h-[var(--docs-content-height,90vh)] overflow-hidden">This would allow easier adjustments across different viewport sizes and better maintainability.
9-9: Use proper TypeScript types instead ofany.Replace the
anytype with proper React types for better type safety:-const Layout = ({ children }: any) => { +import { ReactNode } from 'react'; + +interface LayoutProps { + children: ReactNode; +} + +const Layout = ({ children }: LayoutProps) => {This will:
- Provide proper type checking
- Improve code maintainability
- Better document the component's API
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/app/docs/layout.tsx(1 hunks)docs/components/navigation/Navigation.js(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/components/navigation/Navigation.js
🔇 Additional comments (1)
docs/app/docs/layout.tsx (1)
14-14: 🛠️ Refactor suggestionReplace
overflow-y-scrollwithoverflow-y-autofor better UX.To complement the changes in the Navigation component and fully resolve the double scrollbar issue, consider changing the overflow behavior in the content section as well:
-<div className='lg:px-4 text-gray-1000 flex-1 flex flex-col gap-4 overflow-y-scroll pt-2' id="docs-content"> +<div className='lg:px-4 text-gray-1000 flex-1 flex flex-col gap-4 overflow-y-auto pt-2' id="docs-content">This change will:
- Show scrollbars only when content overflows
- Provide a more consistent scrolling experience
- Complete the fix for the double scrollbar issue
Likely invalid or redundant comment.
Remove the double scrollbar and hidden scrollbar arrows with hamburger menu
Before...

After...

Summary by CodeRabbit