Skip to content

feat(webapp): include AnyWidget#385

Merged
henryiii merged 2 commits into
mainfrom
henryiii/feat/anywidget
May 28, 2026
Merged

feat(webapp): include AnyWidget#385
henryiii merged 2 commits into
mainfrom
henryiii/feat/anywidget

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

Adding a (very experimental) AnyWidget.

Assisted-by: GitHubCLI:claude-sonnet-4.6

Assisted-by: GitHubCLI:claude-sonnet-4.6
Signed-off-by: Henry Schreiner <[email protected]>

Copilot AI left a comment

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.

Pull request overview

Adds an experimental AnyWidget entry point so the repo-review webapp can be embedded inside Jupyter/MyST contexts. The existing App component and AppProps interface are exported, a new disableUrlSync prop is threaded through every window.location / window.history use in the app, an Emotion cache is set up to target a shadow root, and the npm build/exports are extended to produce a second repo-review-anywidget.mjs bundle alongside the existing one.

Changes:

  • Export App and AppProps from repo-review-app.tsx and add a disableUrlSync prop that gates all URL reads/writes (constructor, handleCompute, componentDidMount, Show-select handler) plus enables MUI Select disablePortal for widget rendering.
  • Add new anywidget.tsx entry that reads deps / url_sync / pyodide_base_url from the AnyWidget model, builds an Emotion cache scoped to the shadow root, and renders <App /> inside a CacheProvider.
  • Add npm subpath export ./anywidget and split build-lib into build-lib-main + build-anywidget esbuild invocations.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/repo-review-app/repo-review-app.tsx Exports App/AppProps, adds disableUrlSync, guards all URL/history accesses, conditionally disablePortal on Show menu.
src/repo-review-app/anywidget.tsx New AnyWidget entry point rendering App with shadow-root-aware Emotion cache.
package.json Adds ./anywidget subpath export and splits build-lib into two esbuild bundles.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/repo-review-app/repo-review-app.tsx
Comment thread src/repo-review-app/anywidget.tsx Outdated
Comment thread src/repo-review-app/anywidget.tsx
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@henryiii henryiii merged commit 734bc0b into main May 28, 2026
15 checks passed
@henryiii henryiii deleted the henryiii/feat/anywidget branch May 28, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants