Repository navigation
fix(wework): anchor environment popover to trigger - #1834
Merged
Merged
Conversation
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughEnvironmentInfoPopover now computes its position dynamically from the anchor element's bounding rect instead of using static CSS placement, updating on open, window resize, and scroll events via new state and helper logic. Corresponding tests validate the computed left/top inline styles and absence of static placement classes. ChangesEnvironment Info Popover Positioning
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant EnvironmentInfoPopover
participant Window
User->>EnvironmentInfoPopover: click trigger
EnvironmentInfoPopover->>EnvironmentInfoPopover: handleToggleOpen computes popoverPosition from rootRef
EnvironmentInfoPopover->>EnvironmentInfoPopover: render popover with popoverStyle
Window->>EnvironmentInfoPopover: resize/scroll event
EnvironmentInfoPopover->>EnvironmentInfoPopover: updatePopoverPosition recomputes position
EnvironmentInfoPopover->>EnvironmentInfoPopover: update popoverStyle
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
qdaxb
marked this pull request as ready for review
July 9, 2026 07:59
This was referenced Jul 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root Cause
The environment info popover was rendered through a portal with fixed
right-6 top-[76px]classes, so clicking the environment button from a different toolbar area still opened the popover near the viewport edge.Validation
pnpm --filter wework exec eslint src/components/layout/EnvironmentInfoPopover.tsx src/components/layout/workspace-panels/WorkspacePanelActions.test.tsxpnpm --filter wework test -- WorkspacePanelActions.test.tsxDocs were checked and are not needed for this UI bugfix because it does not change API, configuration, or documented workflows.
Summary by CodeRabbit