Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

feat(spellcheckerprovider): async spellchecker support #389

Merged
merged 28 commits into from May 20, 2019
Merged

Conversation

kwonoj
Copy link
Owner

@kwonoj kwonoj commented May 16, 2019

closes #218

This PR implements feature to support async spellchecker interface from electron@5.

PR doesn't include any backward interface compatibility, makes only supports electron@5 and above.

Notable breaking changes are

  • spellCheckerProvider now having all async interfaces only to support proxy interop easily
  • spellCheckerProvider no longer attach to webFrame directly, it's now separate jobs for attachSpellCheckProvider
  • loadDictionary no longer accepts file path to access file directly
  • verboselog is removed, barely used

api surface has bit expanded by separating provider to attach into webframe. But this allows to instantiate provider in other thread / process, achieves true async spellchecker without blocking main thread. For simplicity, attachProvider accepts provider as-is if it's to be used in main thread.

BREAKING CHANGE: loadDictionary does not read physical file from path
anymore
@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #389 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #389   +/-   ##
======================================
  Coverage    99.3%   99.3%           
======================================
  Files           3       3           
  Lines         143     143           
  Branches       25      25           
======================================
  Hits          142     142           
  Partials        1       1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 863b619...eda21cf. Read the comment docs.

@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #389 into master will decrease coverage by 7.19%.
The diff coverage is 88.73%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #389     +/-   ##
========================================
- Coverage    99.3%   92.1%   -7.2%     
========================================
  Files           3       4      +1     
  Lines         143     114     -29     
  Branches       25      17      -8     
========================================
- Hits          142     105     -37     
- Misses          0       6      +6     
- Partials        1       3      +2
Impacted Files Coverage Δ
src/index.ts 100% <100%> (ø) ⬆️
src/attachSpellCheckProvider.ts 80.95% <80.95%> (ø)
src/spellCheckerProvider.ts 93.97% <91.83%> (-5.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 863b619...631f539. Read the comment docs.

kwonoj added 26 commits May 16, 2019 16:17
refactor(loaddictionary): only accept arraybuffer
BREAKING CHANGES: unloadDictionary does not reset webframe spellchecker
BREAKING CHANGE: spellchecker provider do not attach to
webframe.setSpellcheckProvider
BREAKING CHANGE: switchDictionary deprecated
BREAKING CHANGE: provider interface is now async
feat(attachspellcheckerprovider): implement attach spellchecker provider
docs(example): update example code, remove separate pkg
docs(example): add example for worker
fix(provider): allow tree shake
test(provider): update test cases
docs(readme): update documentation
build(release): release 1.0.0-beta.7
@kwonoj kwonoj merged commit c9e0658 into master May 20, 2019
@kwonoj kwonoj deleted the feat-async branch May 20, 2019 05:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asynchronous spellchecker support
1 participant