mito-ds / mito

The mitosheet package, trymito.io, and other public Mito code.
https://trymito.io
Other
2.28k stars 155 forks source link

Unable to change the data type on multi-select columns #84

Open twelsh37 opened 2 years ago

twelsh37 commented 2 years ago

Describe the bug If you select multiple columns and you want to assign them all the same dtype the dtype is only assigned to the last column selected.

To Reproduce Steps to reproduce the behavior:

  1. Select multiple columns
  2. In the taskpane change the type to an int or whatever
  3. Note that only the last of the selected columns have its type changed

This happens no matter what dataset you are using. I was trying to change 20 str's to int's In the end I had to complete the action 20 times instead of selecting the 20 columns and carrying out the action once.

Expected behavior Select multiple columns and in the task pane change all the columns to the same dtype

Screenshots image

Desktop (please complete the following information):

naterush commented 2 years ago

Sweet! This is something that is on our radar but we haven't put a ton of thought into. To get this working properly, I think we need to extend the notion of the column control panel to support multiple columns.

@aarondr77 any thoughts on how we might approach this? Would be nice to think of all the features we have in there, and how they might extend to multiple columns...

aarondr77 commented 2 years ago

I think there are a two approaches we could take to this. Potentially doing both:

Create a dataframe version of the column control panel.

It might include:

Add a toolbar button that works with multi select

Continue the flow of letting users multi select columns in the sheet and then edit them all at once via a toolbar button. This is how we support deleting and formatting. It would make sense to multi select and then change the dtype all at once. Notably, this is the approach that @twelsh37 attempted. This approach continues to work as one off solutions, but doesn't address the overall problem with bulk editing. The bulk of the design work here is what to do with the toolbar that is filling up.

Since this quickly becomes a bigger design question, let's create a formal specification for this before implementing.

aarondr77 commented 2 years ago

+1 a pro user just requested this feature