Skip to content

feat: enable builtin spellchecker - #20897

Merged
MarshallOfSound merged 2 commits into
8-x-yfrom
spellchecker-v8
Oct 31, 2019
Merged

MarshallOfSound merged 2 commits into
8-x-yfrom
spellchecker-v8

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

Backport of #20692

Only difference is the default value of the spellcheck webPreference is false (disabled by default in 8-x-y as per discussion)

Notes: Added support for the built-in spellchecker. We will use the OS spellchecker on macOS and hunspell on all other platforms.

* chore: add code required to use chromes spellchecker

* chore: fix linting

* chore: manifests needs buildflags now

* chore: add dictionarySuggestions to the context menu event when the spellchecker is active

* chore: enable by default for windows builds

* chore: add patch to remove incognito usage in the spellchecker

* chore: add dependencies on spellcheck common and flags

* chore: conditionally include spell check panel impl

* chore: fix deps for spellcheck feature flags

* chore: add patch for electron resources

* chore: add dependency on //components/language/core/browser

* chore: patches to make hunspell work on windows

* build: collect hunspell dictionaries into a zip file and publish

* chore: clean up patches

* chore: add docs and set spell checker url method

* chore: fix error handling

* chore: fix hash logic

* build: update hunspell filename generator

* fix: default spellchecker list to the current system locale if we can

* docs: document the language getter

* chore: patch IDS_ resources for linux builds

* feat: add spellcheck webpref flag to disable the builtin spellchecker

* chore: fix docs typo

* chore: clean up spellchecker impl as per feedback

* remove unneeded deps
@MarshallOfSound
MarshallOfSound requested review from a team as code owners October 31, 2019 20:20
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Oct 31, 2019
@trop trop Bot mentioned this pull request Oct 31, 2019
7 of 8 tasks
@trop trop Bot added 8-x-y backport This is a backport PR labels Oct 31, 2019
@MarshallOfSound MarshallOfSound added the semver/minor backwards-compatible functionality label Oct 31, 2019

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM... just a small nit on the docs

Comment thread docs/api/web-frame.md Resolved
@MarshallOfSound
MarshallOfSound merged commit 40e0e8e into 8-x-y Oct 31, 2019
@release-clerk

release-clerk Bot commented Oct 31, 2019

Copy link
Copy Markdown

Release Notes Persisted

Added support for the built-in spellchecker. We will use the OS spellchecker on macOS and hunspell on all other platforms.

@MarshallOfSound
MarshallOfSound deleted the spellchecker-v8 branch October 31, 2019 21:35
@aabuhijleh

Copy link
Copy Markdown

Hi @MarshallOfSound,

Thanks for this PR.

I'm a little confused on how this new built-in spellchecker works

This is what I'm doing (Windows 10)
image

Misspelled words are not highlighted with red lines. Can you please clear up how to use this spellchecker?

@talon266

Copy link
Copy Markdown

Adding to @aabuhijleh .
I don't get anything in the 'dictionarySuggestions' nor in the 'misspelledWord'

Do we need to install something on windows in order for it to work?

@dziudek

dziudek commented Feb 4, 2020 •

Copy link
Copy Markdown

@aabuhijleh @tallev266 - you were probably affected by this issue: #21798 but I can confirm that in the stable release of Electron v.8.0 spellchecker is working fine :)

@sergeyd63

sergeyd63 commented Feb 6, 2020 •

Copy link
Copy Markdown

not working in stable 8.0.0

@eteisman

Copy link
Copy Markdown

I am trying to upgrade my application to use Electron 8.0.0,

The spellchecker does not seem to work. I do not see any spelling errors being marked.

@adventofryz

adventofryz commented Feb 17, 2020 •

Copy link
Copy Markdown

Okay, I love the fact that we have native spellchecker but I honestly have no clue how to get suggestions from it. I see the red underline on an incorrect word and naturally, I right-click it to see the context menu. No context menu appears.
Okay, so I guess I need to build one by myself. But where do I get the suggestions to display from the session spellchecker? I read the documentation and could not find any mention of it whatsoever.

So my question is: Do we actually build a suggestion menu (can we?) or is there a built-in tool to bring up a context menu on right-clicking the spellchecked word.

EDIT: Found it. My bad. the context menu DOES have an option to see misspelled words and suggestions. Here is the link for anyone else who wishes to pair it with your spellchecker.
Link: https://www.electronjs.org/docs/all#event-context-menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8-x-y backport This is a backport PR new-pr 🌱 PR opened recently semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants