As an editor I want spell checking to work inside Gmail since that is where I spend most of my time writing emails.
Background: gmail uses editable divs (instead of a text area) which is technically adding a whole new layer of selection and manipulation logic for handling.
At the moment adding and managing multiple languages is finicky and annoying and based on the Firefox display language settings.
While use getAcceptLanguages and getUILanguage makes sense for setting default spell checking languages, since we bundle all the dictionaries anyway we should absolutely allow the user to specify and choose the languages they prefer.
only use getAcceptLanguages and getUILanguage if no saved languages settings exist in browser storage
use browser storage to save and set enabled spell check languages
add side panel Languages list which lists all currently in use languages (check boxes) that user can use
Getting to the point now where unit tests are sorely needed - code is getting complex enough and small changes that break things are getting harder to pinpoint. Need good unit test coverage, bare minimum all core functions.
33% coverage gained
appropriate unit test framework chosen
developer readme updated with test running instructions
package.json updated to run tests with npm run test
In the peek I am pressing enter and then backspace to remove the newline character. Pressing enter aligns the content, deleting with backspace maligns it.
This is a massive resource hit and could likely be done better but I'm not quite sure how. Hopefully we don't need to wait until the web-extensions API exposes the actual browser spell checker (which would remove the need for nspell entirely) but that may be the case.
The highlight.js file should be refactored in such a way that the a highlighter is a class which is instantiated by passing in all necessary properties (i.e. CSS and other style values). The necessary CSS and other style values should be generated with helper functions that do not form part of the core highlighter class.
highlighter uses ES6 class syntax (init function removed)
helper functions rewritten and moved into helpers file
keyup event handler should be split into smaller chunks
As an editor I want to see and be easily able to choose from a list of word suggestions for misspelt words so that I can quickly replace the misspelt word.
Acceptance Criteria
word suggestions should appear as soon as the caret is at placed at the beginning, end, or anywhere within a word i.e. |banan|anas| (here, caret is shown at beginning, end, and within the word) and user activates suggestion shortcut
if there are multiple word suggestions, they should appear on a vertical carousel just above the misspelt word
user should be able to navigate up and down (next and previous) words of the carousel by using designated short cut keys (defaults: next, alt+shift+down; previous, alt+shift+up)
carousel should contain all word suggestions but show only current, previous, and next words
carousel should wrap around (scroll inifinite)
only the top 4 suggestions should be shown in the the carousel (context menu can have more than 4 suggestions)
3 or less words should still create a carousel effect, which can also scroll infinite
user should be able to escape out of word suggestions without choosing one using left or right arrow keys
Adding an already valid word (i.e. "dark", in English) to custom words and then removing it will create a false positive and highlight the removed word even when using English to spellcheck.
Ensure English dictionary being used spell check
Add the word "dark" to custom words
Remove the word "dark" from custom words
The word "dark" will now be highlighted despite being correct and no longer be present in any dictionary that is in use.
Need to either make or find something in the public domain to use for the template/icon. Consider using same icon currently bundled with repo. Should do this PR as the last one before pushing the MVP since we want to also bundle a good demo and ensure all docs are updated.
ensure icon looks nice in all locations it is displayed
add new annotated GIF demo that demonstrates all features
As an editor I want to be able to ignore certain word formats (like CAPITLISEDWORDS, TitleCaseWords, and variableNameWords) so that these are not spell checked.
Originally thought this only happened when loading 6 or more dictionaries but it's just the Italian one.
Hopefully updating the dictionaries in use will fix this but there is a chance we will need to disable Italian completely for now (if we can't find a dictionary that works)
Project currently relies on browserify but it doesn't have to - the native extension way to "require" files is to break them up into content and background isolated logic and specify them in the manifest.json
would likely need to split the helpers file into smaller parts with dedicated content and background methods
would eliminate need to build/bundle files and make it easier to develop (can just watch and rebuild extension as normal)
good time to also restructure and refactor existing code base into distinct, modular parts
As a user I would like to be able to select which languages are used for spell checking instead of having to rely on the display accepted display languages set inside the Firefox settings.
languages can be chosen from side panel
initial supported languages based on getAcceptLanguages and getUILanguage
As an editor I want to be able to view and clear all words from my personal dictionary so that I don't have to remember what words are saved and can easily view all personal words.
remove the hidden functionatlity that uses 'ClearAll' to clear all words
add browser action item to clear a word from personal dictionary
add browser action item to display all saved personal words