Skip to content

TINY-4531: Long dropdown menu items will no longer misplace the entry.#10915

Merged
HAFRMO merged 1 commit intomainfrom
feature/TINY-4531
Feb 26, 2026
Merged

TINY-4531: Long dropdown menu items will no longer misplace the entry.#10915
HAFRMO merged 1 commit intomainfrom
feature/TINY-4531

Conversation

@HAFRMO
Copy link
Copy Markdown
Contributor

@HAFRMO HAFRMO commented Feb 20, 2026

Related Ticket: TINY-4531

Description of Changes:
If we change the size of a dropdown component, re-place it on the screen to prevent an issue where very wide content would match it to window size and place it on the far left before the resizing could take affect

Pre-checks:

  • Changelog entry added
  • Tests have been added (if applicable)
  • Branch prefixed with feature/, hotfix/ or spike/

Review:

  • Milestone set
  • Docs ticket created (if applicable)

GitHub issues (if applicable):

Summary by CodeRabbit

  • Bug Fixes
    • Fixed dropdown menus with matchWidth enabled appearing misaligned when containing long content.

@HAFRMO HAFRMO added this to the 8.4 milestone Feb 20, 2026
@HAFRMO HAFRMO requested a review from a team as a code owner February 20, 2026 16:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 20, 2026

Walkthrough

This pull request fixes a positioning bug in dropdown menus with matchWidth: true that could appear offset to the left. It adds a menu repositioning call to the dropdown opening handler and includes a browser test validating the corrected behavior.

Changes

Cohort / File(s) Summary
Changelog Entry
.changes/unreleased/alloy-TINY-4531-2026-02-20.yaml
Documents fix for dropdown menus with matchWidth appearing left of parent element when content is long.
Dropdown Positioning Fix
modules/alloy/src/main/ts/ephox/alloy/dropdown/DropdownUtils.ts
Adds call to TieredMenu.repositionMenus(menu) in the onOpen handler to reposition menus when dropdown opens.
Browser Test
modules/alloy/src/test/ts/browser/ui/dropdown/DropdownListMatchWidthTest.ts
New end-to-end test validating dropdown menu width behavior with matchWidth enabled, verifying menu positioning with fixed layout and correct left offset.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main fix: preventing long dropdown menu items from misplacing the entry, which aligns with the primary change of repositioning menus on dropdown open.
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.


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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/alloy/src/test/ts/browser/ui/dropdown/DropdownListMatchWidthTest.ts`:
- Line 95: The test description string in the it(...) call inside
DropdownListMatchWidthTest (the test named starting "TINY-4531: The dropdown
menu should be placed properly on the left side of the") is truncated; update
the description to a complete sentence such as "TINY-4531: The dropdown menu
should be placed properly on the left side of the dropdown trigger" (or another
accurate target like "input") so the test name clearly states its expectation;
edit the it(...) description in DropdownListMatchWidthTest.ts accordingly.

@HAFRMO HAFRMO merged commit 069cd4b into main Feb 26, 2026
6 checks passed
@HAFRMO HAFRMO deleted the feature/TINY-4531 branch February 26, 2026 14:03
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.

3 participants