Skip to content
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

Switching tabs does not update the main view properly #236

Closed
martinRenou opened this issue Dec 13, 2023 · 6 comments · Fixed by #230
Closed

Switching tabs does not update the main view properly #236

martinRenou opened this issue Dec 13, 2023 · 6 comments · Fixed by #230

Comments

@martinRenou
Copy link
Member

Screencast.from.2023-12-13.16-59-43.webm
@trungleduc
Copy link
Member

Maybe it is related to the STEP file since it does not happen with 2 JCAD files

jcad-11.mp4

@martinRenou
Copy link
Member Author

martinRenou commented Dec 18, 2023

Were you using the main branch when trying this?

I see you are not using the main branch but your branch where you have a separate worker implementation.

Would you be able to try on the main branch? I also see the issue appear with jcad files BTW

@martinRenou
Copy link
Member Author

My first guess is that whenever a DISPLAY_SHAPE message is sent from the worker, all viewers are receiving the message

@trungleduc
Copy link
Member

ah yes, I was too lazy to switch to main. Maybe we can wait for #230, I'm finishing it soon, and hopefully, this issue can be fixed.

@martinRenou
Copy link
Member Author

martinRenou commented Dec 18, 2023

Indeed this issue has been introduced during the refactor, more precisely this line is causing the issue: https://github.com/jupytercad/jupytercad/blob/0201e9d19d3344fd76550c829b8630beed1db696/python/jupytercad_core/src/plugin.ts#L71

The ID of the worker is now a const string, when it was an id on a per-view basis prior to this change: https://github.com/jupytercad/jupytercad/blob/v0.3.3/packages/jupytercad-extension/src/mainview.tsx#L122

So maybe you'd need to take this into account in your PR #230, if not done already

@trungleduc
Copy link
Member

it was done already :D

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 a pull request may close this issue.

2 participants