-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Hotfix] Fix tabs vertical scroll issue #2369
Conversation
📝 WalkthroughWalkthroughThe pull request introduces a minor styling modification to the Tabs component in the platform's source code. Specifically, the Changes
Poem
Finishing Touches
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 (1)
platform/src/common/components/Tabs/index.jsx (1)
72-72
: Consider documenting the height behaviorSince this change affects the component's layout behavior, it would be helpful to add a brief comment explaining why we're not using viewport height constraints and how the height is now determined.
+ // Height is determined by content to prevent scroll issues className="relative w-full transition-all duration-300 ease-in-out"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
platform/src/common/components/Tabs/index.jsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test-analytics-platform-changes
🔇 Additional comments (2)
platform/src/common/components/Tabs/index.jsx (2)
72-72
: LGTM! Removingh-dvh
should fix the vertical scroll issue.The removal of the dynamic viewport height constraint allows the container to naturally size based on its content, which should resolve the scrolling problems while maintaining the component's responsive behavior.
Line range hint
74-81
: Verify the impact on fixed positioning scenariosSince we removed the viewport height constraint, please verify that this change doesn't affect the component's behavior when
positionFixed={true}
is used, especially in layouts where the tabs need to stick to the viewport.Run this script to find usage examples:
✅ Verification successful
Fixed positioning behavior remains intact and reliable ✅
The removal of the viewport height constraint doesn't affect the fixed positioning functionality. The component maintains proper spacing and layout through explicit height classes (
h-14
for the tabs container andh-8
for the spacer), while the fixed positioning is correctly handled by thefixed
class whenpositionFixed={true}
is used.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for Tabs component usage with positionFixed prop ast-grep --pattern 'Tabs $$$positionFixed={true}$$$' # Alternatively, search for any Tabs usage rg -l "import.*Tabs.*from.*common/components/Tabs" | xargs rg "<Tabs.*positionFixed"Length of output: 141
Script:
#!/bin/bash # Find all possible Tabs imports and usages with broader patterns rg -i "import.*tabs.*from" --type jsx --type tsx # Find any Tabs component usage rg -i "<tabs.*>" --type jsx --type tsx # Look for position-fixed or positionFixed prop specifically rg -i "position-?fixed" --type jsx --type tsx # Examine the Tabs component implementation cat platform/src/common/components/Tabs/index.jsxLength of output: 2997
New next-platform changes available for preview here |
This pull request includes a small change to the
Tabs
component in theplatform/src/common/components/Tabs/index.jsx
file. The change removes theh-dvh
class from thediv
element's className attribute.platform/src/common/components/Tabs/index.jsx
: Removed theh-dvh
class from thediv
element's className attribute to potentially fix or improve layout behavior.Summary by CodeRabbit