Repository navigation
Let scrolling filter cards grow into free space - #4
Merged
Merged
Conversation
In Standard density a long filter card was capped at five rows and scrolled even when the column next to it had room to spare (Pathologic TNM in Staging & Disease Extent, Disease or Disorder in Cancer Type & Primary Site). The slack code that should have let it grow existed, but only ran in Compact+ density, and never saw the real columns: the grid is a Masonry that places cards itself, so the planner was handed one card per "column". - packColumnsInOrder plans the real columns with the Masonry's own rule (each card, in order, into the shortest column), from natural heights so the plan does not move as cards grow. buildFilterSectionLayout uses it when a section has a card that scrolls and two or more columns. - The section's cards are rendered in those planned columns, and the free space in a column goes to its scrolling cards, never past their own content, so short cards no longer stretch into empty panels. - Free space is handed out in whole rows, round-robin to the cards given the fewest and neediest first, so 37px becomes one usable row for one card rather than three unusable slivers. - Scrolling cards end on a whole row (at any font scale) instead of mid-row, using row height, first-row offset and chrome measured from the DOM. - Sections that mix OMOP cards with injected attribute cards (Cancer Type & Primary Site) are planned over all their cards together. - A stretched card's natural height is derived from its current cap rather than a frozen old reading, which had gone stale once caps were snapped to rows and made the planner overestimate its column. Verified in a browser at 820, 1000, 1400 and 1900px across all nine sections: no free space beside a card that needs it, every scrolling card ends on a whole row, heights are stable, and re-planning after a filter change does not loop. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Scrolling filter cards grow into free column space beside them, in all filter sections.
🤖 Generated with Claude Code