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

implement logic for getting the installation progress #1281

Merged
merged 22 commits into from
Sep 27, 2022

Conversation

tzAcee
Copy link
Contributor

@tzAcee tzAcee commented Sep 19, 2022

  • Add logic for getting progress of the installation/uninstallation
  • Make plugin download async
  • Update the plugin data as soon as "install" call was made
  • Update the plugin data as soon as "uninstall" call was made
  • Draw the plugin installation progress data to the UI
  • Show if any error occured while installing in the progress bar
  • Show if any error occured while uninstalling in the progress bar
  • Satisfy Clippy

Currently looking like that:
The error message will disappear after 3 seconds automatically.
image
I think the design in the UI of the status-bar could be better, but maybe someone else will take a hand on that, the logic is implemented (it's currently just on top of the installed tab).

Fixes #1266

lapce-ui/src/tab.rs Outdated Show resolved Hide resolved
@MinusGix MinusGix added the A-plugins Area: plugin system label Sep 19, 2022
@bugadani
Copy link
Contributor

I'm going to cc #1267 in case it gets merged first, I would suggest reusing the function introduced there.

lapce-ui/src/tab.rs Outdated Show resolved Hide resolved
@tzAcee
Copy link
Contributor Author

tzAcee commented Sep 19, 2022

I'm going to cc #1267 in case it gets merged first, I would suggest reusing the function introduced there.

No problem, I will just merge the changes into my branch as soon as PR 1267 is merged on master and use the function then

@tzAcee tzAcee marked this pull request as ready for review September 20, 2022 15:54
@Jerrody
Copy link
Contributor

Jerrody commented Sep 22, 2022

Great job!

@tzAcee tzAcee requested a review from bugadani September 23, 2022 09:12
Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

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

I only did a preliminary review, I have pointed out a few very minor opportunities where the code can be simplified

lapce-ui/src/tab.rs Outdated Show resolved Hide resolved
lapce-ui/src/tab.rs Outdated Show resolved Hide resolved
@dzhou121
Copy link
Collaborator

Sorry can you fix the conflict again and I'll merge.

@tzAcee
Copy link
Contributor Author

tzAcee commented Sep 27, 2022

Sorry can you fix the conflict again and I'll merge.

Yes, I'll fix them as soon as Im home from work!

@tzAcee
Copy link
Contributor Author

tzAcee commented Sep 27, 2022

@dzhou121 alright fixed the conflicts.
Btw. if there's an error while removing a plugin, the plugin isn't removed anymore from the installed plugins list. That was not the case before (so the folder of the plugin still persisted, while it wasn't showing up in the plugins list). I think that's the behaviour how it should be.

@dzhou121 dzhou121 merged commit 7213ae1 into lapce:master Sep 27, 2022
ghishadow pushed a commit to ghishadow/lapce that referenced this pull request Sep 28, 2022
* implement logic for getting the installation progress

* get the progress bar in the ui

* add status text to progress bar

* remove unused volt_downloader.rs + add suggestion from PR

* add progress indication if app is removed

* remove progress percentage + add ability for error text

* use rect height as distance to next progress, so it show's like a list

* use different font color if there is a error while installation

* handle remove_volt remove_dir_all error

* add error handeling for removing in progressbar

* remove redundant if statement in drawing progress

* show error messages from download plugins in the status bar

* run rustfmt

* Satisfy clippy: To big variants

* Satisfy clippy: adjust error check accordingly

* run rustfmt

* Satisfy clippy: fix local issues

* apply review changes

* only save (workspace) plugins if neccessary

* fix brackets after merge again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-plugins Area: plugin system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Status of Plugin (Un-)Installation
5 participants