From 204647f7a4559440a8b8030c0ca4c2d7d167d0b9 Mon Sep 17 00:00:00 2001 From: remo5000 Date: Fri, 3 Aug 2018 14:27:32 +0800 Subject: [PATCH 1/6] Use minimal, spread out mcq options - One option on each line, spaced out. - minimal button that only shows a differnce when it is active. --- src/styles/_workspace.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/styles/_workspace.scss b/src/styles/_workspace.scss index e91a362e7f..9560a19e38 100644 --- a/src/styles/_workspace.scss +++ b/src/styles/_workspace.scss @@ -79,23 +79,29 @@ $code-color-error: #ff4444; flex: 1 1; margin: 0 0.5rem 0 0.5rem; overflow: hidden; + .mcq-content-parent { height: 100%; overflow: auto; padding: 20px; + .mcq-options-parent { height: 100%; + .mcq-option { padding: 20px; } + .mcq-option:focus { outline: 0; } } } + .pt-card { background-color: $cadet-color-2; } + .Text { word-break: break-word; word-wrap: break-word; From 18994c7af57e7c91d79c632ac1ef5a56bc2c462e Mon Sep 17 00:00:00 2001 From: remo5000 Date: Fri, 3 Aug 2018 16:12:40 +0800 Subject: [PATCH 2/6] Add getButtonIntent function --- src/components/workspace/MCQChooser.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/workspace/MCQChooser.tsx b/src/components/workspace/MCQChooser.tsx index 6de6fb5705..2f16c46b5a 100644 --- a/src/components/workspace/MCQChooser.tsx +++ b/src/components/workspace/MCQChooser.tsx @@ -68,7 +68,6 @@ class MCQChooser extends React.PureComponent { * Handles the logic for what intent an MCQ option should show up as. * This is dependent on the presence of an actual solution (for ungraded assessments), * the current selection, and whether the selected option is active. - * * @param currentOption the current button key, corresponding to a choice ID * @param chosenOption the mcq option that is chosen in the state, i.e what should show up as "selected" * @param solution the solution to the mcq, if any From ae929b08b378d460afbe9229ee4e6c649f61f64c Mon Sep 17 00:00:00 2001 From: remo5000 Date: Fri, 3 Aug 2018 16:17:40 +0800 Subject: [PATCH 3/6] Update mock questions --- src/mocks/assessmentAPI.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mocks/assessmentAPI.ts b/src/mocks/assessmentAPI.ts index a0cecef9b5..3b9a92c3bc 100644 --- a/src/mocks/assessmentAPI.ts +++ b/src/mocks/assessmentAPI.ts @@ -184,19 +184,19 @@ export const mockAssessmentQuestions: Array choices: [ { content: 'A', - hint: null + hint: 'hint A' }, { content: 'B', - hint: null + hint: 'hint B' }, { content: 'C', - hint: null + hint: 'hint C' }, { content: 'D', - hint: null + hint: 'hint D' } ], id: 2, From 3bf4bd5a6bc1505bf5ad421c506b6ae399005f55 Mon Sep 17 00:00:00 2001 From: remo5000 Date: Fri, 3 Aug 2018 16:27:52 +0800 Subject: [PATCH 4/6] Format files --- src/components/workspace/MCQChooser.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/workspace/MCQChooser.tsx b/src/components/workspace/MCQChooser.tsx index 2f16c46b5a..6de6fb5705 100644 --- a/src/components/workspace/MCQChooser.tsx +++ b/src/components/workspace/MCQChooser.tsx @@ -68,6 +68,7 @@ class MCQChooser extends React.PureComponent { * Handles the logic for what intent an MCQ option should show up as. * This is dependent on the presence of an actual solution (for ungraded assessments), * the current selection, and whether the selected option is active. + * * @param currentOption the current button key, corresponding to a choice ID * @param chosenOption the mcq option that is chosen in the state, i.e what should show up as "selected" * @param solution the solution to the mcq, if any From 613dc419b6b16f5a1470b74aa4736748e3bf05d1 Mon Sep 17 00:00:00 2001 From: remo5000 Date: Fri, 3 Aug 2018 16:35:55 +0800 Subject: [PATCH 5/6] Make mock question's graded hints null --- src/mocks/assessmentAPI.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mocks/assessmentAPI.ts b/src/mocks/assessmentAPI.ts index 3b9a92c3bc..a0cecef9b5 100644 --- a/src/mocks/assessmentAPI.ts +++ b/src/mocks/assessmentAPI.ts @@ -184,19 +184,19 @@ export const mockAssessmentQuestions: Array choices: [ { content: 'A', - hint: 'hint A' + hint: null }, { content: 'B', - hint: 'hint B' + hint: null }, { content: 'C', - hint: 'hint C' + hint: null }, { content: 'D', - hint: 'hint D' + hint: null } ], id: 2, From 4719597839cedffc159fc3a3b63b97547cb3611d Mon Sep 17 00:00:00 2001 From: ning Date: Tue, 7 Aug 2018 15:38:06 +0800 Subject: [PATCH 6/6] Fix scrollbars always visible on linux --- src/styles/_playground.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/_playground.scss b/src/styles/_playground.scss index db73c475aa..f1162735c8 100644 --- a/src/styles/_playground.scss +++ b/src/styles/_playground.scss @@ -12,5 +12,5 @@ */ width: 100% !important; height: 40vh !important; // 100% results in 0 height, 100vh is too big. - overflow: scroll; + overflow: auto; }