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

[Bug] win32 platform, UI flickering when removing node_module directory/ies #90

Closed
ognjenjevremovic opened this issue Mar 12, 2021 · 5 comments

Comments

@ognjenjevremovic
Copy link

Describe the bug
Deleting the node_modules directory on the win32 platform causes flickering on the UI.

Originally discovered by @KonradNojman in #87 (comment)

It might be related to the delete method in win32 being synchronous since #88:

UI will 'freeze' while performing the delete job. Then, when the process finishes, it updates the status to "deleting..." and a few ms later, it changes to "deleted".

as described by @zaldih.

For more info, please refer to #87 and #88 threads.

To Reproduce
Steps to reproduce the behavior (must be on win32 platform!):

  1. Go to the directory that contains node_modules directory somewhere in the child chain,
  2. Run npx npkill or alternatively install npkill globally (npm i -g npkill) and spawn npkill,
  3. Wait for the search to be completed
  4. Press space bar on one of the results
  5. Once deleted a flicker on the UI will be present.

* (@KonradNojman please do fill in the gaps if I miss some of the steps)

Expected behavior
No flickers should occur when removing node_modules directory/ies.
The status of deleting... and DELETED should be updated accordingly (asynchronously).

Screenshots
Here's the visual representation of this issue:
https://user-images.githubusercontent.com/60238331/110249637-4fb48b00-7f77-11eb-8cac-9d6259788f97.png
(courtesy of @KonradNojman)

  • OS: Windows
  • Version v0.7.4

Additional context
cc @zaldih @NyaGarcia for visibility (and prioritization).

@KonradNojman
Copy link

Hi @ognjenjevremovic !
Thanks for filling out the bug ticket 🚀 Was gonna do it soon, but you were faster 😎

⚠️ There is an important update for this ticket:
Looks like this flickering behavior only occurs on the local build of the npkill.
When I used the newest version 0.7.4 (npx npkill) that was deployed to NPM the problem doesn't occur 🤷 The flickering problem wasn't visible when I used npx npkill with v0.7.2 as well.

I don't have any clue why is that, but doesn't seem that urgent in this case :)
For anyone that want's to reproduce this issue, please follow the steps outlined by @ognjenjevremovic here #87 (comment) (using appropriate commit from the main npkill repository)
To be precise the problem was spotted when working with the local build using this branch #88 ,commit: a252443 .
cc @zaldih @NyaGarcia

@ognjenjevremovic
Copy link
Author

Thanks for the feedback @KonradNojman.
I was a little late posting my reply, apologize, but I am able to confirm that this is indeed the case as you wrote (UI flickers not being present when installing a package from a registry).

I'd like to point out that I got access to a win32 platform and was able to test it myself, however take this with a grain of salt, as I'm using VM with win32 so that might not be 100% accurate representation of what might happen on the actual Windows machine.
Let's keep this open for a little while and see if there's any other feedback regarding this issue.

We might close soon enough if the issue gets stale (like a month without any activity) 🙂 .

@zaldih
Copy link
Member

zaldih commented Apr 8, 2021

Hey!
I have been able to do some more testing (on a win10 virtual machine) and in my case, I have noticed that in the CMD everything works as it should, but instead the interface seems to do weird things with vscode's Integrated Terminal (blinks, incomplete refreshments...).

@KonradNojman have you been able to check if this problem also happens for example in CMD?

@ognjenjevremovic
Copy link
Author

cc @KonradNojman
I assume the tag accidentally went to a wrong user, due to autocomplete 🙂 .

I didn't test this tbh on the VM; since I don't use win32, the only terminal I checked was powershell (as it comes packed with win10). I didn't notice the blinking.
cc @zaldih

@zaldih
Copy link
Member

zaldih commented Mar 24, 2023

Hey!
It's been a long time.
I just released version v0.11.1 which optimizes rendering. In principle this problem should be more than solved.

Regards.

@zaldih zaldih closed this as completed Mar 24, 2023
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

No branches or pull requests

3 participants