Skip to content
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

feat: enable builtin spellchecker #20897

Merged
merged 2 commits into from Oct 31, 2019
Merged

feat: enable builtin spellchecker #20897

merged 2 commits into from Oct 31, 2019

Conversation

MarshallOfSound
Copy link
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 in the last 24 hours label Oct 31, 2019
@trop trop bot mentioned this pull request Oct 31, 2019
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
Copy link
Contributor

@jkleinsc jkleinsc left a comment

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

docs/api/web-frame.md Show resolved Hide resolved
@MarshallOfSound MarshallOfSound merged commit 40e0e8e into 8-x-y Oct 31, 2019
@release-clerk
Copy link

release-clerk bot commented Oct 31, 2019

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

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

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
Copy link

dziudek commented Feb 4, 2020

@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
Copy link

sergeyd63 commented Feb 6, 2020

not working in stable 8.0.0

@eteisman
Copy link

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
Copy link

adventofryz commented Feb 17, 2020

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 in the last 24 hours semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants