Skip to content

Commit 5fe7078

Browse files
committed
Update replication config tutorial
1 parent 62a7673 commit 5fe7078

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

docs/tutorial/replication-config.json.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,28 @@ Open [http://localhost:8080](http://localhost:8080). You should now see the repl
4040
First, create the React wrapper that the Study Config will load. In `src/public/tutorial/assets/replication/`, add a file named `ScatterWrapper.tsx`.
4141

4242
```tsx title="src/public/tutorial/assets/replication/ScatterWrapper.tsx"
43+
/**
44+
* Authors: The ReVISit team
45+
* Description:
46+
* This file is the wrapper component for the Scatter plots
47+
*/
48+
4349
import {
4450
Center, Group, Stack, Text,
4551
} from '@mantine/core';
4652
import { Scatter } from './Scatter';
47-
import { StimulusParams } from '../../../../store/types';
53+
import { StimulusParams } from '../../../../../store/types';
4854

4955
/**
5056
* Holds 2 Scatter Plots
51-
* @param param0 - r1 is the correlation value for 1, r2 is the correlation value for 2.
57+
* @param param0 - r1 is the correlation value for 1, r2 is the correlation value for 2,
58+
* onClick is a function that determines the functionality when a graph is clicked.
5259
* @returns 2 Scatter Plots
5360
*/
5461
export default function ScatterWrapper({ parameters }: StimulusParams<{ r1: number; r2: number }>) {
5562
const { r1, r2 } = parameters;
56-
const r1DatasetName = `dataset_${r1.toFixed(1)}_size_100.csv`;
57-
const r2DatasetName = `dataset_${r2.toFixed(1)}_size_100.csv`;
63+
const r1DatasetName = `dataset_${r1.toFixed(2)}_size_100.csv`;
64+
const r2DatasetName = `dataset_${r2.toFixed(2)}_size_100.csv`;
5865

5966
return (
6067
<Stack style={{ width: '100%', height: '100%' }}>
@@ -64,12 +71,6 @@ export default function ScatterWrapper({ parameters }: StimulusParams<{ r1: numb
6471
>
6572
Please select the visualization that appears to have a larger correlation.
6673
</Text>
67-
<Text style={{
68-
textAlign: 'center', paddingBottom: '24px', fontSize: '18px', fontWeight: 'bold',
69-
}}
70-
>
71-
You can either click the buttons or use the left and right arrow keys.
72-
</Text>
7374
<Center>
7475
<Group style={{ gap: '40px' }} mb="md">
7576
<Scatter r={r1} datasetName={r1DatasetName} />
@@ -256,7 +257,9 @@ All three practice trials use [`provideFeedback`](../designing-studies/answers-t
256257

257258
## Step 6: Add the dynamic JND block
258259

259-
First, create the dynamic block function. In `src/public/tutorial/assets/replication/`, add a file named `JNDDynamic.tsx`.
260+
Navigate to `src/public/tutorial/assets/replication/` and open the file named `JNDDynamic.tsx`.
261+
262+
This file currently contains a placeholder. Let's write a function that dynamically changes which component appears next.
260263

261264
```ts title="src/public/tutorial/assets/replication/JNDDynamic.tsx"
262265
import { JumpFunctionParameters, JumpFunctionReturnVal, StoredAnswer } from '../../../../store/types';

0 commit comments

Comments
 (0)