Skip to content

feat: Resize columns option in web UI#2358

Merged
ericlln merged 10 commits intodeephaven:mainfrom
ericlln:DH-18171-resize-all-columns-option-in-web-ui
Feb 18, 2025
Merged

feat: Resize columns option in web UI#2358
ericlln merged 10 commits intodeephaven:mainfrom
ericlln:DH-18171-resize-all-columns-option-in-web-ui

Conversation

@ericlln
Copy link
Copy Markdown
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 dsmmcken and vbabich and removed request for a team February 4, 2025 21:49
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 64.06250% with 23 lines in your changes missing coverage. Please review.

Project coverage is 46.80%. Comparing base (77c620f) to head (125c58a).

Files with missing lines Patch % Lines
packages/grid/src/GridMetricCalculator.ts 33.33% 14 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.80%   +0.03%     
==========================================
  Files         710      710              
  Lines       39168    39224      +56     
  Branches     9783     9974     +191     
==========================================
+ Hits        18318    18357      +39     
+ Misses      20839    20813      -26     
- Partials       11       54      +43     
Flag Coverage Δ
unit 46.80% <64.06%> (+0.03%) ⬆️

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.

dsmmcken
dsmmcken previously approved these changes Feb 6, 2025
Copy link
Copy Markdown
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

approved for behaviour only, no code review performed.

vbabich
vbabich previously approved these changes Feb 6, 2025
@ericlln ericlln dismissed stale reviews from vbabich and dsmmcken via 101a8bd February 7, 2025 18:21
@ericlln ericlln requested a review from vbabich February 7, 2025 18:40
@ericlln ericlln merged commit 35fc599 into deephaven:main Feb 18, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

3 participants