Skip to content

Conversation

@dhruvisompura
Copy link
Contributor

@dhruvisompura dhruvisompura commented Nov 14, 2025

Addresses #9848 #10280 #10281 #9992 which are all active cell/focus/selection related bugs and #10470 which just updates the clear output icon to match the icons we use elsewhere in the IDE.

This is a pretty large PR that addresses a number of selection behavior bugs and some selection/hover styling requests as described in the issues above. The root cause for many of these issues was that we didn't really treat a single cell as the one with focus in multi-select scenarios.

Following the commits to understand the changes would be an easy way to understand what each change is doing.

Fixed:

  • Updated "Clear Output" action bar button icon
  • Cell action bar only shows up for active cell in single select and multi-select scenarios
  • The active cell now always shows the blue focus ring around the cell to help differentiate it from a selected cell.
  • Cell actions should now work in reference to the active cell
  • Hovering over a cell that is not the active cell or a selected cell will now have a grey border hover state. The cell action bar will NOT show up when hovering over a cell since we only show the action bar for the active cell.
  • "+ Code" and "+ Markdown" action bar buttons now insert the cell after the active cell and make it the new active cell
  • You can escape a multi-select scenario by pressing Escape
  • Multi-select scenarios now support de-selecting cells via Shift+ArrowUp or Shift+ArrowDown. Previously the selection would always grow the selection but now multi-selection has an "anchor" which is the active cell. You can only increase a selection of cells in one direction. Moving in the opposite direction will decrease the cell selection. Ex: Given a file with 5 cells (cell 0 to cell 4), if the active cell is cell 2, Shift+ArrowUp twice means selected cells are cell 0, cell 1, cell 2. Pressing Shift+ArrowDown twice makes the selection be cell 2.

There are probably other things that may have been fixed with this change but the above were intentionally fixed. I'd normally include videos but there is A LOT that has changed and capturing it all in a few videos isn't totally possible.

Not Fixed:

Hover State

Screen.Recording.2025-11-14.at.11.59.04.AM.mov

Basic Multi-Select + Active Cell Keyboard Navigation

Screen.Recording.2025-11-14.at.12.00.22.PM.mov

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

@:positron-notebooks

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:positron-notebooks

readme  valid tags

@dhruvisompura dhruvisompura marked this pull request as ready for review November 14, 2025 20:02
@dhruvisompura dhruvisompura force-pushed the positron-nb/active-cell-concept branch from e4702ee to cb1e40b Compare November 14, 2025 20:33
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the onMenuStateChange prop because its not needed in NotebookCellActionBar.tsx anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A good chunk of the styles in here that don't have a comment about being for hover behavior were changes needed so the focus border shows up on the active cell.

@dhruvisompura dhruvisompura force-pushed the positron-nb/active-cell-concept branch from 78b652c to 266c325 Compare November 14, 2025 23:59
Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

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

Epic PR! 🎉 Feels much nicer and smoother when growing/shrinking the selection, escaping out of a multi selection, and hovering over cells

Separate but related bug: Shift+Enter should execute all selected cells in the order they appear (not order they're selected), but currently executes only the active cell.

Screen.Recording.2025-11-17.at.14.03.23.mov

Super minor nit for discussion: Something about how the gap between the cell code bar and output bar fits into the cell border doesn't feel right:

image


public readonly executionStatus;
public readonly selectionStatus = observableValue<CellSelectionStatus, void>('cellSelectionStatus', CellSelectionStatus.Unselected);
public readonly isActive = observableValue<boolean, void>('cellIsActive', false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit

Suggested change
public readonly isActive = observableValue<boolean, void>('cellIsActive', false);
public readonly isActive = observableValue('cellIsActive', false);

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.

3 participants