Skip to content

Commit

Permalink
#554 Necessary Prettier fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
FrenjaminBanklin committed Nov 21, 2023
1 parent a914b38 commit 7fa7c89
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ const VariableBlock = props => {
}
})()}
</small>
{ variable.errors ?
<small className='error-count'>
<span>{Object.keys(variable.errors).length} issues</span>
</small>
: null }
{variable.errors ? (
<small className="error-count">
<span>{Object.keys(variable.errors).length} issues</span>
</small>
) : null}
</button>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
$variable-selected: #285aa4;

.single-variable {
border: none;
background: transparent;
font-family: 'Libre Franklin', Arial, sans-serif;
width: 100%;
cursor: pointer;
margin: 0;
color: inherit;
font-size: 1em;
background-color: $color-bg;
border-bottom: solid 1px rgba(0, 0, 0, 0.1);
border-right: solid 1px rgba(0, 0, 0, 0.1);
padding: 0.5em;
text-align: left;
padding-left: 1em;
border: none;
background: transparent;
font-family: $font-default;
width: 100%;
cursor: pointer;
margin: 0;
color: inherit; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
font-size: 1em;
background-color: $color-bg;
border-bottom: solid 1px rgba(0, 0, 0, 0.1);
border-right: solid 1px rgba(0, 0, 0, 0.1);
padding: 0.5em;
text-align: left;
padding-left: 1em;

h4 {
padding: 0;
margin: 0;
}
h4 {
padding: 0;
margin: 0;
}

small {
font-size: 0.75em;
small {
font-size: 0.75em;

&.error-count {
display: block;
color: $color-dangerous;
}
}
&.error-count {
display: block;
color: $color-dangerous;
}
}
}

.variable-is-selected {
border-right: none;
color: $variable-selected;
border-right: none;
color: $variable-selected;
}
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ const VariableValues = props => {
<option value="geometric">Geometric (Multiply)</option>
</select>
</label>
{variable.errors
&& variable.errors.seriesType
&& (! SERIES_TYPE_OPTIONS.includes(variable.seriesType)) ?
<span className="invalid-value-warning">
Invalid option &quot;{variable.seriesType}&quot;
</span>
: null}
{variable.errors &&
variable.errors.seriesType &&
!SERIES_TYPE_OPTIONS.includes(variable.seriesType) ? (
<span className="invalid-value-warning">
Invalid option &quot;{variable.seriesType}&quot;
</span>
) : null}

<label className="variable-values--group">
<label>Step by: </label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ class AssessmentStateHelpers {
}

this.setAssessmentQuestionBank(assessmentModel, assessment.questions)
this.setAssessmentAttemptVariables(assessmentModel, assessment.attemptId, assessment.state.variables)
this.setAssessmentAttemptVariables(
assessmentModel,
assessment.attemptId,
assessment.state.variables
)
this.updateNavContextAndMenu(assessmentModel, assessment.attemptId)
this.signalAttemptStarted(assessmentModel)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ const actionButtonNodeParser = node => {
const objectivesXML = processObjectives(node.content.objectives)

return (
`<ActionButton${attrs}${id}>` + textGroupXML + triggersXML + objectivesXML + varsXML + `</ActionButton>`
`<ActionButton${attrs}${id}>` +
textGroupXML +
triggersXML +
objectivesXML +
varsXML +
`</ActionButton>`
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const figureNodeParser = node => {
const varsXML = processVars(node.content.variables)
const objectivesXML = processObjectives(node.content.objectives)

return `<Figure${attrs}${id}>` + textGroupXML + triggersXML + objectivesXML + varsXML + `</Figure>`
return (
`<Figure${attrs}${id}>` + textGroupXML + triggersXML + objectivesXML + varsXML + `</Figure>`
)
}

module.exports = figureNodeParser
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ const listNodeParser = node => {
const varsXML = processVars(node.content.variables)
const objectivesXML = processObjectives(node.content.objectives)

return `<List${attrs}${id}>` + listStyles + textGroupXML + triggersXML + objectivesXML + varsXML + `</List>`
return (
`<List${attrs}${id}>` +
listStyles +
textGroupXML +
triggersXML +
objectivesXML +
varsXML +
`</List>`
)
}

const listStylesParser = listStyles => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const pageNodeParser = (node, childrenParser) => {
const objectivesXML = processObjectives(node.content.objectives)

return (
`<Page${attrs}${id}>` + childrenParser(node.children) + triggersXML + objectivesXML + varsXML + `</Page>`
`<Page${attrs}${id}>` +
childrenParser(node.children) +
triggersXML +
objectivesXML +
varsXML +
`</Page>`
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
'use strict';
'use strict'

var dbm;
var type;
var seed;
var dbm
var type
var seed

/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function(options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
};
dbm = options.dbmigrate
type = dbm.dataType
seed = seedLink
}

exports.up = function(db) {
return db
.addColumn('visits', 'state', {
type: 'jsonb'
})
};
return db.addColumn('visits', 'state', {
type: 'jsonb'
})
}

exports.down = function(db) {
return db.removeColumn('visits', 'state', {
type: 'jsonb'
})
};
return db.removeColumn('visits', 'state', {
type: 'jsonb'
})
}

exports._meta = {
"version": 1
};
version: 1
}
10 changes: 5 additions & 5 deletions packages/app/obojobo-express/server/models/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ class Visit {
SET state=$[state]
WHERE id=$[visitId]
`,
{visitId: this.id, state}
)
.then(() => {
this.state = state
})
{ visitId: this.id, state }
)
.then(() => {
this.state = state
})
}
}

Expand Down

0 comments on commit 7fa7c89

Please sign in to comment.