Skip to content

feat: animate notebook cell execution footer expand/collapse#12946

Merged
nstrayer merged 2 commits intomainfrom
positron-nb-footer-animation
Apr 14, 2026
Merged

feat: animate notebook cell execution footer expand/collapse#12946
nstrayer merged 2 commits intomainfrom
positron-nb-footer-animation

Conversation

@nstrayer
Copy link
Copy Markdown
Contributor

@nstrayer nstrayer commented Apr 10, 2026

Partially addresses #11775

Hide the cell execution footer when a cell has never been run or was only run in a previous session. The footer collapses with a CSS transition (height, opacity, borders) and expands when the cell is queued or executed.

Demo

The execution info smoothly slides in and out as the info is available.

hiding-footer.mov
  • Respects prefers-reduced-motion by disabling transitions
  • ARIA labels suppressed on collapsed footers via aria-hidden
  • Active states (running/pending) prioritized over static states in ARIA label ordering
  • Border radius adjusts when footer is collapsed and no outputs are present

Performance

In theory this could be a performance issue with really large notebooks because the animation triggers a reflow of lower cells. In practice, it's not bad as if a cell has no output it's not normally followed by a bunch of cells with outputs. Also the animations are all done with CSS so they're fairly optimized. I tested with a notebook with ~100 cells and didnt notice any real performance issues but we can/should keep an eye on it.

Release Notes

New Features

  • Notebook cell execution footer now hides when the cell has not been run and smoothly animates in/out during execution

Bug Fixes

  • N/A

QA Notes

@:notebooks @:positron-notebooks

  1. Verify cells that have never been run do NOT show the execution footer
  2. Run a cell -- footer should animate in and show timing info
  3. Add a new cell without running it -- footer should not be visible
  4. Queue multiple cells -- footer should appear immediately for pending cells
  5. Check with system reduced-motion enabled -- transitions should be instant

Hide the cell execution footer when a cell has never been run or was
only run in a previous session. The footer collapses with a CSS
transition (height, opacity, borders) and expands when the cell is
queued or executed. Respects prefers-reduced-motion by disabling
transitions. ARIA labels are suppressed on collapsed footers (via
aria-hidden) and reordered so active states (running/pending) take
priority over static states.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 10, 2026

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

readme  valid tags

@nstrayer nstrayer requested review from dhruvisompura and seeM April 10, 2026 00:55
dhruvisompura
dhruvisompura previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Contributor

@dhruvisompura dhruvisompura left a comment

Choose a reason for hiding this comment

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

Works as described on the tin! Not having the execution footer on cells is so much cleaner! Had a minor suggestion on code readability but not a blocker.

aria-label={isCollapsed ? undefined : getAriaLabel()}
aria-live={isCurrentlyRunning ? 'polite' : 'off'}
className='positron-notebook-code-cell-footer'
className={`positron-notebook-code-cell-footer${isCollapsed ? ' collapsed' : ''}`}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would use positronClassNames here to improve the readability!

@nstrayer nstrayer merged commit 57deef8 into main Apr 14, 2026
19 checks passed
@nstrayer nstrayer deleted the positron-nb-footer-animation branch April 14, 2026 01:30
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2026
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.

2 participants