Skip to content

Grids: put the search box inline with the buttons - #1760

Merged
fog-workflows[bot] merged 1 commit into
working-1.6from
fix/datatables-search-inline
Sep 11, 2026
Merged

fog-workflows[bot] merged 1 commit into
working-1.6from
fix/datatables-search-inline

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Problem

Every grid put its search box on a row of its own above the buttons. The row held one input on the right and nothing on the left, so each grid lost a line of height to blank space.

Cause

The shared DataTables dom string in fogDefaults() (fog.common.js) placed f in a row above B: <'row'<'col-sm-6'l><'col-sm-6'f>>B.

Change

  • Both dom strings (paged and infinite scroll) now put the length menu, the buttons and search in one flex row, .fog-dt-toolbar, with search pushed right.
  • .fog-dt-search in fog-default-ui.scss lets the search box shrink from 20rem down to 10rem, so it stays beside a wide button bar. Its min-width is explicit on purpose. The default (auto) resolves to the input's intrinsic ~280px, and that value, not the flex basis, decides whether the box fits on the line.
  • If even 10rem does not fit, search wraps to its own line, still right-aligned.
  • fog-default-ui.min.css rebuilt with sass 1.77.8. FOG_BCACHE_VER 367 → 368.

Verification

A Playwright A/B on the lab server. The only difference between runs was the served fog.common.js and fog-default-ui.min.css: deployed copy, or this branch's copy. Host list toolbar height, from the top of the grid to the table:

Window Before After
1920px 77px 33px
1600px 77px 33px
1000px 110px 106px (the buttons themselves wrap)
420px 194px 178px

No width scrolls the page sideways. The agent activity grid, with fewer buttons, also goes from 77px to 33px at 1600px.

tests/datatables-search-inline.test.php pins both dom strings, the SCSS rule and the compiled rule. Three mutations each turn it red: the old dom string, min-width dropped from the SCSS, and the .min.css left unrebuilt.

Not verified live: paged mode, the one variant that shows the length menu. Forcing #scrollMode in the test browser did not change how the grid initialized. The paged string differs from the infinite one only by l in the same toolbar, and the test pins it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CS4se5nzmQWk9Cf3dinW4p

The shared DataTables dom string gave search a row of its own above the
buttons, which spent a full line of height on one input and left the
rest of that line blank on every grid. Length menu, buttons and search
now share one flex row, with search pushed right.

The search wrapper gets an explicit min-width. A flex item's default
min-width (auto) is the input's intrinsic ~280px, which beside the host
list's button bar wrapped search onto its own line below the buttons at
a 1600px window. Measured on the lab server, host list toolbar height:

  window   before   after
  1920px   77px     33px
  1600px   77px     33px
  1000px   110px    106px  (the buttons themselves wrap here)
  420px    194px    178px

fog-default-ui.min.css rebuilt with sass 1.77.8; FOG_BCACHE_VER 368.
tests/datatables-search-inline.test.php pins the dom strings, the SCSS
rule and the compiled rule; three mutations each turn it red.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CS4se5nzmQWk9Cf3dinW4p
@fog-workflows
fog-workflows Bot enabled auto-merge September 11, 2026 12:41
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Sep 11, 2026
Merged via the queue into working-1.6 with commit 7e96424 Sep 11, 2026
11 checks passed
@fog-workflows
fog-workflows Bot deleted the fix/datatables-search-inline branch September 11, 2026 12:50
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.

1 participant