feat(webapp): include AnyWidget#385
Merged
Merged
Conversation
Assisted-by: GitHubCLI:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <[email protected]>
254d876 to
eca1426
Compare
Contributor
There was a problem hiding this comment.
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
AppandAppPropsfromrepo-review-app.tsxand add adisableUrlSyncprop that gates all URL reads/writes (constructor,handleCompute,componentDidMount, Show-select handler) plus enables MUISelectdisablePortalfor widget rendering. - Add new
anywidget.tsxentry that readsdeps/url_sync/pyodide_base_urlfrom the AnyWidget model, builds an Emotion cache scoped to the shadow root, and renders<App />inside aCacheProvider. - Add npm subpath export
./anywidgetand splitbuild-libintobuild-lib-main+build-anywidgetesbuild 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.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a (very experimental) AnyWidget.
Assisted-by: GitHubCLI:claude-sonnet-4.6