-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add next button wait and timeout #489
Changes from all commits
f5f81d6
3f852fb
dd0a01f
a5c052a
e9bc1b9
a88784b
c020806
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,17 +20,19 @@ function AnswerCell({ cellData }: { cellData: StoredAnswer }) { | |||||
return Number.isFinite(cellData.endTime) && Number.isFinite(cellData.startTime) ? ( | ||||||
<Table.Td> | ||||||
<Stack miw={100}> | ||||||
{Object.entries(cellData.answer).map(([key, storedAnswer]) => ( | ||||||
<Box key={`cell-${key}`}> | ||||||
<Text fw={700} span> | ||||||
{' '} | ||||||
{`${key}: `} | ||||||
</Text> | ||||||
<Text span> | ||||||
{`${storedAnswer}`} | ||||||
</Text> | ||||||
</Box> | ||||||
))} | ||||||
{cellData.timedOut | ||||||
? <Text>Timed out</Text> | ||||||
: Object.entries(cellData.answer).map(([key, storedAnswer]) => ( | ||||||
<Box key={`cell-${key}`}> | ||||||
<Text fw={700} span> | ||||||
{' '} | ||||||
{`${key}: `} | ||||||
</Text> | ||||||
<Text span> | ||||||
{`${storedAnswer}`} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Can it just be this? Note sure if there is a "string/number" issue that you're trying to avoid here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it's a type issue:
|
||||||
</Text> | ||||||
</Box> | ||||||
))} | ||||||
</Stack> | ||||||
</Table.Td> | ||||||
) : ( | ||||||
|
@@ -237,6 +239,7 @@ export function TableView({ | |||||
endTime: Math.max(...Object.values(record.answers).filter((a) => a.endTime !== -1 && a.endTime !== undefined).map((a) => a.endTime)), | ||||||
answer: {}, | ||||||
windowEvents: Object.values(record.answers).flatMap((a) => a.windowEvents), | ||||||
timedOut: false, // not used | ||||||
}} | ||||||
key={`cell-${record.participantId}-total-duration`} | ||||||
/> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Text } from '@mantine/core'; | ||
|
||
export function TimedOut() { | ||
return ( | ||
<Text> | ||
Thank you for participating. Unfortunately, you have not answered the questions within the given time limit. Because of this, you are no longer eligible to participate in the study. You may close this window now. | ||
</Text> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confused what the change is for? Just for testing the schema validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lets the tests pass here, not just locally. It uses the updated schema