feat: per-cell toolbar action seam — slateRegisterCellAction + register_cell_action! #8

Merged
s-celles merged 2 commits from feature/cell-mathfield-icon into main 2026-07-23 16:41:58 -07:00
s-celles commented 2026-07-23 13:14:29 -07:00 (Migrated from github.com)

A generic extension point for contributing a button to every cell's header toolbar, mirroring the slateRegisterEditorExtension / to_widget seams.

Host (JS):

  • editor.js: window.slateRegisterCellAction registry + _slateRunCellAction dispatcher (dedup by id, retro-applies to already-mounted cells).
  • view.js: cellHeaderInner renders each registered action into .cellacts, gated by the action's show(cell) predicate.
  • notebook.js: _slateRefreshCells re-renders headers on late registration — copies the cells array so the cells computed signal's identity check fires.

SDK (SlateExtensionsBase):

  • cell_actions.jl: CellAction wire spec + to_cell_action/auto_cell_action dispatch (parallel to Widget/to_widget/auto_widget, namespaced by kind_for)
    • register_cell_action! shipping the registration JS via provide_frontend!.

AI assisted PR

A generic extension point for contributing a button to every cell's header toolbar, mirroring the slateRegisterEditorExtension / to_widget seams. Host (JS): - editor.js: window.slateRegisterCellAction registry + _slateRunCellAction dispatcher (dedup by id, retro-applies to already-mounted cells). - view.js: cellHeaderInner renders each registered action into .cellacts, gated by the action's show(cell) predicate. - notebook.js: _slateRefreshCells re-renders headers on late registration — copies the cells array so the `cells` computed signal's identity check fires. SDK (SlateExtensionsBase): - cell_actions.jl: CellAction wire spec + to_cell_action/auto_cell_action dispatch (parallel to Widget/to_widget/auto_widget, namespaced by kind_for) + register_cell_action! shipping the registration JS via provide_frontend!. AI assisted PR
Sign in to join this conversation.
No description provided.