fix(collections): match the collection folder rail's card size to the active Home layout - #287
Merged
ghbarker merged 1 commit intoSep 8, 2026
Conversation
… ACTIVE Home layout PR #282 made the folder rail reuse Home's actual BoardCell/CardFocusRise widget, but fed it homeRailPosterWidth — the classic board's poster-size formula. Canvas, the shipped TV default, sizes its own shelf by a completely different formula (cardH = boardH*0.30 clamped 150-220, then cardW = cardH * aspect) with different padding grammar, so on the default layout the folder rail's widget was right but its SIZE still didn't match what the viewer's actual Home renders. Added canvasRailCardSize (home_rail_metrics.dart), the same formula CanvasStage.build uses, and switched the folder screen to pick between it and the classic formula based on StorageService.tvHomeStyleCached — so "Rows" reads as this device's actual Home, not just some Home. Added a regression test that fails to even compile against the pre-fix code (canvasRailCardSize didn't exist) and passes after, covering both the classic and Canvas card sizes.
This was referenced Sep 8, 2026
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.
Summary
BoardCell/CardFocusRisewidget, but fed ithomeRailPosterWidth— the CLASSIC board's poster-size formula.cardH = boardH*0.30 clamped 150-220,cardW = cardH * aspect, 48px padding vs classic's own numbers). So on the default layout, the folder rail used the right widget but still didn't match what the viewer's actual Home renders — matches the "still wrong" report even after Collection folder rails: reuse Home's actual row widget #282.canvasRailCardSize(home_rail_metrics.dart), the same formulaCanvasStage.builduses, and switched the folder screen to pick between it and the classic formula based onStorageService.tvHomeStyleCached.Test plan
collection_folder_canvas_card_size_test.dart) — fails to even compile against the pre-fix code (canvasRailCardSizedidn't exist), passes after; covers both the classic and Canvas card sizescollection_folder_screen_test.dart/board_shelf_row_test.dartall still passflutter analyzeclean on changed filesdart tool/check_layering.dart— no new violations