-
Notifications
You must be signed in to change notification settings - Fork 94
SpellChecker Interface #176
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
SpellChecker Interface #176
Conversation
|
Travis is going to be very very unhappy. Please don't look at the build results :P |
|
@sushain97 , Um, the Travis shows 2 errors. I am using |
|
I will be AFK till late this evening. You should be able to Google the
complexity error. It's an ESLint rule.
…On Jul 27, 2017 12:26 PM, "Monish Godhia" ***@***.***> wrote:
@sushain97 <https://github.com/sushain97> , Um, the Travis shows 2
errors. I am using currentSpellCheckerRequest in callApy but I do not
understand the error. There is one more error about complexity 37. Could
you help me in understanding what these are and how they can be resolved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#176 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEBEfmFyNA33B1jEAxiG4HERDwrPKXVSks5sSORigaJpZM4OkUNl>
.
|
sushain97
left a comment
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.
Lots of code! Some comments from first passthrough. I'm a bit concerned that there's a lot of repeated code here...
| resize: both; | ||
| } | ||
|
|
||
| .spellcheckVisible .spellError { |
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.
.spellcheckVisible => .spellcheckerVisible
| border-bottom: 1px solid #f00; | ||
| } | ||
|
|
||
| .popover-content { /* sass-lint:disable-line class-name-format */ |
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.
Can we make this selector more specific?
| margin-left: 30px; | ||
| } | ||
|
|
||
| /* SpellCheker */ |
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.
Two words also spelling :)
| width: 110%; | ||
| } | ||
|
|
||
| .list-group { /* sass-lint:disable-line class-name-format */ |
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.
Same with this and the next two. Basically my ask is to wrap it in a more specific class.
| clearTimeout(timer); | ||
| check(); | ||
| }); | ||
|
|
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.
extra line?
| success: function (data) { | ||
| var originalWordsIndex = 0; | ||
| for(var tokenIndex = 0; tokenIndex < data.length; tokenIndex++) { | ||
| if(data[tokenIndex]['known'] === true) { // eslint-disable-line dot-notation |
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.
Why did you disable eslint here?
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.
(and below)
| } | ||
| $('.spellError').each(function () { | ||
| var currentTokenId = this.id; | ||
| $(this).popover({animation: false, placement: 'bottom', trigger: 'manual', html: true, |
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.
Each property per line
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.
Clicked the wrong option above
| $(document).ready(function () { | ||
| restoreChoices('spellchecker'); | ||
| var timer, timeout = 2000; | ||
| $('#spellChekerForm').submit(function () { |
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.
$('#spellChekerForm') => $('#spellCheckerForm')
The current logic of mapping the suggestions on the frontend is based up on indices. I have a better idea in mind where I would make use of
tokenreturned from backend to do a string comparison on the frontend. However, this PR till then, could be reviewed and improved upon.