PicGo / vs-picgo

A VSCode plugin of PicGo
https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo
MIT License
368 stars 50 forks source link

:sparkles: Feature(webview): setup react-router & finish the upload feature in webview #107

Closed upupming closed 2 years ago

upupming commented 2 years ago

I have finished react router and rematch setup. Also the upload feature in webview is implemented:

vspicgo-upload

Next, I am going to work on configuration sync between webview and vscode, then I will finish the gallery (migrate to @picgo/store) and 3rd plugin installing feature.

I am going to use appdata-path for picgo data path, all path will change to follow picgo electron's convention. And if user did not install picgo electron, we will initialize the config files.

Also I have to implement the migration feature to help users quickly migrate from vscode settings to picgo config files.

Now the vspicgo class has coupled the upload and write to editor process, now we have to split them to two different class, because all operations in webview does not have any editor associated, we should only upload images but not do anything related to writing to editor.

VSPicgo class will contain all the VSPicgoUploader and VSPicgoStoreDB etc. as its member variable, and it will provide the commands to be run in VSCode, it will handle the difference of Webview and VSCode.

Also, I have changed the import style and wait for https://github.com/PicGo/PicGo-Core/pull/102 to be merged

This is the final UI of vs-picgo:

image

upupming commented 2 years ago

This PR is too verbose at the present, I will merge this PR tomorrow, maybe I should release an alpha release of PicGo-Core to let the CI pass and then merge this PR. @Molunerfinn Do I have permission to release an alpha version of PicGo Core, if yes, what version number would you suggest I release on?

Molunerfinn commented 2 years ago

This PR is too verbose at the present, I will merge this PR tomorrow, maybe I should release an alpha release of PicGo-Core to let the CI pass and then merge this PR. @Molunerfinn Do I have permission to release an alpha version of PicGo Core, if yes, what version number would you suggest I release on?

sorry for delay, I will merge it in tonight

Molunerfinn commented 2 years ago

picgo v1.5.0-alpha.0 is ready

why not add an icon to sidebar? image

upupming commented 2 years ago

picgo v1.5.0-alpha.0 is ready

Thanks! I will try it out.

why not add an icon to sidebar? image

Thanks for the idea! Add a activitybar viewContainer to the left activity bar can let users notice the PicGo control panel more easily. However, clicking the icon will open a tree view or webview page in the activity bar, but the gallery and settings page in PicGo Control Panel is too large and not suitable for the activity bar but should be placed at a standalone webview panel.

I found an extension called Thunder Client which just uses the activity bar for navigating and when user clicks different items in the activity bar, it will jump to different pages in the webview panel. I will try to implement the same logic like this extension!

image