Skip to content

Commit

Permalink
ref: Rename startCode as startCodeTrial
Browse files Browse the repository at this point in the history
ref: Rename showName as nameTrial and showWelcome as welcomeTrial
  • Loading branch information
RobertGemmaJr committed Dec 12, 2023
1 parent f535372 commit 9c0e598
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/timelines/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import { config } from "../config/main";

import { enterFullscreenTrial } from "../trials/fullscreen";
import { holdUpMarkerTrial } from "../trials/holdUpMarker";
import startCode from "../trials/startCode";
import { showName, showWelcome } from "../trials/welcome";
import { startCodeTrial } from "../trials/startCode";
import { welcomeTrial, nameTrial } from "../trials/welcome";

/**
* Timeline of initial trials used for setup and instructions
*/
const timeline = [showName(), enterFullscreenTrial, showWelcome()];
const timeline = [nameTrial, enterFullscreenTrial, welcomeTrial];

// Add photodiode trials
if (config.USE_PHOTODIODE) {
timeline.push(holdUpMarkerTrial);
timeline.push(startCode());
timeline.push(startCodeTrial);
}

// TODO: Refactor to function
Expand Down
4 changes: 2 additions & 2 deletions src/trials/startCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { baseStimulus } from "../lib/markup/stimuli";
import { h1 } from "../lib/markup/tags";
import { beep } from "../lib/utils";

const startCode = {
const startCodeTrial = {
type: htmlKeyboardResponse,
// TODO: Display photodiodeGhostBox as prompt
stimulus: () => {
Expand All @@ -21,4 +21,4 @@ const startCode = {
},
};

export { startCode };
export { startCodeTrial };
6 changes: 3 additions & 3 deletions src/trials/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { baseStimulus } from "../lib/markup/stimuli";
import { h1 } from "../lib/markup/tags";

/** Task that displays the name of the experiment */
const showName = showMessage(config, {
const nameTrial = showMessage(config, {
responseType: htmlButtonResponse,
message: language.name,
responseEndsTrial: true,
Expand All @@ -18,7 +18,7 @@ const showName = showMessage(config, {
// TODO: Move showMessage into this repo?

/** Task that displays a welcome message with the photodiode ghost box */
const showWelcome = {
const welcomeTrial = {
type: htmlKeyboardResponse,
stimulus: () => {
const welcomeMarkup = h1(language.trials.welcome);
Expand All @@ -29,4 +29,4 @@ const showWelcome = {
};
// TODO #292: Turn into jsPsych NO_KEYS trial

export { showName, showWelcome };
export { nameTrial, welcomeTrial };

0 comments on commit 9c0e598

Please sign in to comment.