-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Spellchecking added #10275
Spellchecking added #10275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting this is done without native node modules!
I'll sit resolving comments in ~5hours |
Please also use spaces instead of tabs, per the code style. We'll also need signoff before we can merge this. |
code style fixed due to eslint |
please wait because installing dictionaries not works yet. |
ok, if someone could test on Mac, while I'll configure my Mac VM for future contributions?:) I can't build for Mac without Mac. |
sandbox: true, | ||
enableRemoteModule: false, | ||
nodeIntegration: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enableRemoteModule: false leads to errors and breaks the feature in my case. Can I leave it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant just moving it back to where it was originally in the list, not changing the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,217 @@ | |||
/* | |||
Copyright 2018 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't take copyright for this. It looks almost identical to Rocket.Chat's implementation (https://github.com/RocketChat/Rocket.Chat.Electron/blob/7ad28f3f24f7b32b22ea75ed4e35ed2b173b933c/src/preload/spellchecking.js) which is under MIT. We need to give them credit, and use their license for this file, in order to include it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could change something inside. For example their implementation allow Multilanguage, our not ;) I can try to restructure the code - please suggest something, what should we do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a lawyer, but I believe we need to have the file under MIT and their copyright. Then when changes are made the applicable party's copyright is added underneath the Rocket.Chat copyright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at new version
I haven't exhaustively gone through this yet, but a few general points:
Thanks for looking at this, it is a somewhat complicated one though I'm afraid. |
I have inspired by working Rocket.Chat implementation, so similarities can be found.
I'm not giving up easily, so please wait for new commits ;) |
@dbkr
|
did some diff cleanup. please check again. Perhaps I trust automated tools for code-style too much |
The copyright? Rocketchat is MIT licensed, so it's fine to use their code, but we must attribute it appropriately. Code you write is copyright yourself (ie. not New Vector).
See inline comment, but you've also introduced a lot of unrelated formatting changes.
Honestly I'm not sure - I'd have to go and look at what the various parts of the spellchecking infrastructure come with. Unfortunately this is one of the reasons this PR is tricky, ie. it's not just a question of writing the code. Thanks again for the work on this, although I think there's still a lot to be done: I'm not really sure I understand how this code works and there still aren't really many comments to help me. As an example, what do we gain/lose from simple-spellcheck over what you were using before? Presumably it's no longer using the OS spellchecking so words the user added to their system's dictionary won't be included? You've certainly picked a very complex issue to fix: we'd normally expect people to start with a simpler one for their first PR - you could maybe start with some issues with the 'easy' tag? |
maybe. But if we've got time we can investigate issues here, and build to the end. If not you can close PR, I'll focus on other issues :)
simple-spellcheck is found by me replacement over native module, that comes with node-spellchecker and electron-spellchecker (https://www.npmjs.com/package/simple-spellchecker). Unfortunately - it bundles dictionaries inside. It also allows to install dictionaries. |
The PR author mentioned in the issue that the PR can be closed. Thanks for investigating this issue, and I'm sure we'll find a fix down the road. |
Tested on Linux and Windows.
Fixes #2661 ~ Travis