Skip to content

Conversation

Alam-2U
Copy link

@Alam-2U Alam-2U commented Oct 6, 2025

Description

Fixes the issue where the InContext Sidebar post menu dropdown was being forcefully contained within the sidebar container.
This caused the dropdown to be clipped and introduced an unwanted scroll in the sidebar.

Jira Ticket: LP-85


How Has This Been Tested?

  • Verified locally in devstack by opening the InContext Sidebar and clicking the post menu (⋮).
  • Confirmed the dropdown opens correctly without clipping or sidebar scroll on different screen sizes.

Screenshots

Before : Dropdown clipped and causing scroll

Before - dropdown clipped and causing scroll

After : Dropdown fixed without scroll

Screenshot 2025-09-09 223724

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 11:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the InContext Sidebar post menu dropdown was being clipped and causing unwanted scrolling in the sidebar container. The solution involves applying specific CSS positioning to the dropdown when rendered within the in-context sidebar.

  • Added conditional CSS class application to the ActionsDropdown component based on URL parameter detection
  • Implemented CSS styling with fixed positioning and increased z-index for the in-context sidebar dropdown
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/index.scss Added CSS rules for fixed positioning of dropdown in in-context sidebar mode
src/discussions/common/ActionsDropdown.jsx Added logic to detect in-context sidebar mode and conditionally apply CSS class
src/discussions/common/ActionsDropdown.test.jsx Added test coverage for in-context sidebar detection and CSS class application

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +369 to +372
.actions-dropdown.in-context-sidebar {
position: fixed !important;
z-index: 10 !important;
}
Copy link
Preview

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using !important declarations should be avoided as they make CSS harder to maintain and override. Consider using more specific selectors or restructuring the CSS hierarchy to achieve the desired specificity without !important.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants