-
Notifications
You must be signed in to change notification settings - Fork 545
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
increase zIndex of modal sidebar to fix resize bug #4860
Conversation
WalkthroughThe changes involve the addition of the 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
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (1)
app/packages/core/src/components/Sidebar/Sidebar.tsx (1)
710-713
: LGTM: Effective use of MUI theme for z-indexThe addition of the
style
prop to theResizable
component effectively addresses the resize bug mentioned in the PR objectives. The conditional setting ofzIndex
for modal mode is a good approach.Consider extracting the style object to a separate constant for improved readability:
const resizableStyle = { borderTopRightRadius: 8, ...(modal && { zIndex: muiTheme.zIndex.tooltip + 1 }), };Then use it like this:
<Resizable // ... other props style={resizableStyle} >This change would make the component props more concise and easier to read.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- app/packages/core/src/components/Sidebar/Sidebar.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/packages/core/src/components/Sidebar/Sidebar.tsx (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
🔇 Additional comments (2)
app/packages/core/src/components/Sidebar/Sidebar.tsx (2)
14-14
: LGTM: Good use of import aliasingThe addition of the
useTheme
import from Material-UI and aliasing it asuseMUITheme
is a good practice. It avoids naming conflicts with the existinguseTheme
import and clearly indicates the source of the theme hook.
697-697
: LGTM: Proper use of MUI theme hookThe addition of the
muiTheme
constant using theuseMUITheme
hook is correct and follows React best practices. The naming is clear and consistent with the import alias.
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.
lgtm! 🚀 🎖️
What changes are proposed in this pull request?
increase zIndex of modal sidebar to fix resize bug
How is this patch tested? If it is not, please explain why.
By resizing the sidebar in modal
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit
New Features
Resizable
component in theInteractiveSidebar
, enhancing its visual integration with Material-UI.Bug Fixes
zIndex
handling for theResizable
component when a modal is active, ensuring proper layering in the UI.