Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the projections section table UX by changing section-wide selection behavior and adding direct table-header controls for column ordering and resizing.
Changes:
- Makes the header checkbox select/deselect projections across the whole section instead of only the visible page.
- Replaces picker-based column move/width controls with header drag-and-drop and resize handles.
- Adds
@tanstack/react-tableto frontend dependencies, though it is not currently used.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
frontend/src/components/projections/SectionTable.tsx |
Updates selection semantics, column visibility UI, drag reorder, resize behavior, and row keys. |
frontend/package.json |
Adds @tanstack/react-table dependency. |
frontend/package-lock.json |
Locks the newly added TanStack table packages. |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| onChange={toggleSectionAll} | ||
| className="accent-teal-500" | ||
| title="Select all rows on this page" | ||
| title={allSectionSelected ? 'Deselect all rows in this section' : `Select all ${allPageProjectionIds.length} rows in this section (across all pages)`} |
| if (!r) return | ||
| const delta = e.clientX - r.startX | ||
| const newWidth = Math.max(40, Math.min(1200, Math.round(r.startWidth + delta))) | ||
| setPrefs(p => ({ ...p, widths: { ...p.widths, [r.col]: newWidth } })) |
Comment on lines
+299
to
+300
| vis.splice(fromIdx, 1) | ||
| vis.splice(toIdx, 0, from) |
| "preview": "vite preview" | ||
| }, | ||
| "dependencies": { | ||
| "@tanstack/react-table": "^8.21.3", |
| @@ -73,12 +73,19 @@ export default function SectionTable({ | |||
| const rowKey = (row: Record<string, string>) => row.projection_id || '' | |||
| const pageProjectionIds = Array.from(new Set(pageRows.map(rowKey).filter(Boolean))) | |||
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.
No description provided.