rill icon indicating copy to clipboard operation
rill copied to clipboard

pivot: resize column ux

Open briangregoryholmes opened this issue 1 year ago • 2 comments

Updates the UX for resizing columns in the pivot table by extending the handle vertically across the entire table.

briangregoryholmes avatar May 31 '24 15:05 briangregoryholmes

@jkhwu @ericokuma

briangregoryholmes avatar Jul 09 '24 15:07 briangregoryholmes

Works well!

Just a minor nit, it seems to not be horizontally aligned: Screenshot 2024-07-09 at 9 51 50 AM

ericokuma avatar Jul 09 '24 16:07 ericokuma

The resizing is a bit buggy for me. After expanding or contracting the column width, it takes the default width and is not respecting the user defined width

https://github.com/user-attachments/assets/320abfc8-f442-4c2f-bb7c-e3a3df93a45a

djbarnwal avatar Aug 30 '24 08:08 djbarnwal

This was being caused by the behavior and placement of the removeActiveCell function.

  1. I've moved this behavior to the PivotToolbar component, which is the only place it can practically be. Its use with the clickOutside action meant that it was being triggered on mouse up when dragging. Because of the point below, this was resetting the column widths. Click outside does not really capture the intended cancellation behavior as clicking things like the panel toggle, export button or search bar would clear the active cell. It's now only cancelled when clicking the empty space above the pivot table (between the panel toggle and export buttons).
  2. Toggling the active cell causes the entire config object to be re-derived, which in turn causes the column widths to be reset and, independently, the table to re-render . I've changed the implementation of the measureLengths so that this is avoided, but I think we should isolate the activeCell state (and really any non-data state) so that this isn't happening in the background.

briangregoryholmes avatar Aug 30 '24 17:08 briangregoryholmes