-
Notifications
You must be signed in to change notification settings - Fork 958
Add cancel indexing #2221
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
base: main
Are you sure you want to change the base?
Add cancel indexing #2221
Conversation
🦋 Changeset detectedLatest commit: bcb4c69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
587c672
to
45e7c5a
Compare
@kevinvandijk please check my PR( |
…code into add-canceling-indexing
if (this._cancelled) { | ||
// Abort adding more items if cancelled | ||
break | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all these nested this._cancelled
checks within this for loop seem a bit excessive. Isn't the check per block on line 195 enough here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! I have one question that I would like to see addressed before we can merge this. Just want to verify if all these if's are necessary there!
Context
I really want the ability to cancel indexing without disabling it entirely. This usually happens after I’ve been working on a small project and then switch to a large codebase.
Implementation
Add a Cancel button. Show it only when the feature is enabled and indexing is in progress. Stop indexing when the _cancelled variable is set to false.
Screenshots
How to Test
Get in Touch
Discord - ffinnis (Pivo)