-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
chore: fix sidebar mobile responsiveness. #38159
Conversation
WalkthroughThe changes in this pull request primarily involve modifications to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 (3)
app/client/packages/design-system/widgets/src/components/Sidebar/src/Sidebar.tsx (1)
87-87
: LGTM: Clean data attribute implementation.Good use of undefined for falsy state to keep the DOM clean. Consider using a boolean attribute pattern for consistency with other data attributes in the component.
-data-is-mobile={isMobile ? "" : undefined} +data-is-mobile={isMobile || undefined}app/client/packages/design-system/widgets/src/components/Sidebar/src/styles.module.css (2)
25-30
: LGTM: Clean responsive design approach.Good use of attribute selectors and container queries. The removal of media queries in favor of attribute-based selectors improves maintainability.
Consider adding
will-change: width
to optimize animations if performance profiling shows benefits.
111-118
: LGTM: Clean border handling for mobile/full-width states.Good use of :is() for combining conditions. However, complex selectors might impact performance.
Consider splitting the selector for better performance:
.mainSidebar[data-is-mobile] .sidebar, .mainSidebar[data-state="full-width"][data-side="start"] .sidebar { border-inline-end: none; }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/client/packages/design-system/widgets/src/components/Sidebar/src/Sidebar.tsx
(2 hunks)app/client/packages/design-system/widgets/src/components/Sidebar/src/styles.module.css
(2 hunks)
🔇 Additional comments (3)
app/client/packages/design-system/widgets/src/components/Sidebar/src/Sidebar.tsx (1)
26-26
: LGTM: Clean hook usage for mobile state.
The addition of isMobile
state follows React best practices for responsive design.
app/client/packages/design-system/widgets/src/components/Sidebar/src/styles.module.css (2)
103-105
: LGTM: Good RTL support.
Proper use of logical properties for RTL compatibility.
107-109
: LGTM: Consistent border handling.
Maintains symmetry with start position styling.
CleanShot.2024-12-13.at.16.22.10.mp4
/ok-to-test tags="@tag.Anvil"
Summary by CodeRabbit
New Features
Bug Fixes
Style
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12314321713
Commit: 3ee6c76
Cypress dashboard.
Tags:
@tag.Anvil
Spec:
Fri, 13 Dec 2024 11:17:26 UTC