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

Sync editor upon editor change #448

Merged
merged 8 commits into from
Oct 11, 2024
Merged

Conversation

arjxn-py
Copy link
Member

@arjxn-py arjxn-py commented Oct 5, 2024

Should close #450

@arjxn-py arjxn-py added the bug Something isn't working label Oct 5, 2024
Copy link
Contributor

github-actions bot commented Oct 5, 2024

Integration tests repot: appsharing.space

Copy link
Contributor

github-actions bot commented Oct 5, 2024

Preview PR at appsharing.space

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

I don't quite like that this lives under commands.ts though. I'd suggest we put this code somewhere in the JupyterCadPanel class (under packages/base/src/widget.ts)

@trungleduc
Copy link
Member

I agree with @martinRenou

@arjxn-py
Copy link
Member Author

arjxn-py commented Oct 8, 2024

Thanks both for suggesting this, i hope I did it alrighty in 801b495

@martinRenou
Copy link
Member

With your recent changes you are still calling this logic in commands.ts which should not responsible for this IMO. I'd suggest doing this in the JupyterCadPanel class implementation, maybe in the constructor.

This may be a bit more involved as you'd need for the tracker to be an option for the JupyterCadPanel constructor, but I believe it's the way to go.

This way the JupyterCadPanel is responsible for resizing itself when the context changes. commands.ts is merely a place to define our commands.

@arjxn-py
Copy link
Member Author

arjxn-py commented Oct 9, 2024

Thanks for the comprehensive explanation Martin. This sounds good, i'll be on it.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I just have a final suggestion

packages/base/src/widget.ts Outdated Show resolved Hide resolved
@trungleduc
Copy link
Member

Thanks!

@trungleduc trungleduc merged commit 56587dd into jupytercad:main Oct 11, 2024
9 checks passed
@SylvainCorlay
Copy link
Member

Ah weird, the merge commit does not pass the integration tests.

@arjxn-py arjxn-py deleted the syncEditor branch October 12, 2024 07:01
@arjxn-py
Copy link
Member Author

Ah weird, the merge commit does not pass the integration tests.

Yes, should be related to #471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating new .jcad file while having another open makes the scene blank for existing one
4 participants