Skip to content
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

Switch to dark mode for the Museum Experience! #280

Open
wants to merge 11 commits into
base: master
from

Adjust props validation for project.in_museum_mode

+ Removed some extraneous comments and print statements
  • Loading branch information...
chelseatroy committed Aug 27, 2019
commit 57ff426bf51df1cf86a442583f46f98121915540
@@ -316,10 +316,9 @@ DrawingClassifier.propTypes = {
})
),
instructions: PropTypes.string,
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
project: PropTypes.shape({
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
id: PropTypes.string
}),
workflow: PropTypes.shape({
@@ -136,7 +136,7 @@ class MultiAnswerClassifier extends Component {
/>
</View>

//SWITCHING TO NIGHTMODE

const question =
<View>
<Question
@@ -162,7 +162,7 @@ class MultiAnswerClassifier extends Component {

const seenThisSession = R.indexOf(subject.id, subjectsSeenThisSession) >= 0

//SWITCHING TO NIGHTMODE

const classificationPanel =
<View style={styles.classificationPanel}>
<ClassificationPanel
@@ -179,7 +179,7 @@ class MultiAnswerClassifier extends Component {
}
</ClassificationPanel>
{
isQuestionVisible ? //SWITCHING TO NIGHTMODE
isQuestionVisible ?
<ScrollView
style={styles.scrollView}
ref={ref => this.scrollView = ref}
@@ -226,14 +226,14 @@ class MultiAnswerClassifier extends Component {
onPress={this.submitClassification()}
/>
</View>
{ //SWITCHING TO NIGHTMODE
{
(task.help || R.length(guide.items) > 0) &&
<Separator
style={styles.separator}
inMuseumMode={this.props.project.in_museum_mode}
/>
}
{//SWITCHING TO NIGHTMODE
{
task.help !== null &&
<NeedHelpButton
onPress={() => this.classifierContainer.displayHelpModal()}
@@ -261,7 +261,7 @@ class MultiAnswerClassifier extends Component {
/>
</View>

//SWITCHING TO NIGHTMODE

return (
<View style={[styles.container, colorModes.framingBackgroundColorFor(this.props.project.in_museum_mode)]}>
<ClassifierContainer
@@ -279,10 +279,12 @@ class MultiAnswerClassifier extends Component {
}

MultiAnswerClassifier.propTypes = {
project: PropTypes.object,
workflow: PropTypes.object,
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
project: PropTypes.shape({
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
id: PropTypes.string
}),
inPreviewMode: PropTypes.bool,
inBetaMode: PropTypes.bool,
guide: PropTypes.object,
@@ -262,10 +262,11 @@ class QuestionClassifier extends Component {
}

QuestionClassifier.propTypes = {
project: PropTypes.object,
workflow: PropTypes.object,
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
project: PropTypes.shape({
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
}),
inPreviewMode: PropTypes.bool,
inBetaMode: PropTypes.bool,
guide: PropTypes.object,
@@ -313,8 +313,6 @@ SwipeClassifier.propTypes = {
isSuccess: PropTypes.bool,
annotations: PropTypes.object,
workflowID: PropTypes.string,
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
workflow: PropTypes.shape({
first_task: PropTypes.string,
tasks: PropTypes.object,
@@ -333,6 +331,7 @@ SwipeClassifier.propTypes = {
seenThisSession: PropTypes.array,
project: PropTypes.shape({
display_name: PropTypes.string,
in_museum_mode: PropTypes.bool,
id: PropTypes.string
}),
tutorial: PropTypes.object,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.