Closed shankari closed 2 years ago
Merging directly into master does not result in any merge conflicts https://github.com/e-mission/e-mission-phone/pull/830
We could just merge into this subsidiary branch and revert all the UNSW-specific changes that we don't want.
Let's go with that for now; a few additional commits in the history are not too terrible and at least then we don't need to deal with merge conflicts.
Ok so the new plan is:
reverting individual changes results in merge conflicts, especially if they have been modified by subsequent changes.
$ git revert 15cb98e
Auto-merging www/templates/intro/consent-text.html
CONFLICT (content): Merge conflict in www/templates/intro/consent-text.html
error: could not revert 15cb98ea... Modify the consent text file
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Trying to revert a range
$ git revert 15cb98e...26df155
error: commit 26df155ca68844c91fc14f1234c153bd5538ef88 is a merge but no -m option was given.
fatal: revert failed
the help around this is
Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline. This option specifies the parent number (starting from 1) of the mainline and allows revert to reverse the change relative to the specified parent.
Reverting a merge commit declares that you will never want the tree changes brought in by the merge. As a result, later merges will only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what you want.
reverting all the way to the end to avoid partial reverts gives us
kshankar-35069s:phone-rciti-branch kshankar$ git revert 15cb98e...d825fc2
[revert_unsw_specific_changes a9738ff7] Revert "chore: remove unused json"
1 file changed, 30 insertions(+)
create mode 100644 www/json/trip_confirm_options.json
Auto-merging www/js/diary/list.js
CONFLICT (content): Merge conflict in www/js/diary/list.js
error: could not revert c5ead07d... patch(Diary): update tripgj label directly with the new answer
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
one correct revert, and one conflict. Let's try to resolve the conflict and see what happens
After resolving that conflict, moving on to the next revert. Keeps repeating this.
$ git commit
On branch revert_unsw_specific_changes
Revert currently in progress.
(run "git revert --continue" to continue)
(use "git revert --skip" to skip this patch)
(use "git revert --abort" to cancel the revert operation)
Ah that is because of https://stackoverflow.com/a/65638479/4040267
used $ git commit --allow-empty
and now there is no pending "stuck" git
Went through and reverted all changes to the best of my ability. Have some weird merge conflicts Now comparing differences between:
revert_unsw_specific_changes
and integrate_odk_compatible_surveys_using_enketo
revert_unsw_specific_changes
and master
to figure out which changes need to be retained
Painstakingly went through, reverted all UNSW-specific changes and re-introduced only the changes needed for this program.
Current status:
Diary | Label |
---|---|
Let's go ahead and merge the reverts for now We can address the trip survey buttons in a separate commit.
Fixing remaining minor issues:
If there are no user inputs saved (ever), we get this error.
while reading confirmed tripsCannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at Object.im.getUserInputForTrip (http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/survey/input-matcher.js:20:23)
at Object.mls.populateManualInputs (http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/survey/multilabel/multi-label-ui.js:298:50)
at http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/survey/multilabel/multi-label-ui.js:280:17
at Array.forEach (<anonymous>)
at Object.mls.populateInputsAndInferences (http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/survey/multilabel/multi-label-ui.js:279:30)
at http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/diary/infinite_scroll_list.js:109:41
at Array.forEach (<anonymous>)
at http://localhost/_app_file_/data/user/0/edu.berkeley.eecs.emission.devapp/files/phonegapdevapp/www/js/diary/infinite_scroll_list.js:107:16
Next, buttons are not covering the entire row. During testing, we had width=100%, but we reverted it because that is not true for all trip buttons.
Adding a text-align style, similar to the multi-label buttons centers it
and adding a width of 100% makes it take up the entire row. Note that the width needs to be on the button, not the parent DIV to override the hardcoded width in the diary.css
Remaining issues:
Trip inputs are duplicated | And don't show up on the label screen |
---|---|
https://user-images.githubusercontent.com/2423263/170623816-92d05e25-2b48-4b1b-b609-8cf5c8b5e743.mov
https://user-images.githubusercontent.com/2423263/170624159-ada650ce-1c3e-4fad-8104-9fcfad4fc322.mov
https://user-images.githubusercontent.com/2423263/170631795-5ca2f330-1626-4709-aa7a-0f63370d5f1f.mov
Note that the related server fix is at: https://github.com/e-mission/e-mission-server/pull/853
To use the behavioral data, we need to have a demographic survey for each user. We have typically used external surveys (Qualtrics/Google Forms) before, but those have the following limitations:
A solution that would address all those issues is to store the survey information in mongodb, just like everything else. But we don't want to create a survey builder. Instead, we will use kobotoolbox to create a survey which we will display using the enketo library.
The UNSW group has already integrated with enketo core in the https://github.com/e-mission/e-mission-phone/tree/rciti branch, so let's start by exploring that approach.
If we can generalize this sufficiently, we can also have a config option to create surveys for each trip instead of using the labeling approach.