Skip to content

[3.0] Put the admin search box back beside its heading, not in front of it - #9449

Merged
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/admin-search-order
Aug 10, 2026
Merged

[3.0] Put the admin search box back beside its heading, not in front of it#9449
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/admin-search-order

Conversation

@albertlast

@albertlast albertlast commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Every admin page carries a bar holding the quick search form and the heading for the page. The form comes first in the markup, and .admin_search carries float: right, so the heading sat on the left and the search box on the right.

b81b1fa (#9390) made div.cat_bar a flex row so a sibling could sit beside the heading. A float is ignored on a flex item, so the two now come out in source order, and the search box has been sitting on the left with the heading pushed over beside it. That was an unintended side effect of #9390 — mine — and this puts it right.

Putting the heading first restores the old layout, this time through the rule the other bars already use:

div.cat_bar > h3,
div.title_bar > h3,
div.title_bar > h4 {
	flex: 1;
}

Two places emit that bar and both needed the same change:

  • template_generic_menu_tabs() in GenericMenu.template.php — every admin page
  • template_admin_search_results() in Admin.template.php — the results page, which builds a bar of its own

It reads better in that order anyway: the heading says what the page is before the control that changes it.

Verification

Each page loaded in a 1200px frame, measuring getBoundingClientRect() on the bar and its two children.

page heading x → search form x →
area=admin 396 → 72 72 → 786
area=manageboards 396 → 72 72 → 786
area=permissions 396 → 72 72 → 786
area=maintain 396 → 72 72 → 786
area=viewmembers 396 → 72 72 → 800
area=search (results) 382 → 58 58 → 528

The bar box itself is unchanged throughout — 1038–1052px wide, 35px tall — so only the two children swap ends.

float: right on .admin_search is inert now rather than wrong, so it is left alone — it would matter again if that bar ever stopped being a flex row.

Issues References (Fixes|Related|Closes)

Related: #9390, #7933

Every admin page has a bar holding the quick search form and the heading for
the page. The form came first in the markup and .admin_search floats right,
so the heading sat on the left and the search box on the right.

Making .cat_bar a flex row in b81b1fa took the float out of play - a float is
ignored on a flex item - so the two come out in source order now, and the
search box has been sitting on the left with the heading pushed over beside
it. Putting the heading first restores the old layout, this time through
div.cat_bar > h3 { flex: 1 }, which is how the other bars already do it.

Two places emit that bar, and both needed it: template_generic_menu_tabs(),
which draws it on every admin page, and template_admin_search_results() for
the results page, which has a bar of its own.

It reads better in that order too: the heading says what the page is before
the control that changes it.

Measured across six pages, bar box unchanged at 1038-1052px wide and 35px
tall:

	before  form at x=72,  heading at x=396
	after   heading at x=72, form at x=786

The float: right on .admin_search is inert now rather than wrong, so it is
left alone; it would matter again if that bar ever stopped being flex.

Signed-off-by: Mathias Albert <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@albertlast
albertlast force-pushed the 3.0/admin-search-order branch from e30788c to 482dfa6 Compare August 9, 2026 12:52
@albertlast albertlast changed the title [3.0] Put the admin search results heading back on the left [3.0] Put the admin search box back beside its heading, not in front of it Aug 9, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 6 milestone Aug 9, 2026
@live627 live627 added Regression A recent change has introduced a new bug. Theme labels Aug 10, 2026
@live627
live627 merged commit b9323f7 into SimpleMachines:release-3.0 Aug 10, 2026
4 checks passed
@jdarwood007 jdarwood007 modified the milestones: 3.0 Alpha 6, 3.0 Alpha 5 Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Administrative Regression A recent change has introduced a new bug. Theme

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants