Skip to content

Conversation

@NaccOll
Copy link
Contributor

@NaccOll NaccOll commented Sep 13, 2025

Related GitHub Issue

Closes: #7759

Roo Code Task Context (Optional)

Description

Adjust the position to avoid ContextMenu being blocked in edit mode, so as to achieve an effect similar to the ChatTextArea at the bottom

Test Procedure

In any conversation, select the user message, click Edit, and enter the @ symbol to test whether the context menu is working well.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Documentation Updates

Additional Notes

Get in Touch

NaccOll


Important

Adjusts context menu positioning in ChatTextArea.tsx to ensure visibility during message editing.

  • Behavior:
    • Adjusts context menu position in ChatTextArea.tsx to ensure visibility during message editing.
    • In edit mode, sets left-6 and -mb-3 for context menu positioning.
  • UI:
    • Removes relative class from the main container in edit mode to prevent layout issues.
    • Ensures consistent styling with flex and flex-col classes.

This description was created by Ellipsis for 578943c. You can customize this summary. It will automatically update as commits are pushed.

@NaccOll NaccOll requested review from cte, jr and mrubens as code owners September 13, 2025 00:31
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working UI/UX UI/UX related or focused labels Sep 13, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and found some issues that need attention. While the approach to fix the context menu positioning is valid, there are concerns about potential layout regressions and the robustness of the solution across different viewport sizes.

"relative flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
isEditMode ? "p-2 w-full" : "px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
"flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
isEditMode ? "p-2 w-full" : "relative px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional? Removing relative from the main container and only applying it conditionally to non-edit mode could break the positioning context for child elements in normal mode. This might cause unexpected layout issues.

Could we keep relative on the main container and use a different approach for fixing the edit mode positioning?

"absolute",
"bottom-full",
"left-0",
isEditMode ? "left-6" : "left-0",
Copy link
Contributor

Choose a reason for hiding this comment

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

The hardcoded positioning values (left-6 and -mb-3) might not work well across different screen sizes or container widths. Could we consider a more responsive approach?

Or perhaps calculate the position based on the container's dimensions?

"right-0",
"z-[1000]",
"mb-2",
isEditMode ? "-mb-3" : "mb-2",
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that PR #7760 attempted to fix this issue using z-index adjustments. Have you tested if combining both approaches (z-index + positioning) would provide a more robust solution? This might handle edge cases better.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 13, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Thank you @NaccOll!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 15, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Sep 15, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 15, 2025
@mrubens mrubens merged commit 358519d into RooCodeInc:main Sep 16, 2025
29 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 16, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

The editing information element is obscured (isEditMode = true)

4 participants