Skip to content

feat(data-weaver): Remove fitCardSize; use default card widths - #457

Merged
pablonoel merged 3 commits into
datacommonsorg:mainfrom
pablonoel:ui_cards_size
Sep 1, 2026
Merged

feat(data-weaver): Remove fitCardSize; use default card widths#457
pablonoel merged 3 commits into
datacommonsorg:mainfrom
pablonoel:ui_cards_size

Conversation

@pablonoel

@pablonoel pablonoel commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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.

card_sizes

Testing Done

Describe the steps you took to test these changes (please also list commands ran if possible).

  • Unit tests passed
  • Integration tests passed
  • Manual verification

Checklist

  • I have followed the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.

Note: Only Maintainers can approve and merge PRs. Expected initial review time: 3 business days.

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.

@gemini-code-assist gemini-code-assist Bot 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.

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.

Comment thread dataweaver/apps/web/src/components/scopes/atlas/atlas_provider.tsx
@pablonoel
pablonoel marked this pull request as ready for review August 31, 2026 21:04
@pablonoel pablonoel changed the title Remove fitCardSize; use default card widths feat(Data-Weaver): Remove fitCardSize; use default card widths Aug 31, 2026
@pablonoel pablonoel changed the title feat(Data-Weaver): Remove fitCardSize; use default card widths feat(data-weaver): Remove fitCardSize; use default card widths Aug 31, 2026
@pablonoel
pablonoel merged commit 2cda2af into datacommonsorg:main Sep 1, 2026
11 checks passed
@pablonoel
pablonoel deleted the ui_cards_size branch September 1, 2026 00:19
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