Skip to content

Upgrade Student Table to react-table v8 #7826

Draft
lizzie-liu wants to merge 7 commits intoMarkUsProject:masterfrom
lizzie-liu:upgrade-student-table
Draft

Upgrade Student Table to react-table v8 #7826
lizzie-liu wants to merge 7 commits intoMarkUsProject:masterfrom
lizzie-liu:upgrade-student-table

Conversation

@lizzie-liu
Copy link
Contributor

@lizzie-liu lizzie-liu commented Feb 12, 2026

Proposed Changes

  • Migrated the Student Table to use @tanstack/react-table v8
  • Updated the base Table component to support row selection using TanStack’s built-in row selection API
  • Updated the base Table component to render a loading spinner at the top of the table when it's in loading state
    • Loading spinner appears at top of table when loading={true} and rows exist (see Screenshot 1)
    • Retained original behavior of showing spinner in empty table state

Notes:
I had to manually implement the loading spinner UI since TanStack Table v8 is a headless library with no built-in UI components, unlike the old table which had built-in loading overlay rendering in its core table implementation.

The original table displayed the loading spinner overlayed on top of the last few rows of the table, but I placed the loading spinner at the top instead since:

  • .rt-tbody has overflow-y: scroll and flex-direction: column
  • When adding the spinner after the row elements in the normal document flow, it gets pushed below the visible scroll area and isn't visible to users
  • To overlay it on the bottom rows, it would require absolute positioning with inline styles

I did implement a version with the original bottom-overlay positioning (see Screenshot 2), but it required inline CSS for absolute positioning, which I think would be harder to maintain?

Would it be better to keep the original bottom-overlay behavior despite the inline styling, or is the top placement (current implementation) a better option?

Details

Screenshot 1
image

Screenshot 2
image

Associated documentation repository pull request (if applicable)

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality) X
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.

After opening your pull request:

  • I have updated the project Changelog (this is required for all changes).
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

(Include any questions or comments you have regarding your changes.)

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