-
Notifications
You must be signed in to change notification settings - Fork 195
feat(stepper): integrate Conductor plugin tabs and dynamic loading of web plugins #3959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Shrey5132
wants to merge
20
commits into
source-academy:master
Choose a base branch
from
Shrey5132:feat/conductor-stepper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+743
−109
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
83d7ee6
feat(stepper): integrate Conductor plugin tabs and dynamic loading of…
2d1e92c
Update src/styles/_workspace.scss
Shrey5132 93ef8cf
Update src/commons/sagas/helpers/conductorEvaluatorCache.ts
Shrey5132 b06d21a
Update src/features/conductor/pluginTabRegistry.ts
Shrey5132 48d92d7
chore(conductor): stop committing evaluator/plugin bundles to frontend
015f3be
fix(conductor): address PR review feedback
17de643
feat(conductor): dynamic plugin tabs + fix run-button hang and evalua…
d7d773d
style(conductor): fix prettier formatting
66ef1a2
build(conductor): depend on published conductor and plugin-directory
dd885f3
fix(conductor): load require-wrapper web plugins and keep the active …
de003ab
build(conductor): restore published dependency lockfile entries
0352648
fix(conductor): resolve tsc errors in conductor evaluator wiring
7caebc5
refactor(playground): hoist conductor stepper tab id to module scope
53b707f
Merge branch 'master' into feat/conductor-stepper
Shrey5132 a3ebee6
fix(conductor): merge duplicate setSelectedEvaluator handler from mas…
475955b
chore(deps): bump @sourceacademy/language-directory to 0.0.10
217df81
Merge branch 'master' into feat/conductor-stepper
Shrey5132 6e2e65f
Merge branch 'master' into feat/conductor-stepper
martin-henz 14ddd32
Merge branch 'master' into feat/conductor-stepper
Shrey5132 716e0bf
Merge branch 'master' into feat/conductor-stepper
Shrey5132 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Import-map shim: resolves a plugin bundle's `import ... from "@blueprintjs/core"` to the host | ||
| // frontend's Blueprint build (exposed on globalThis by src/bootstrap/conductorSharedDeps.ts), so the | ||
| // plugin's Blueprint components share the host's CSS and React instance. | ||
| // | ||
| // Re-exports the surface used by the bundled plugins; extend this list if a plugin needs more. | ||
| if (!globalThis.__SA_BLUEPRINT__) { | ||
| throw new Error('[shim] __SA_BLUEPRINT__ is not defined — conductorSharedDeps.ts may not have run yet'); | ||
| } | ||
| const Blueprint = globalThis.__SA_BLUEPRINT__; | ||
| export const { | ||
| Button, | ||
| ButtonGroup, | ||
| Card, | ||
| Classes, | ||
| Divider, | ||
| Icon, | ||
| Popover, | ||
| Pre, | ||
| Slider, | ||
| } = Blueprint; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // Import-map shim: resolves a plugin bundle's `import ... from "react/jsx-runtime"` to the host | ||
| // frontend's React jsx-runtime (exposed on globalThis by src/bootstrap/conductorSharedDeps.ts). | ||
| if (!globalThis.__SA_REACT_JSX__) { | ||
| throw new Error('[shim] __SA_REACT_JSX__ is not defined — conductorSharedDeps.ts may not have run yet'); | ||
| } | ||
| const jsxRuntime = globalThis.__SA_REACT_JSX__; | ||
| export const { jsx, jsxs, Fragment } = jsxRuntime; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Import-map shim: resolves a plugin bundle's `import ... from "react"` to the host frontend's | ||
| // single React instance (exposed on globalThis by src/bootstrap/conductorSharedDeps.ts). | ||
| if (!globalThis.__SA_REACT__) { | ||
| throw new Error('[shim] __SA_REACT__ is not defined — conductorSharedDeps.ts may not have run yet'); | ||
| } | ||
| const React = globalThis.__SA_REACT__; | ||
| export default React.default ?? React; | ||
| export const { | ||
| Children, | ||
| Component, | ||
| Fragment, | ||
| Profiler, | ||
| PureComponent, | ||
| StrictMode, | ||
| Suspense, | ||
| cloneElement, | ||
| createContext, | ||
| createElement, | ||
| createRef, | ||
| forwardRef, | ||
| isValidElement, | ||
| lazy, | ||
| memo, | ||
| startTransition, | ||
| use, | ||
| useActionState, | ||
| useCallback, | ||
| useContext, | ||
| useDebugValue, | ||
| useDeferredValue, | ||
| useEffect, | ||
| useId, | ||
| useImperativeHandle, | ||
| useInsertionEffect, | ||
| useLayoutEffect, | ||
| useMemo, | ||
| useOptimistic, | ||
| useReducer, | ||
| useRef, | ||
| useState, | ||
| useSyncExternalStore, | ||
| useTransition, | ||
| version, | ||
| } = React; | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /** | ||
| * Exposes the frontend's singleton library instances so that dynamically-imported Conductor web | ||
| * plugin bundles can share them, rather than bundling (and duplicating) their own copies. | ||
| * | ||
| * Plugin bundles import `react`, `react/jsx-runtime` and `@blueprintjs/core` as bare specifiers. | ||
| * The import map in `public/index.html` maps those specifiers to the shim modules in `public/shims`, | ||
| * which re-export the globals set here. The result: the plugin renders inside the host's single | ||
| * React tree and uses the host's exact Blueprint build (so styling is identical). | ||
| * | ||
| * This module must be imported before any plugin is loaded; it is imported first from `index.tsx`. | ||
| */ | ||
| import * as Blueprint from '@blueprintjs/core'; | ||
| // eslint-disable-next-line no-restricted-imports | ||
| import * as React from 'react'; | ||
| import * as ReactJsxRuntime from 'react/jsx-runtime'; | ||
|
|
||
| const globals = globalThis as Record<string, unknown>; | ||
| globals.__SA_REACT__ = React; | ||
| globals.__SA_REACT_JSX__ = ReactJsxRuntime; | ||
| globals.__SA_BLUEPRINT__ = Blueprint; |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.