sg-wireless / pymakr-vsc

GNU General Public License v3.0
97 stars 25 forks source link

feat: Improvements to the user interface #237

Closed Josverl closed 2 years ago

Josverl commented 2 years ago

I have a few improvements to the UX that I would like to propose. Most are based on my experience in trying to understand how to switch from Pymakr1 to Pymakr 2

image

image

image

image

image

jakobrosenberg commented 2 years ago

Just saw this. Love it.

Just to clarify, semantic-release look at the commit messages, not the PR title, for writing the changelog and determining the next release version. To use the functionality, you can use the following prefixes:

``` build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs) docs: Documentation only changes feat: A new feature fix: A bug fix perf: A code change that improves performance refactor: A code change that neither fixes a bug nor adds a feature test: Adding missing tests or correcting existing tests ```

device workspace [] after adding device to the workspace, reveal the folder in the navigation [] add navigation from device to folder in workspace ( as names are/can be very differently formatted)

Does this work with the VSCode restarts that happen whenever a workspace change from single to multi?


run a selection of code should run on last active device ( should be as easy as Python Shift-Enter)

Should there be a dedicated command for this, like run on active device? Changing the behavior of the current action would be a breaking change and could also go against POLA if a script from project A is suddenly running on a device from project B.

I think one option for handling this could be to have n active device listed here image It would automatically update to the last used device, but if clicked, you could manually select a different device. An option to disable the automatic update might also be needed.

Alternatively we could also have a Pymakr view for this like we have for projects and devices. This could provide more flexibility in the long term.


Great job on this. Could we move the last two unfinished tasks to a separate PR and merge this one?

Josverl commented 2 years ago

sure can punt/seperate the remaining actions to separate PRs, mostly using these points to keep track of things I'd like to solve or run into.

For this:

jakobrosenberg commented 2 years ago

thanks for providing the prefixes, I had been looking for that but could not find them

My bad. I didn't think to mention them last time šŸ˜…

As for navigation on workspace creation, I don't think there's much we can do. If it's added as 1st or 2nd workspace it will trigger a restart, which we can't avoid. I really wish VSCode would show a notification that it restarted and the cause of it.

Anyway, worst case scenario, it won't auto reveal the folder if it's added as primary or second workspace. This could confuse some users about inconsistent behavior.

If we were to solve this, It's possible to open the device folder programmatically after the restart, but it would add complexity.


//pseudo code

const count = vscode.workspace.workspaceFolders?.length 
// are we changing the primary workspace or changing to a multi workspace?
if (!count || count === 1) {
  nextSession.tasks.push({
    target: ['vscode', 'commands', 'executeCommand'],
    params: ('revealInExplorer', uri)
  })
}
jakobrosenberg commented 2 years ago

Just a quick update, I'm currently working on the upload progress bar. šŸ™‚

jakobrosenberg commented 2 years ago

Added in https://github.com/pycom/pymakr-vsc/commit/aacee2d3f6dc7f9edb4a8fc09faeaa9f407344b3

jakobrosenberg commented 2 years ago

Great job. I'll merge and push to next for a new release.

jakobrosenberg commented 2 years ago

:tada: This PR is included in version 2.14.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

jakobrosenberg commented 2 years ago

After some trial and error, I just I had merged my local next-staging into next and not origin/next-staging. Sorry for the delay :)

jakobrosenberg commented 2 years ago

@Josverl I'm having a bit of confusion with this one: show device content in sidebar. What does it add compared to the open device in file explorer?

Josverl commented 2 years ago

@jakobrosenberg Sorry for adding confusion ... perhaps the functionality should be merged

I think it makes sense to merge these to Add/show device in Sidebar or Add/show device in File Explorer ( Sidebar and File explorer seem to be both used by extension )

jakobrosenberg commented 2 years ago

No probs. I think this is caused by slightly inconsistent behavior from SVCode. If a folder is not mounted, the mount command will mount it, but not select it. If it's already mounted, VSCode will select it instead.

reveal-folder

Josverl commented 2 years ago

If a folder is not mounted, the mount command will mount it, but not select it. If it's already mounted, VSCode will select it instead.

  • the thing that it does not do is to change the focus to the 'Explorer View', and as the default config for PyMakr is to show the Devices in the PyMakr view
jakobrosenberg commented 2 years ago

I get what you mean, I'll see if I can consolidate the two commands.