-
-
Notifications
You must be signed in to change notification settings - Fork 442
Sketchbook sidebar state #1102
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
Sketchbook sidebar state #1102
Conversation
add commands to show sketchbook widgets
arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-widget.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-widget.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Outdated
Show resolved
Hide resolved
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.
The logic is looking good. Thank you! I added one remark.
arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-commands.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts
Outdated
Show resolved
Hide resolved
@per1234 thanks for the suggestions! We improved that logic using a single command ( |
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 have tested the behaviour and it works, but there's a caveat.
If I select the Sketchbook and open another Sketch, the sidebar in the new window is correctly showing the current Sketch as highlighted.
If I then select the previously opened Sketch from this new window and double-click, the window at the back goes into focus but the Sidebar state is not changed
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.
Describe the problem
🐛 When a sketch in a subfolder of the sketchbook is opened via the "Sketchbook" view, the tree structure is not expanded to show the sketch in the "Sketchbook" view of the opened sketch's window.
To reproduce
- Download the sketch from this link: SomeParent.zip
ⓘ Feel free to create your own sketch if you like. I had produced this ZIP previously while preparing a since abandoned issue report where it was more beneficial to provide a premade one. - Extract the downloaded ZIP file in your sketchbook:
Arduino/ └── SomeParent/ └── SomeSketch/ └── SomeSketch.ino
- Open the "SomeSketch" sketch via the "Sketchbook" view.
🐛 The tree structure is not expanded to show the sketch in the "Sketchbook" view of the new window:
ⓘ Please disregard the version shown in the screenshots. I produced these while preparing a since abandoned issue report for a previous build. The screenshot is still valid even though the issue applies to another version of the IDE.
Expected behavior
Tree structure is expanded to show the sketch in the "Sketchbook" view when a sketch is opened via the "Sketchbook" view:
Arduino IDE version
2.0.0-rc8-snapshot-529f811 (tester build for ebc63e8)
Operating system
Windows, Linux
Operating system version
- Windows 10
- Ubuntu 20.04
Additional context
This was working fine with 2.0.0-rc8-snapshot-7ac80b8 (tester build for 9630eb2), with one minor exception:
- The first time a given sketch was opened on the user's machine (using that build, it worked as expected on all subsequent openings of the sketch).
The problem is the same for sketches from the "Remote Sketchbook".
It is not too serious of a problem, but I do think having the tree expanded to reveal the sketch is a better UX.
The fact that it was working before the most recent changes to this PR made me think it might be an easy fix.
@ubidefeo I think that this behavior regarding already opened workspaces is right - and in any case I believe this nuance of the experience isn't really impactful for the user. The already opened workspace shouldn't get the sketchbook on focus since the user might have interrupted a task that he needs to complete. I think is not ideal to change the sidebar state in an already opened window, without the user being aware of that. |
Thanks, @per1234! I've fixed the subfolder issue! |
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx
Show resolved
Hide resolved
1b745f9
to
77b7ef9
Compare
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.
Thank you! ❤️
arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx
Outdated
Show resolved
Hide resolved
77b7ef9
to
80594de
Compare
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.
It is working fine for me now.
Great work Alberto!
Motivation
When opening a sketch from the sketchbook sidebar, the new IDE window should open with the sketchbook sidebar open. This should also happen when opening a sketch from the Remote Sketchbook (and of course in this case the Remote Sketchbook will be automatically open).
Expected Behavior
Local Sketchbook:
Remote Sketchbook:
Change description
WorkspaceService
when opening a new sketch. Those commands will be subsequently run when the front-end is ready.Other information
Fixes #442
Replaces #912
Reviewer checklist