[2.x] fix(core): DetailedDropdownItem check and option icons overlap in phone dropdown menus#4822
Merged
imorland merged 1 commit intoJul 23, 2026
Conversation
imorland
approved these changes
Jul 23, 2026
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.
Fixes #4820
What / why
On phone-width viewports, dropdown menus built from
DetailedDropdownItemrender the active row's check icon and the row's own option icon crammed together in the left gutter. The visible case is flarum-subscriptions' follow menu, where the check and the star land on top of each other, but any consumer of the component hits it. Desktop renders the same menu correctly.Root cause
The phone treatment in
Dropdown.lessassumes one icon per menu row:&.hasIcon { padding-left: 50px; }indents the row and.Button-icon { margin-left: -30px; }pulls the icon back into the gutter..Button-iconthere is a descendant selector, andDetailedDropdownItemrenders two.Button-icons (the check inside its 16pxDetailedDropdownItem-checkIconcolumn and the option icon inside its 25px content grid column), so both icons get pulled 30px left and collide.DetailedDropdownItem.lesshas no phone rules to compensate.Fix
Scope the gutter treatment away from this component with a phone block in
DetailedDropdownItem.less: reset the icons'margin-leftto 0 and the row'spadding-leftto the normal 20px. The menu row isdisplay: flexat all widths, so the component's own columns then lay the row out exactly like desktop: check column, option icon, label, with the icons of active and inactive rows aligned. The selector out-specifies the phone rules inDropdown.less, so import order does not matter, and single-icon menu items are untouched.I left the issue's "related polish" point (the phone active-row highlight never applying to these rows because the
linever gets theactiveclass) out of this PR to keep it minimal; happy to follow up on that separately if wanted.Testing
Reproduced on a clean 2.x-dev install with flarum-subscriptions, headless Chromium driven over CDP at 390x844: logged in, followed a discussion, opened the subscription menu. Before the change the "Following" row's check and star icons overlap (bounding boxes at x=35 and x=45, both 16px wide); after it the check sits at x=20 and the option icon at x=45, matching the option-icon column of the inactive rows, and the menu visually matches the desktop layout. Desktop is unaffected (the block is inside
@media @phone).