python-bigquery-dataframes icon indicating copy to clipboard operation
python-bigquery-dataframes copied to clipboard

feat: Implement column sorting for interactive table widget

Open shuoweil opened this issue 1 month ago • 2 comments

This PR introduces column sorting functionality to the interactive table widget.

  1. Updated Python backend and JS/CSS frontend to allow sorting by columns. Three-State Sorting UI:

    • The sort indicator dot () is now hidden by default and only appears when the user hovers the mouse over a column header
    • Implemented a sorting cycle: unsorted () → ascending () → descending () → unsorted ().
    • Visual indicators (●, ▲, ▼) are displayed in column headers to reflect the current sort state.
    • Sorting controls are now only enabled for columns with orderable data types.
  2. Tests 2.1) Updated paginated_pandas_df fixture for better sorting test coverage 2.2) Added new system tests to verify ascending, descending, and multi-column sorting.

  3. Docs has been updated to document the new features. The main description now mentions column sorting and adjustable widths, and a new section has been added to explain how to use the column resizing feature. The sorting section was also updated to mention that the indicators are only visible on hover.

Fixes #<459835971> 🦕

shuoweil avatar Nov 11 '25 19:11 shuoweil

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tswast Upon checking, the failed e2e tests FAILED tests/system/large/functions/test_remote_function.py::test_remote_function_max_instances[set-None] FAILED tests/system/large/functions/test_remote_function.py::test_remote_function_max_instances[no-set] are not due to my change.

shuoweil avatar Nov 14 '25 21:11 shuoweil