Skip to content

Conversation

@share-with-me
Copy link
Contributor

@share-with-me share-with-me commented Jul 26, 2017

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 token returned from backend to do a string comparison on the frontend. However, this PR till then, could be reviewed and improved upon.

screenshot from 2017-07-27 00-06-24

screenshot from 2017-07-27 00-06-47

@share-with-me
Copy link
Contributor Author

Travis is going to be very very unhappy. Please don't look at the build results :P

@share-with-me
Copy link
Contributor Author

@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?

@sushain97
Copy link
Member

sushain97 commented Jul 27, 2017 via email

Copy link
Member

@sushain97 sushain97 left a 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 {
Copy link
Member

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 */
Copy link
Member

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 */
Copy link
Member

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 */
Copy link
Member

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();
});

Copy link
Member

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

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?

Copy link
Member

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

Choose a reason for hiding this comment

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

Each property per line

Copy link
Member

@sushain97 sushain97 left a 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

@sushain97 sushain97 mentioned this pull request Oct 11, 2017
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 5, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 5, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 5, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 5, 2018
$(document).ready(function () {
restoreChoices('spellchecker');
var timer, timeout = 2000;
$('#spellChekerForm').submit(function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

$('#spellChekerForm') => $('#spellCheckerForm')

@sushain97 sushain97 closed this Jan 6, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 7, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 9, 2018
JPJPJPOPOP added a commit to JPJPJPOPOP/apertium-html-tools that referenced this pull request Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants