Repository navigation
fix(columns): scroll a column cut off at the board edge into view before its menu opens - #235
Merged
Merged
Conversation
…ore its menu opens
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.
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: arevealColumn()helper measures the column against the scroller (.ff-columns, or.ff-laneswhen grouped) and its computedpadding-left/padding-right. It callsscrollByonly 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'stoggleto ignore mousedown. It now reveals the column beforetoggleoropenopens a closed menu, so a click, Enter, Space and Arrow Down all go through it. Closing never scrolls.resources/dist/flowforge-modern.jsis rebuilt.Why this way
lg. No padding value is hard-coded here.overflow: hiddenwhile 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.toggleandopenrather thancolumnMenuClickcovers 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
scrollLeftat 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.