-
Notifications
You must be signed in to change notification settings - Fork 2
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
please add a refresh button #3
Comments
Hello there. I was planning to implement filesystem monitoring instead to receive live updates. I thought I would have to write platform specific code for this so I waited on it, but it seems that someone made a cross-platform filesystem watching library. I think it's a better solution than the refresh button but I'll have to test how well it performs. It might fall back to showing a refresh button if it's not available on the platform. |
@salihgerdan I kept thinking, maybe an "automatic" refresh might not be good, since many times one deletes more than one directory before the next "refresh", so you would end up getting many notifications. Maybe you could group them by delta time between, and triggering the automatic refresh after some time elapsed without notifications, meaning that the user already did all the deletions. But I think this might get complicated, I think that for now a simple refresh button would be good enough. |
It's a technique called debounce. You could set a debounce window of 3 seconds for example, and the operation is not performed until that cooldown is reached, when the trigger (watch notification) occurs again before that time has passed it'll reset the timer and repeat the process.
As the docs clarify, in both situations you can use the poll watcher. There's also a mention that it's probably not wise to watch the entire filesystem, so a refresh button is probably a better choice. Alternatively, as you crawl through the filesystem, you could pay attention to the number of files and conditionally watch if the view isn't a massive amount of files 🤷♂️ (or just go with a refresh button, and an alternative "auto" refresh toggle button). If you get bug reports about the "auto" refresh UX, then add a prompt or similar guard to raise user awareness about the feature only being appropriate when there's not too many files to watch? |
I experimented with polling or monitoring files, but decided to move away from it for now. I realized most of the need for this comes from the lack of any context menu options to delete files and I just finished adding a "Move to Trash" button in the newest commits. (working on a "Permanently Delete" button as well) Because this is done by the program, it allows updating the tree with the change, with no need to poll or monitor. This will be included in a release soon. |
The cleaning process is iterative: you run the tool (Spaceman), choose a couple of things to delete, and then you want to run it again to see what to delete next.
Could you please add a "refresh" button (or re-run) so no need to select the disk again saving some clicks?
The text was updated successfully, but these errors were encountered: