Skip to content

Conversation

@kvnvelasco
Copy link
Contributor

@kvnvelasco kvnvelasco commented Jan 23, 2019

This change is Reviewable

@mathspacebot
Copy link

Jira ticket: APP-670 MSQuill Spike

@kvnvelasco
Copy link
Contributor Author

@bholloway This nit change from the previous set of commits broke keyboard shortcut registration. There's no simple way to detect when this object will init, so checking on registration is the quickest fix.

@kvnvelasco kvnvelasco force-pushed the APP-670-MsQuill-Spike branch from 87debc7 to 4fed466 Compare January 23, 2019 06:47
* Add mixed fraction type
* Added definite integral command
Copy link
Contributor

@bholloway bholloway left a comment

Choose a reason for hiding this comment

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

Mostly nits but a couple of things I think worth blocking on

var commands = options.commands || [];
var ignoredCharacters = options.ignoredCharacters || [];
// We're going to create an index for ignored character lookup
ignoredCharacters.forEach(char => this.cursor.grammarDicts.ignoredCharacters[char] = true);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit the assignment return is generally considered confusing but it seems to be common practice in this code base

change probably best just to avoid the lambdas since they aren't used anywhere else

var boundSymbol = binder(symbolDefinition);
var boundSymbol;
if (symbolDefinition.useInternalSymbolDef) boundSymbol = LatexCmds[symbolDefinition.name];
else boundSymbol = binder(symbolDefinition);
Copy link
Contributor

Choose a reason for hiding this comment

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

opinion a ternary would make this assignment more declarative

var latexWithoutBs = symbolDefinition.latex.replace('\\', '');
symbols[latexWithoutBs] = boundSymbol;
}
if(symbolDefinition.htmlEntity)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit space between if and parentheses.

@kvnvelasco kvnvelasco changed the title APP-670 Fix an issue with keyboard shortcut registration APP-672 Fix an issue with keyboard shortcut registration Jan 29, 2019
@kvnvelasco kvnvelasco force-pushed the APP-670-MsQuill-Spike branch from 0b55a02 to a760607 Compare January 29, 2019 03:50
Copy link
Contributor

@bholloway bholloway left a comment

Choose a reason for hiding this comment

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

I think this is good to go. Only one nit. Last call.

var ignoredCharacters = options.ignoredCharacters || [];
// We're going to create an index for ignored character lookup
ignoredCharacters.forEach(char => this.cursor.grammarDicts.ignoredCharacters[char] = true);
ignoredCharacters.forEach(function(char) { this.cursor.grammarDicts.ignoredCharacters[char] = true }.bind(this));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit Complexity is growing here. I think this probably makes more sense as a for loop at this point.

@bholloway bholloway changed the title APP-672 Fix an issue with keyboard shortcut registration APP-672 New Keyboard shortcuts Jan 29, 2019
Copy link
Contributor

@BrandonNav BrandonNav left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 2 of 6 files at r2, 4 of 4 files at r3.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @bholloway and @kvnvelasco)

Copy link
Contributor

@BrandonNav BrandonNav left a comment

Choose a reason for hiding this comment

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

Dismissed @bholloway from 7 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @kvnvelasco)

@BrandonNav BrandonNav merged commit a84abd6 into master Jan 29, 2019
@BrandonNav BrandonNav deleted the APP-670-MsQuill-Spike branch January 29, 2019 04:44
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.

5 participants