Skip to content

[Notebook Migration] Add Jupyter panel visibility surface and mini-map expand-panel button #5264

@zyratlo

Description

@zyratlo

Task Summary

Add the panel-visibility surface to JupyterPanelService (the BehaviorSubject driving jupyterNotebookPanelVisible$ plus four open/close/minimize methods) and the mini-map expand-panel button that triggers it.

Scope

Amends and adds these files:

  • frontend/src/app/workspace/service/jupyter-panel/jupyter-panel.service.ts (~40 net additions)
    • adds private jupyterNotebookPanelVisible = new BehaviorSubject<boolean>(false) and the public jupyterNotebookPanelVisible$ observable
    • restores BehaviorSubject to the rxjs import. Adds four visibility methods, each if (!this.enabled) return;-gated:
      • openPanel(panelName) (flips to true for "JupyterNotebookPanel")
      • closeJupyterNotebookPanel() (flips to false and deleteMapping("mapping_wid_" + getWorkflow().wid))
      • minimizeJupyterNotebookPanel() (flips to false)
      • openJupyterNotebookPanel() (warns via notificationService.warning if no mapping is cached for the current workflow, otherwise flipsto true)
    • Refactors init()'s subscribe handler so the per-workflow mapping cleanup is routed through closeJupyterNotebookPanel() again (replacing the inlined deleteMapping placeholder)
    • re-adds the openJupyterNotebookPanel() auto-open call after precomputeHighlightMapping().
  • frontend/src/app/workspace/service/jupyter-panel/jupyter-panel.service.spec.ts (~90 net additions)
    • adds 5 enabled-flag visibility tests (openPanel flips visibility for the right name only, closeJupyterNotebookPanel flips visibility and deletes the mapping, minimizeJupyterNotebookPanel flips visibility, openJupyterNotebookPanel warns when no mapping is cached, openJupyterNotebookPanel flips visibility when one is)
    • adds 4 disabled-flag visibility tests inside the existing when the feature flag is disabled describe block (one per gated method, asserting no visibility flip and no deleteMapping / notification.warning side effect).
  • frontend/src/app/workspace/component/workflow-editor/mini-map/mini-map.component.{ts,html,scss} (~37 lines total)
    • adds a *ngIf="pythonNotebookMigrationEnabled"-gated expand-alt button at the top of the mini-map's button cluster; clicking calls jupyterPanelService.openJupyterNotebookPanel(). Reads the flag through GuiConfigService.

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions