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

Update circuits widget sizing behavior #1921

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Sep 16, 2024

This change fixes a few quirks of the Circuit widget, specifically:

  • if the width of the widget is greater than the width of the cell output area, scroll bars are added, and
  • setting a custom zoom level by changing the value in the zoom control disables the resize handling so that VS Code doesn't incorrectly trigger a recalculation of the default zoom and undo the manual change.

Confirmed with manual testing that window resizing in VS Code circuit display is still hadled properly.

@minestarks
Copy link
Member

@swernli thanks for digging into this. I pushed my fix over your fix :D I think it works, but I would appreciate if you tested it in the environment where you saw the bug.

@swernli
Copy link
Collaborator Author

swernli commented Sep 27, 2024

@swernli thanks for digging into this. I pushed my fix over your fix :D I think it works, but I would appreciate if you tested it in the environment where you saw the bug.

The resizing and zoom work great where I tested them, but it looks like the scrolling fix got lost in the shuffle. I pushed that up, and now I think we are good to go.

@billti I think this may fix the issues you were seeing in Python interactive as well.

@swernli swernli added this pull request to the merge queue Sep 27, 2024
Merged via the queue into main with commit a51dcb3 Sep 27, 2024
18 checks passed
@swernli swernli deleted the swernli/circuits-widget-sizing branch September 27, 2024 05:38
@minestarks
Copy link
Member

@swernli oops, sorry, yes, thanks for fixing that! Teamwork! ✊

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.

4 participants