Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Resize columns option in web UI #2358

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ericlln
Copy link
Contributor

@ericlln ericlln commented Feb 4, 2025

Following below draft spec by @dsmmcken

  • Resize Column: If the column is currently manually sized, switch it to auto-resize, and reset the max column width seen to only what's in the current viewport (NOT the max ever seen, but the actual max visible in current viewport). If the column is currently auto sized, set the column to manual and size to max column width seen in the current viewport.
  • The assumption that can be made is that whatever the current behaviour is, it’s not what the users wants, so no need to require the user to make a conscious choice between auto and resize, just present one option to resize, and do the opposite of what we are doing currently.
  • Resize All Columns: Same behaviour as above but apply across all columns, and treat like an indeterminate checkbox. If any are manual, resize all as above, but flip all to manual. If all are manual, resize and flip all to auto.
  • We should try this and see if it feels natural.

Fixed an issue where double clicking the column separator in the header bar resizes the column without changing the column to auto resize.

  • There is now a discrepancy between double clicking the column separator in the header bar and clicking "Resize Column", as the former auto-resizes to the largest cached width, whilst the latter resizes to the width of content in the current viewport.
  • I assume double clicking the column separator follows the behaviour of Excel so this discrepancy is intended.

Below is a useful snippet for testing, that creates a table that has two columns that continuously gets bigger

from deephaven import time_table

tt = time_table("PT0.5s").update(["x=`a`.repeat(i)", "y=`b`.repeat(i)"])

Closes #1486

@ericlln ericlln requested a review from a team February 4, 2025 21:49
@ericlln ericlln self-assigned this Feb 4, 2025
@ericlln ericlln requested review from vbabich and dsmmcken and removed request for a team February 4, 2025 21:49
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 11.47541% with 54 lines in your changes missing coverage. Please review.

Project coverage is 46.70%. Comparing base (680f015) to head (7475e25).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
packages/iris-grid/src/IrisGrid.tsx 0.00% 34 Missing ⚠️
packages/grid/src/GridMetricCalculator.ts 38.88% 11 Missing ⚠️
...d/src/mousehandlers/IrisGridContextMenuHandler.tsx 0.00% 6 Missing ⚠️
packages/iris-grid/src/IrisGridMetricCalculator.ts 0.00% 2 Missing ⚠️
...id/src/mouse-handlers/GridSeparatorMouseHandler.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2358      +/-   ##
==========================================
- Coverage   46.76%   46.70%   -0.06%     
==========================================
  Files         710      710              
  Lines       39107    39170      +63     
  Branches     9773     9966     +193     
==========================================
+ Hits        18288    18294       +6     
- Misses      20808    20822      +14     
- Partials       11       54      +43     
Flag Coverage Δ
unit 46.70% <11.47%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

"Resize all columns" option in context menu on column headers
1 participant