Skip to content

WIP: feat: support trame client_type="react" - #125

Open
patrickoleary wants to merge 1 commit into
masterfrom
react-client-type
Open

patrickoleary wants to merge 1 commit into
masterfrom
react-client-type

Conversation

@patrickoleary

Copy link
Copy Markdown
Member

Summary

Add react-components/ (the react counterpart of vue-vtk-js) providing
VtkRemoteView, VtkLocalView and VtkRemoteLocalView, and select the
client bundle based on server.client_type: the module setup loads
trame-vtk.js + vue_use for vue clients, trame-vtk-react.js + react_use
for the react client. Python widgets, serializers and wslink protocols
are shared by both clients unchanged.

fix: HybridView.update_camera used the long-gone Server.update API;
now uses Server.js_call. This latent crash was unreachable from the vue
client because the vue @onEndAnimation listener never matches the
emitted EndAnimation event; the react components wire that camera-sync
path, making the branch live.

Add react-components/ (the react counterpart of vue-vtk-js) providing
VtkRemoteView, VtkLocalView and VtkRemoteLocalView, and select the
client bundle based on server.client_type: the module setup loads
trame-vtk.js + vue_use for vue clients, trame-vtk-react.js + react_use
for the react client. Python widgets, serializers and wslink protocols
are shared by both clients unchanged.

fix: HybridView.update_camera used the long-gone Server.update API;
now uses Server.js_call. This latent crash was unreachable from the vue
client because the vue @onEndAnimation listener never matches the
emitted EndAnimation event; the react components wire that camera-sync
path, making the branch live.

This branch has not been deployed

No deployments
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