feat(tables): freeze columns#4770
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Frozen columns use Also removes in-header change column type wiring ( Reviewed by Cursor Bugbot for commit b37a049. Configure here. |
Greptile SummaryThis PR adds a "freeze column" (pin-to-left) feature to the Tables grid, persisting state to
Confidence Score: 5/5Safe to merge — the freeze feature is well-contained, no data mutation paths are affected, and the previously identified undo/redo stale-snapshot bug has been addressed. All changes are UI-preference state (sticky offsets, column ordering) with no write path to row data. The undo/redo extension for delete-column correctly reads live frozen state via a getter ref, matching the pattern already used for column widths. The onChangeType removal is intentional per the component docstring. No regressions found in the freeze toggle logic, metadata seeding, or scroll-to-reveal update. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User clicks Freeze/Unfreeze in column menu] --> B{Column has workflowGroupId?}
B -- Yes --> C[Collect all sibling column names in group]
B -- No --> D[Use single column name]
C --> E{Currently frozen?}
D --> E
E -- Unfreeze --> F[Filter siblings out of frozenColumns]
E -- Freeze --> G[Append siblings to frozenColumns]
G --> H[Re-enforce frozen-at-front in columnOrder]
H --> I[setColumnOrder + columnOrderRef]
F --> J[setFrozenColumns + frozenColumnsRef]
I --> J
J --> K[updateMetadata with frozenColumns + columnOrder]
K --> L[Server persists to TableMetadata]
J --> M[frozenColumnSet useMemo]
M --> N[frozenOffsets useMemo key to sticky left px]
M --> O[lastFrozenColKey useMemo]
N --> P[frozenStickyLeftEdge useMemo]
N --> Q[ColumnHeaderMenu stickyLeft + isLastFrozen]
N --> R[WorkflowGroupMetaCell stickyLeft + isLastFrozen]
N --> S[DataRow frozenOffsets + lastFrozenColKey]
P --> T[Scroll-to-reveal inset]
Reviews (5): Last reviewed commit: "fix(tables): use current frozenColumns o..." | Re-trigger Greptile |
…e dead handleChangeType
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6d19730. Configure here.
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6526129. Configure here.
|
@greptile |
|
@cursor review |
Summary
position: stickywith computed left offsets stacked after the checkbox columnbox-shadow) on the rightmost frozen column in both header and data rowsTableMetadataviaupdateMetadataMutation; seeded from metadata on loadfrozenColumns?: string[]toTableMetadatatype andtableMetadataSchemaType of Change
Testing
Tested manually
Checklist