Skip to content

Conversation

@shahzadaziz
Copy link
Collaborator

@shahzadaziz shahzadaziz commented Feb 2, 2026

Summary

The versions dropdown menu was appearing detached from its trigger button after a react-tether upgrade, because the absolutely-positioned toggle button gave the tether target wrapper zero dimensions, preventing correct position calculation.

Key Changes

  • -Root Cause: Toggle button had position: absolute, causing the .bdl-DropdownMenu-target wrapper to have 0 dimensions → tether couldn't calculate position
    • Fix: Added targetWrapperClassName="bcs-VersionsItemActions-targetWrapper" to DropdownMenu and positioned the wrapper absolutely instead of the button
    • CSS Changes (VersionsItem.scss):
  • .bcs-VersionsItemActions-targetWrapper → position: absolute; top/right
    • .bcs-VersionsItemActions-toggle → removed position: absolute
  • Additional (VersionsItemActions.js):
    • Added constrainToWindowWithPin prop for better scroll behavior
  • Z-index (VersionsItemActions.scss):
    • Used $overlay-z-index variable instead of hardcoded value

Before

Screenshot 2026-02-02 at 8 25 36 AM

After

Screenshot 2026-02-02 at 9 23 48 AM

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved dropdown menu positioning and visibility in the version history panel to ensure better alignment near window edges and proper layering with other interface elements.

@shahzadaziz shahzadaziz requested review from a team as code owners February 2, 2026 18:08
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Walkthrough

CSS class naming and positioning logic refactored in the Versions sidebar actions component. The action wrapper layout is renamed from toggle to targetWrapper, modernized positioning rules are removed, and dropdown positioning props are introduced alongside z-index styling adjustments.

Changes

Cohort / File(s) Summary
Versions Item CSS Restructuring
src/elements/content-sidebar/versions/VersionsItem.scss
Renames action wrapper class from .bcs-VersionsItemActions-toggle to .bcs-VersionsItemActions-targetWrapper for positioning; removes .bcs-VersionsItemActions-toggle--modernized block while preserving focus styling on the toggle selector.
Versions Item Actions Enhancement
src/elements/content-sidebar/versions/VersionsItemActions.js
Adds constrainToWindowWithPin and targetWrapperClassName="bcs-VersionsItemActions-targetWrapper" props to DropdownMenu for improved layout and positioning behavior.
Versions Item Actions Styling
src/elements/content-sidebar/versions/VersionsItemActions.scss
Introduces z-index rule for nested .dropdown-menu-element selector to increase stacking context using $overlay-z-index variable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • jfox-box
  • tjuanitas
  • myu-box
  • tjiang-box

Poem

🐰 A wrapper renamed, positions refined,
The toggle now focuses, z-indices aligned,
Drop-downs constrained with care and grace,
Modernized rules make room and space! 🎯

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the positioning of the version action dropdown menu after a react-tether upgrade.
Description check ✅ Passed The description provides clear context, root cause analysis, key changes across files, and before/after screenshots demonstrating the fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-version-tether

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ahorowitz123
Copy link
Contributor

Do we need to update any tests?

@shahzadaziz
Copy link
Collaborator Author

Do we need to update any tests?
We do not have visual regressions for these. No other updates were required.

@kduncanhsu kduncanhsu self-requested a review February 2, 2026 18:26
@mergify mergify bot added the queued label Feb 2, 2026
@mergify mergify bot merged commit eab4f4b into master Feb 2, 2026
11 checks passed
@mergify mergify bot deleted the fix-version-tether branch February 2, 2026 18:44
@mergify
Copy link
Contributor

mergify bot commented Feb 2, 2026

Merge Queue Status

✅ The pull request has been merged at c3ff0e6

This pull request spent 7 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Summary
    • check-neutral = Summary
    • check-skipped = Summary
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_test_build
    • check-neutral = lint_test_build
    • check-skipped = lint_test_build
  • any of [🛡 GitHub branch protection]:
    • check-success = license/cla
    • check-neutral = license/cla
    • check-skipped = license/cla
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_pull_request
    • check-neutral = lint_pull_request
    • check-skipped = lint_pull_request

@mergify mergify bot removed the queued label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants