Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Dec 10, 2025

Followup comment from #6223

@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Dec 10, 2025 7:29pm
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 fixes a bug where cell styles and hover text were incorrectly applied during pagination when tables were sorted in descending order. Previously, the row ID calculation didn't account for the skip offset when descending, causing all pages to show styles for the same last N rows of the dataset instead of the correct rows for each page.

Key Changes:

  • Fixed row ID calculation in _style_cells and _hover_cells to account for pagination offset when sorting in descending order
  • Added descending parameter to _hover_cells method signature for consistency with _style_cells
  • Removed obsolete documentation warning about styling misalignment during sorting
  • Added comprehensive regression test covering multiple pages with descending sort

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
marimo/_plugins/ui/_impl/table.py Fixed row ID calculation for descending sort pagination by subtracting skip offset; added descending parameter to _hover_cells; removed obsolete documentation warning
tests/_plugins/ui/_impl/test_table.py Added regression test verifying cell styles work correctly across all pages when sorted descending with pagination enabled

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

@mscolnick mscolnick merged commit cd62127 into main Dec 11, 2025
33 of 47 checks passed
@mscolnick mscolnick deleted the ms/cell-styles branch December 11, 2025 05:41
@Light2Dark Light2Dark added the bug Something isn't working label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

3 participants