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

Support multi cell selection in notebook #114156

Closed
rebornix opened this issue Jan 11, 2021 · 11 comments
Closed

Support multi cell selection in notebook #114156

rebornix opened this issue Jan 11, 2021 · 11 comments
Assignees
Labels
feature-request Request for new features or functionality notebook on-testplan
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Jan 11, 2021

The notebook is a list of cells so we may want to support multiple selection, similar to how it works in other list views in the workbench.

@rebornix rebornix added the feature-request Request for new features or functionality label Jan 11, 2021
@rebornix rebornix added this to the January 2021 milestone Jan 11, 2021
@miguelsolorio
Copy link
Contributor

All of these options assume the user is holding down shift/ctrl to select multiple cells and also adds an item to the status bar for total selection count.

Option 1

This option simply re-uses the current selection into the other cells.

notebook-multiselect-option1.mov

Option 2

This option also re-uses the current selection but adds a ✔️ to indicate a cell has been selected in multi-select

notebook-multiselect-option2.mov

Option 3

This options adds a background color to indicate a cell has been selected in multi-select

notebook-multiselect-option3.mov

Option 4

This options adds a background color for multi-selected cells but only shows the border on the active cell. This matches Jupyter's behavior.

notebook-multiselect-option4.mov

@miguelsolorio
Copy link
Contributor

Open questions:

  • Does selecting multiple cells and then clicking the run button only execute the selected cells?
  • What about clicking a run button from a cell at the bottom?

@rebornix
Copy link
Member Author

Does selecting multiple cells and then clicking the run button only execute the selected cells?
What about clicking a run button from a cell at the bottom?

We will sync the cell selections info to the extension host and the extension is fully responsible for execution, the extension can control the behavior: whether all selected cells should be executed, and in visual sequence or selection sequence.

@claudiaregio
Copy link

Great work @misolori! Thanks for coming up with all these options.
I think option 4 provides the best experience.
Options 1 - 3 would require an additional visual cue/element to for users who try to navigate and select through their keyboard.

Option 4 would align with AzNb's plans for mutliselect that follows the fluent ui and the two blue lines clarify current location to user among the selected and would not require an additional visual cue/element. Option 4 would work great for smart select requirements

@claudiaregio
Copy link

@misolori Additional question, where are the actions a user can take with the selected cells surfaced?

@miguelsolorio
Copy link
Contributor

@claudiaregio they'd still appear on hover and whatever actions are taken there would apply for the selected cells. We'd only want to show actions that can be performed in bulk.

@claudiaregio
Copy link

they'd still appear on hover and whatever actions are taken there would apply for the selected cells. We'd only want to show actions that can be performed in bulk.

@misolori would the cell toolbar still appear on hover for any non-selected cells? Or would that interaction be blocked unless a user escapes from the multiselected state?

@miguelsolorio
Copy link
Contributor

@claudiaregio my initial thought was to only show actions for the items that are selected (so it wouldn't show up non-selected cells), but maybe we need to validate that with customer feedback and expectations.

@rchiodo
Copy link
Contributor

rchiodo commented Feb 3, 2021

+1 on Option 4. Makes it clear what's selected and what's the current cell (in case I want to hit shift+enter)

@miguelsolorio
Copy link
Contributor

We now support multi-select in notebooks! This follows the pattern from our list widget, which you can also see in the explorer/any tree list, which supports shift + click and cmd/ctrl + click:

Kapture 2021-03-22 at 11 03 15

We also added a new color token (notebook.inactiveSelectedCellBorder) that has no default but is available for those that prefer to use borders for multi-select instead of background colors:

Kapture 2021-03-22 at 10 49 13

@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook on-testplan
Projects
None yet
Development

No branches or pull requests

6 participants
@rebornix @jrieken @claudiaregio @rchiodo @miguelsolorio and others