Skip to content

feat(python-notebook-migration, frontend): add Jupyter panel visibility surface and mini-map expand-panel button#5265

Open
zyratlo wants to merge 4 commits into
apache:mainfrom
zyratlo:migration-tool-panel-controls
Open

feat(python-notebook-migration, frontend): add Jupyter panel visibility surface and mini-map expand-panel button#5265
zyratlo wants to merge 4 commits into
apache:mainfrom
zyratlo:migration-tool-panel-controls

Conversation

@zyratlo
Copy link
Copy Markdown
Contributor

@zyratlo zyratlo commented May 28, 2026

What changes were proposed in this PR?

Adds the panel-visibility surface to JupyterPanelService (BehaviorSubject + four open/close/minimize methods) and the mini-map expand-panel button that drives openJupyterNotebookPanel.

jupyter-panel.service.ts amends:

  • Restores BehaviorSubject to the rxjs import.
  • Adds private jupyterNotebookPanelVisible = new BehaviorSubject<boolean>(false) and the public jupyterNotebookPanelVisible$ = this.jupyterNotebookPanelVisible.asObservable().
  • Adds four if (!this.enabled) return;-gated methods:
    • openPanel(panelName: string) — flips visibility to true when panelName === "JupyterNotebookPanel". (The panelName string is the existing convention used elsewhere in the workspace's panel system.)
    • closeJupyterNotebookPanel() — flips visibility to false, then notebookMigrationService.deleteMapping("mapping_wid_" + workflowActionService.getWorkflow().wid).
    • minimizeJupyterNotebookPanel() — flips visibility to false.
    • openJupyterNotebookPanel() — checks notebookMigrationService.hasMapping(...); warns via notificationService.warning("No Jupyter notebook associated with this workflow.") and returns if the workflow has no cached mapping, otherwise flips visibility to true.
  • Refactors init()'s subscribe handler
    • replaces the inlined deleteMapping placeholder with the actual this.closeJupyterNotebookPanel() call
    • re-adds the this.openJupyterNotebookPanel() auto-open after precomputeHighlightMapping().

jupyter-panel.service.spec.ts amends:

  • Adds 5 enabled-flag visibility tests in a "Panel visibility" section:
    • openPanel then closeJupyterNotebookPanel round-trips the visibility stream
    • minimizeJupyterNotebookPanel flips to false
    • openJupyterNotebookPanel warns when no mapping is cached
    • openJupyterNotebookPanel flips to true when one is; openPanel only flips for the correct panel name.
  • Adds 4 disabled-flag tests inside the existing when the feature flag is disabled describe block — one per gated method — asserting the short-circuit via observable / spy checks (no next() emission from the method itself, no
    deleteMapping call, no notification.warning).

Mini-map expand-panel button (mini-map.component.{ts,html,scss}, ~37 lines):

  • New *ngIf="pythonNotebookMigrationEnabled"-gated button (icon expand-alt) at the top of the mini-map's button cluster.
  • The component injects JupyterPanelService and GuiConfigService; the click handler calls jupyterPanelService.openJupyterNotebookPanel(). With the flag at its default false on main, the button doesn't render and the rest of the mini-map UI is unchanged.

Any related issues, documentation, discussions?

Closes #5264
Parent issue #4301

How was this PR tested?

jupyter-panel.service.spec.ts is amended with 5 more visibility cases and 4 more disabled-flag cases

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.7)

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant