-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add suggestion panel #579
Add suggestion panel #579
Conversation
This PR can be tested at https://huggingface.co/spaces/trungleduc/jupytercad-dev. It's ready for reviewing but still need the release of the backend part in jupyter-collaboration (https://github.com/jupyterlab/jupyter-collaboration/tree/suggestions) |
Integration tests report: appsharing.space |
Preview PR at appsharing.space |
please update snapshots |
🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so awesome 🎉 🚀
This PR is ready, this suggestion panel is hidden if the |
} | ||
|
||
.jpcad-control-panel-suggestion.selected { | ||
background-color: rgba(0, 122, 255, 0.23); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use more CSS variables in this file. The CSS will look off for custom themes.
this._sceneL.add(new THREE.AmbientLight(0xffffff, 0.5)); // soft white light | ||
const light = new THREE.HemisphereLight(0xffffff, 0x444444, 0.5); | ||
this._sceneL.add(light); | ||
this._sceneL.add(this._meshGroup.clone(true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you start from a clone of meshGroup
here. But can you explain how it works when the user e.g. creates a new box in the suggestion? I understand the two scenes share the same OCC worker?
What I'm confused about is I don't see where the magic split happens on the creation of the new meshGroup
for suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the scene on the left has nothing to do with the OCC worker, it is just a snapshot of the current mesh at the time of checking out. The scene on the right is connected to the forked y-document and it works just like a normal 3D view.
This is why it isn't very easy to get back to the original document from a forked one since the forked y-doc in the frontend will propagate changes back to the original doc in the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok got it.
So the sceneL
is not connected to the original document anymore, meaning if another collaborator changes the base document without making a suggestion, it is not reflected in sceneL
unless they refresh the page. We may consider this as a bug? Happy to merge the PR as is anyway and we can iterate upon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the left scene in real-time necessitates connecting to the 2 documents at the same time, I might think about it after the notebook suggestion adventure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not mean to approve the PR, actually suggesting changes
Co-authored-by: martinRenou <martin.renou@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work! Thanks!
User-facing changes
suggestion.mp4