Skip to content

Commit 7986409

Browse files
committed
docs: a few more updates/clarifications
1 parent a6e84c1 commit 7986409

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

docs/concepts.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ import useViewAPI from '@/core/composables/useViewAPI'
7373
const api = useViewAPI()
7474
7575
api.steps.append([
76-
{ word: 'THIS' },
77-
{ word: 'IS' },
78-
{ word: 'A' },
79-
{ word: 'TEST' },
76+
{ word: 'THIS' }, // step 1
77+
{ word: 'IS' }, // step 2
78+
{ word: 'A' }, // step 3
79+
{ word: 'TEST' }, // step 4
8080
])
8181
</script>
8282
@@ -296,11 +296,11 @@ api.onKeyDown(' ', () => {
296296

297297
Here the `api.isLastStep()` method is used to check if the current step is the
298298
last step. There are several equivalent ways to do that as well for example
299-
`api.hasNextStep()` or `api.stepIndex >= api.nSteps`, but part of Smile's API
299+
`!api.hasNextStep()` or `api.stepIndex >= api.nSteps`, but part of Smile's API
300300
design principal is to give you very clear, commonly used function names which
301-
can help avoid typos or errors in logic. If it is, we exit to the next View with
302-
`api.goNextView()`. If it is not, we advance to the next step with
303-
`api.goNextStep()`.
301+
can help avoid typos or errors in logic. If it is the last step, we exit to the
302+
next View with `api.goNextView()`. If it is not, we advance to the next step
303+
with `api.goNextStep()`.
304304

305305
The use of `api.goNextView()` means that even if we change the order of our
306306
Views in the overall flow of our experiment we don't need to update our code.
@@ -393,14 +393,29 @@ them to your liking. Some are quite sophisticated and can save you a lot of time
393393
such as the `InstructionsQuiz` View which can be used to quickly build
394394
comprehension check quizes.
395395

396-
That's it! You can now run the experiment and see your new View appear after the
397-
windowsizer View. Let's see how to test it out.
396+
With this change there is a new sequence to the experiment
397+
398+
... -> demographic survey -> windowsizer -> myview -> instructions -> ...
399+
400+
If we had pasted the `myview` View before the `windowsizer` View, the sequence
401+
would have been:
402+
403+
... -> myview -> demographic survey -> windowsizer -> instructions -> ...
404+
405+
Smile's timeline API also allow randomized flows for showing different sequences
406+
depending on what condition a participant is assigned to.
407+
408+
**Now that we have defined a simple View and placed it in the design/timeline,
409+
we are ready to test it out.**
398410

399411
## Developing and debugging your experiment
400412

401413
A final key concept of Smile is the advanced tools which help you develop and
402-
debug your experiment. You can read more about [development](/developing) in the
403-
remainder of the documentation. However, most simply you type
414+
debug your experiment. We think of it as enabling "brain surgery" on your
415+
experiment. You can use these tools to bounce around, inspect various elements
416+
of your interface, and check the format of your data. You can read more about
417+
[development](/developing) in the remainder of the documentation. However, most
418+
simply you type
404419

405420
```sh
406421
npm run dev

0 commit comments

Comments
 (0)