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
Study@3 #21
Study@3 #21
Conversation
0a750dc
to
4ee42b8
Compare
d97e1ac
to
65eb331
Compare
src/study.js
Outdated
const { root } = this; | ||
if (!root) return; | ||
|
||
|
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.
remove line
src/study.js
Outdated
if (!root) return; | ||
|
||
|
||
const currentClassNames = root.className.split(/\s+/g) |
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.
Could we use classList here instead?
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.
it doesn't support returning all classes :/
if (!Array.isArray(data)) { normalizedData = [data]; } | ||
define(tests) { | ||
let normalizedData = tests; | ||
if (!Array.isArray(tests)) normalizedData = [tests]; | ||
|
||
normalizedData.forEach((test) => { |
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.
remove parens
previousAssignments, | ||
userAssignments, | ||
persistedUserAssignments, | ||
} = this; | ||
|
||
this.providedTests.forEach((test) => { |
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.
remove parens
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.
airbnb eslint -_- we need to just make eslint-config-dsc
src/study.js
Outdated
delete this.persistedUserAssignments[testName]; | ||
this.removeClasses(testName); | ||
} else { | ||
this.userAssignments[testName] = |
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.
eh? where's the right hand side of this assignment?
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.
right below 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.
i would refactor this to be more readable. took a lot of my mental energy to grok what was going on 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.
hahaha i can make it one line instead
src/study.js
Outdated
delete this.persistedUserAssignments[testName]; | ||
this.removeClasses(testName); | ||
} else { | ||
this.userAssignments[testName] = |
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 would refactor this to be more readable. took a lot of my mental energy to grok what was going on here.
src/stores/memory.js
Outdated
@@ -0,0 +1,14 @@ | |||
|
|||
|
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.
Remove new line
closes #20
primary changes:
default
andwinner
support