-
Notifications
You must be signed in to change notification settings - Fork 9
paradata: log invisible widgets at the end of sections #1033
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
Conversation
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.
Pull Request Overview
This PR adds tracking of widgets that were not visible when a user leaves a section or clicks a button, and includes those hidden widget paths in both the frontend update flow and the backend export CSV.
- Frontend now computes hidden widget paths and attaches them to
UserAction
during updates and navigation. UserAction
type is extended to include an optionalhiddenWidgets
array.- Backend export logic includes a
hiddenWidgets
column in CSV output, and tests are updated accordingly.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/evolution-frontend/src/actions/tests/Survey.test.ts | Added tests to verify hiddenWidgets in update and navigation. |
packages/evolution-frontend/src/actions/Survey.ts | Implemented getHiddenWidgets and enhanced user actions. |
packages/evolution-common/src/services/questionnaire/types/Data.ts | Extended UserAction type with optional hiddenWidgets . |
packages/evolution-backend/src/services/adminExport/exportInterviewLogs.ts | Exported hiddenWidgets in CSV rows. |
packages/evolution-backend/src/services/adminExport/tests/exportInterviewLogs.test.ts | Updated export tests to assert hiddenWidgets field. |
event_date: new Date((2) * 1000).toISOString(), | ||
modifiedFields: modifiedKeys, | ||
initializedFields: initializedKeys, | ||
unsetFields: buttonLogs[1].unset_paths !== undefined ? buttonLogs[0].unset_paths.join('|') : '', |
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.
In the second button_click row assertion, the test uses buttonLogs[0].unset_paths
but should use buttonLogs[1].unset_paths
to match the second log entry.
unsetFields: buttonLogs[1].unset_paths !== undefined ? buttonLogs[0].unset_paths.join('|') : '', | |
unsetFields: buttonLogs[1].unset_paths !== undefined ? buttonLogs[1].unset_paths.join( |
Copilot uses AI. Check for mistakes.
event_date: new Date((2) * 1000).toISOString(), | ||
modifiedFields: modifiedKeys2, | ||
initializedFields: initializedKeys2, | ||
unsetFields: sectionChangeLogs[1].unset_paths !== undefined ? sectionChangeLogs[0].unset_paths.join('|') : '', |
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.
In the second section_change row assertion, the test references sectionChangeLogs[0].unset_paths
instead of sectionChangeLogs[1].unset_paths
, causing a mismatch with the second log.
unsetFields: sectionChangeLogs[1].unset_paths !== undefined ? sectionChangeLogs[0].unset_paths.join('|') : '', | |
unsetFields: sectionChangeLogs[1].unset_paths !== undefined ? sectionChangeLogs[1].unset_paths.join('|') : '', |
Copilot uses AI. Check for mistakes.
fixes chairemobilite#1016 When the user navigates to another section or when a button is clicked, we save the list of hidden widgets on the current section so we can know which widgets were seen by the participant or not. Update log export to add the hidden widgets
fixes #1016
When the user navigates to another section or when a button is clicked, we save the list of hidden widgets on the current section so we can know which widgets were seen by the participant or not.
Update log export to add the hidden widgets