feat(data-weaver): Remove fitCardSize; use default card widths - #457
Merged
Conversation
Delete the fitCardSize function and stop capping card widths to the grid column width. atlas_provider now uses CARD_VARIANT_SIZE_DEFAULT directly when placing cards, and register_card_placement no longer imports CARD_SIZE_MIN or implements fitCardSize. PLACEMENT.md updated to reflect that cards use their default widths and rows may run wider than the viewport.
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the fitCardSize utility and its usage, meaning cards will now always use their default width (CARD_VARIANT_SIZE_DEFAULT) instead of being capped to the grid's column width. The documentation in PLACEMENT.md has been updated to reflect this change. Feedback is provided regarding a potential issue where an invalid or missing content.variant could result in an undefined size, potentially corrupting the canvas state; a defensive guard is suggested to prevent this.
pablonoel
marked this pull request as ready for review
August 31, 2026 21:04
pablonoel
requested review from
beets,
miss-o-soup and
nick-nlb
as code owners
August 31, 2026 21:04
beets
approved these changes
Aug 31, 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.
Overview
Card widths to use variant sizes when rendering.
Changes Made
Delete the fitCardSize function and stop capping card widths to the grid column width. atlas_provider now uses CARD_VARIANT_SIZE_DEFAULT directly when placing cards, and register_card_placement no longer imports CARD_SIZE_MIN or implements fitCardSize.
PLACEMENT.md updated to reflect that cards use their default widths and rows may run wider than the viewport.
Testing Done
Describe the steps you took to test these changes (please also list commands ran if possible).
Checklist
Note: Only Maintainers can approve and merge PRs. Expected initial review time: 3 business days.