2056: Spell Checking Mode #2612
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
Closes #2056
Description
This adds two new "spell checking modes" to Harper, "After Spacebar Press" and "After typing stops." meaning that when these options are selected Harper will wait for a spacebar press or for some seconds after the user stops typing to render lints.
To implement this, the update function in LintFramework has been rewritten to include a "determineSpellCheckingMode" method that will check which spell checking option the user has selected and will spell check accordingly. It also implements a new "suggestionApplied" event listener that listens for the application of suggestions and will trigger a rerender if a suggestion was applied. This is so applying a suggestion can be instant if the spacebar or "After typing stops" spell checking modes are selected.
Demo
How Has This Been Tested?
Tested on various websites and with the different spell checking options selected.
Checklist