zyratlo opened a new pull request, #5271:
URL: https://github.com/apache/texera/pull/5271
### What changes were proposed in this PR?
Introduces `JupyterNotebookPanelComponent`, the draggable iframe shell that
hosts JupyterLab inside the Texera workspace. It consumes the visibility
surface added in `migration-tool-panel-controls`
(`jupyterNotebookPanelVisible$` / `closeJupyterNotebookPanel` /
`minimizeJupyterNotebookPanel`) and registers itself with the panel service via
`setIframeRef` once its `ViewChild` is in the DOM.
-
`frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.ts`
- `JupyterNotebookPanelComponent`
- `ngOnInit` subscribes to
`jupyterPanelService.jupyterNotebookPanelVisible$`; on each emission it sets
`isVisible`, and when visibility flips to `true` it fetches the iframe URL from
`notebookMigrationService.getJupyterIframeURL()`, runs it through
`DomSanitizer.bypassSecurityTrustResourceUrl`, and updates `iframeRef`
- `ngAfterViewInit` registers the iframe with the panel service
via `setIframeRef`
- `closePanel()` calls
`jupyterPanelService.closeJupyterNotebookPanel()`
- `minimizePanel()` calls
`jupyterPanelService.minimizeJupyterNotebookPanel()`.
-
`frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.html`
- `cdkDrag`-enabled panel with header (title + close/minimize buttons;
close uses `nz-popconfirm` for a "delete" confirmation)
- `<iframe [src]="jupyterUrl">` body bound to the sanitized URL, gated
on `*ngIf="isVisible"`.
-
`frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.scss`
- fixed-position panel styling, drag handle visuals, iframe sizing.
-
`frontend/src/app/workspace/component/jupyter-notebook-panel/jupyter-notebook-panel.component.spec.ts`
- `frontend/src/app/app.module.ts`
- imports `JupyterNotebookPanelComponent` and adds it to the
`@NgModule.declarations` array.
### Any related issues, documentation, discussions?
Closes #5270
Parent issue #4301
### How was this PR tested?
`jupyter-notebook-panel.component.spec.ts`
- mocks `JupyterPanelService` (via a controllable `Subject<boolean>` for the
visibility observable) and `NotebookMigrationService` (returning a fixture URL)
- Covers visibility transitions, URL fetch + sanitization, ref registration,
button delegation.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]