-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WEB-2765] fix: issue detail page unnecessary scroll #6068
Conversation
WalkthroughThe changes in this pull request involve modifications to the Changes
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
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
🧹 Outside diff range and nitpick comments (1)
web/core/components/core/content-wrapper.tsx (1)
12-14
: Consider a more flexible overflow control approachWhile the implementation is technically correct, the double-layered overflow control might be overly complex:
- Outer div has hard-coded
overflow-hidden
- Inner div has configurable overflow through
className
Consider simplifying by:
- Making the outer div's overflow behavior configurable
- Using a single layer of overflow control where possible
- Adding props specifically for overflow behavior instead of relying on className
Example refactor:
interface ContentWrapperProps { className?: string; preventOverflow?: boolean; children: ReactNode; } export const ContentWrapper = ({ className, preventOverflow = false, children }: ContentWrapperProps) => ( <div className={cn( "h-full w-full", preventOverflow && "overflow-hidden" )}> <div className={cn( "relative h-full w-full", !preventOverflow && "overflow-x-hidden overflow-y-scroll", className )}> {children} </div> </div> );This approach would:
- Make the overflow behavior more explicit and configurable
- Maintain backward compatibility
- Better separate concerns between structural and visual styling
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(detail)/layout.tsx
(1 hunks)web/core/components/core/content-wrapper.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(detail)/layout.tsx
🔇 Additional comments (3)
web/core/components/core/content-wrapper.tsx (3)
4-5
: LGTM! Clean import organization
The addition of the cn
helper import follows proper import organization patterns.
8-8
: LGTM! Well-typed interface extension
The optional className prop is properly typed and maintains backward compatibility.
12-14
: Verify the scroll behavior in issue detail page
Let's ensure this change properly fixes the unnecessary scroll issue without causing other scroll-related problems.
✅ Verification successful
Based on the search results, I can now provide a conclusive response about the scroll behavior changes in the ContentWrapper component.
Scroll behavior changes are safe and consistent with app's design
The changes to ContentWrapper are appropriate as:
- The component is used across many layouts where controlled scrolling is needed
- The new scroll configuration (
overflow-x-hidden overflow-y-scroll
) matches the app's scroll pattern used in other major containers - Other layout components like issue lists, settings pages, and sidebars follow similar overflow patterns with explicit x/y scroll control
- The change helps standardize scroll behavior across the application
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for ContentWrapper usage in issue detail related files
echo "Searching for ContentWrapper usage in issue detail layouts..."
rg -l "ContentWrapper" web/app/.*issues.*layout.tsx
# Check for other scroll-related classes near ContentWrapper usage
echo "Checking for scroll-related classes in layouts..."
rg -B 2 -A 2 "overflow-.*scroll" web/app/.*issues.*layout.tsx
Length of output: 499
Script:
#!/bin/bash
# First, let's find the correct path for issue-related files
echo "Finding issue-related files..."
fd "issues.*layout" web/
# Now let's search for ContentWrapper usage in the entire web directory
echo "Searching for ContentWrapper usage..."
rg -l "ContentWrapper" web/
# Check for scroll-related classes near ContentWrapper usage
echo "Checking for scroll-related classes..."
rg -B 2 -A 2 "overflow-.*scroll" web/
Length of output: 29808
Summary:
This PR addresses following:
Reference:
[WEB-2765]
Summary by CodeRabbit
Summary by CodeRabbit
New Features
ContentWrapper
component to accept an optionalclassName
property for improved styling flexibility.ProjectIssueDetailsLayout
to utilize the newclassName
feature, enabling better control over overflow behavior.IssueDetailRoot
component to improve visual spacing by adjusting padding in the sidebar.Bug Fixes
ContentWrapper
.