Skip to content

APP-836 fix: canvas pivot table should fill full widget width#9157

Draft
Di7design wants to merge 8 commits intomainfrom
di-rill/fix-canvas-pivot-table-full-width
Draft

APP-836 fix: canvas pivot table should fill full widget width#9157
Di7design wants to merge 8 commits intomainfrom
di-rill/fix-canvas-pivot-table-full-width

Conversation

@Di7design
Copy link
Copy Markdown

  • PivotTable's .table-wrapper used w-fit, sizing the table to content width rather than filling the container
  • When a canvas pivot widget has a title/description, the visible border exposed this gap as a separate resizable-looking box
  • Added fullWidth prop to PivotTable (default false) that switches from w-fit to w-full; passed from CanvasPivotRenderer so canvas pivot tables always fill their widget card
  • Explore dashboard pivot tables are unaffected

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

@Di7design Di7design requested a review from djbarnwal April 1, 2026 17:05
@Di7design Di7design marked this pull request as draft April 1, 2026 17:05
@Di7design Di7design changed the title fix: canvas pivot table should fill full widget width APP-836 fix: canvas pivot table should fill full widget width Apr 1, 2026
Di7design and others added 5 commits April 3, 2026 16:54
The `PivotTable` `.table-wrapper` used `w-fit`, sizing the table to its
content width. When a canvas pivot widget has a title/description, the
renderer adds a visible border, exposing the gap between content width
and container width as a separate resizable-looking box.

Add a `fullWidth` prop to `PivotTable` that switches from `w-fit` to
`w-full`. Pass it from the canvas renderer so the table always fills
its container. Explore dashboard pivot tables are unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…order

When columns are narrower than the container, the table used a fixed
pixel width that didn't fill the available space. Now uses width:100%
with min-width when fullWidth is set, so the table stretches to fill
the container while preserving column resize behavior.

Also removes the right border from the last column in both FlatTable
and NestedTable; the border was applied to the header-cell button
inside th, so the existing th:last-of-type CSS rule had no effect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Making the <table> element width:100% caused the last column to stretch
and created a visible resize bar artifact. The correct approach: only
the .table-wrapper div (which has the border) needs w-full to fill the
container. The <table> inside keeps its natural pixel-based width.

Also removes unused fullWidth prop from FlatTable and NestedTable since
it's no longer passed down from PivotTable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FlatTable's `columnLengths` and NestedTable's `measureLengths` were
declared in `context="module"`, making them singletons shared across
all instances. In canvas dashboards where multiple tables are visible
simultaneously, resizing a column in one table would resize the
matching column in all other tables.

Move the stores from module scope to instance scope so each table
manages its own column widths independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set table width to 100% with min-width as the column sum when
fullWidth is set. Remove max-width from <col> elements so columns
can grow proportionally to fill the extra space, instead of all
extra space being dumped on the last column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Di7design Di7design force-pushed the di-rill/fix-canvas-pivot-table-full-width branch from b8e08d1 to a5ce8e6 Compare April 3, 2026 23:56
Di7design and others added 3 commits April 3, 2026 17:18
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The resizer overlay was using fixed pixel width while the table stretched
to 100%, causing column resize handles to be misaligned with actual column
positions. Now the resizer overlay and its children use flex to distribute
extra space proportionally, matching the table's column distribution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant