Skip to content

Conversation

@severo
Copy link
Contributor

@severo severo commented Dec 19, 2025

Pure refactoring.

To prepare #347, where we will have two modes (normal vs virtual scroll, depending on the number of rows)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the HighTable component architecture to prepare for virtual scrolling on big tables by decomposing a monolithic component into smaller, focused modules.

  • Extracts scroll management logic into a new Scroller component
  • Separates table rendering logic into a new Slice component
  • Creates a new Wrapper component to manage provider composition
  • Introduces ErrorContext to centralize error handling across components
  • Removes ViewportProvider and PortalContainerProvider in favor of simpler patterns

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/providers/ViewportProvider.tsx Deleted - viewport tracking moved to Scroller component
src/providers/PortalContainerProvider.tsx Deleted - replaced with inline context provider in Wrapper
src/contexts/ViewportContext.ts Deleted - viewport width now passed as prop instead of context
src/contexts/ErrorContext.ts New context for centralized error handling across components
src/components/HighTable/constants.ts New file extracting shared constants (row height, padding, overscan, aria offset)
src/components/HighTable/Wrapper.tsx New wrapper component managing provider composition and viewport width state
src/components/HighTable/Slice.tsx New component handling data fetching and table rendering for visible rows
src/components/HighTable/Scroller.tsx New component managing scroll state, viewport tracking, and cell navigation scrolling
src/components/HighTable/HighTable.tsx Simplified to only provide ErrorContext and DataProvider, delegating to Wrapper
src/providers/SelectionProvider.tsx Updated to use ErrorContext instead of onError prop parameter
src/providers/ColumnWidthsProvider.tsx Updated to receive viewportWidth as prop instead of from ViewportContext
src/providers/CellNavigationProvider.tsx Minor TODO comment clarification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@severo
Copy link
Contributor Author

severo commented Dec 22, 2025

OK, merging. I think it's a clarity and decorrelation improvement

@severo severo merged commit dd2b16b into master Dec 22, 2025
11 checks passed
@severo severo deleted the add-rows-slice-provider branch December 22, 2025 13:38
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