Skip to content

fix(columns): scroll a column cut off at the board edge into view before its menu opens - #235

Merged
ManukMinasyan merged 1 commit into
4.xfrom
fix/column-menu-scroll-into-view
Nov 15, 2026
Merged

ManukMinasyan merged 1 commit into
4.xfrom
fix/column-menu-scroll-into-view

Conversation

@ManukMinasyan

Copy link
Copy Markdown
Member

Clicking the header of a column that sits partly past the board's edge opened its menu half off screen. The menu opens over its column at the column's width, but nothing scrolled the column into view. The only movement came from focusing the menu's name field, which scrolled just far enough to show that field. Now the board scrolls the column fully inside its padding before the menu opens.

What changed

  • resources/js/flowforge-modern.js: a revealColumn() helper measures the column against the scroller (.ff-columns, or .ff-lanes when grouped) and its computed padding-left / padding-right. It calls scrollBy only when the column is cut off, by the smallest offset that brings it fully inside. A column wider than the view aligns to the start edge.
  • initColumnMenu() already wraps the dropdown's toggle to ignore mousedown. It now reveals the column before toggle or open opens a closed menu, so a click, Enter, Space and Arrow Down all go through it. Closing never scrolls.
  • resources/dist/flowforge-modern.js is rebuilt.

Why this way

  • The gutter comes from the scroller's computed padding, so the column lands where the app's own layout puts the first column. Relaticle pads the board at 16px on phones and 24px from lg. No padding value is hard-coded here.
  • The scroll is instant. A smooth scroll was tried first. On a phone the app shows the menu as a sheet and sets the board to overflow: hidden while it is open, and WebKit stopped the smooth scroll there: the column ended at 260 to 560 in a 390px window, while Chromium finished at 74 to 374. An instant scroll lands before the sheet opens in both engines.
  • Hooking toggle and open rather than columnMenuClick covers keyboard opening, which goes through Filament's dropdown and never reaches the click handler.

Behavior to know about

No view, config or CSS change. A fully visible column never scrolls. In grouped lanes the lane header is its own row, so nothing sticky covers a column revealed at the left.

Tests

  • tests/Browser/ModernBoardTest.php: "clicking the header of a column cut off at the board edge scrolls the column fully into view", with one case for a column cut off at the right and one cut off at the left. Each checks that the column starts clipped, then clicks its header and waits until the column sits inside the scroller's padding. Both cases fail without the change, timing out with the column still clipped.

Checked

  • Both new cases pass in Chromium, and fail with the JS change stashed.
  • In Relaticle, in Chromium and WebKit at 1600px: a column at 1560 to 1860 landed at 1276 to 1576, and one cut off at the left landed at 312 to 612. Each kept the 24px gutter, with the menu over the column and the name field focused. The same held when opened with Enter and in grouped lanes. A fully visible column kept scrollLeft at 0. At 390px both engines brought the column fully in behind the sheet.

Not checked

The full browser suite was still running locally when this opened. CI runs it in both engines.

Copilot AI balanced review requested due to automatic review settings November 15, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ManukMinasyan
ManukMinasyan merged commit 7f9ab19 into 4.x Nov 15, 2026
13 checks passed
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.

2 participants