Repository navigation
React client - #8
Merged
Merged
Conversation
jourdain
reviewed
Oct 20, 2026
jourdain
reviewed
Oct 20, 2026
jourdain
reviewed
Oct 20, 2026
Collaborator
|
You need to make your commits count so changelog and release properly happen. |
jlee-kitware
force-pushed
the
react-client
branch
from
October 20, 2026 03:00
f7b1836 to
0b69304
Compare
The module serves its assets from __trame_code_<version>, but the bundle asked for an unversioned path, so worker creation failed and monaco fell back to the main thread. The server now passes the serve directory as a vue_use plugin option.
Adds react-components/, a TypeScript port of the Monaco editor built against react 19, sharing utils/ and themes/ with vue-components. The module loads the bundle matching server.client_type, and the widget declares the common props once, adding v-model/input for vue and value/onChange for react. Completion and hover keep the same trigger contract, so python callers are unchanged. react_use takes no plugin options, so the react widget passes the serve directory as a prop. CI builds the react bundle after the vue one, since the vue build empties the shared serve directory.
jlee-kitware
force-pushed
the
react-client
branch
from
October 20, 2026 03:04
0b69304 to
bd78cb6
Compare
jourdain
self-requested a review
October 20, 2026 03:22
jourdain
approved these changes
Oct 20, 2026
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.
The editor only worked under the Vue client, so apps running with
client_type="react"had no code editor.Adds a React bundle alongside the Vue one.
setup()serves whichever matches theserver's client type. The widget branches as well, since the editor is v-model
based and the two clients spell that binding differently: React declares
valueand
onChangethroughself.props/self.events, Vue keepsmodelValueandinput. Same shape as trame-vtklocal. Completion and hover still go throughwindow.trame.trigger, so the Python side is unchanged. The component is TSXbuilt against React 19, the version trame-client ships.
For review:
.umd.cjsas well as.umd.js, since thatis what the React bundle builds as. Without it, workers fall back to the old
unversioned path and 404.
react-componentsstays on Vite 4:vite-plugin-monaco-editorneedsesbuild,which the rolldown based Vite 8 dropped.
--emptyOutDiron theshared serve directory.
@sharedaliases tovue-components/srcsoutils/andthemes/exist once.trame-rca keeps parallel copies instead; happy to match that if preferred.
Verified against the example and a real app: editor mounts and binds, edits round
trip, completion and hover populate from Python, workers load from the versioned
directory.