Fixes: Cache strategy for public offline Enketo Forms#1182
Fixes: Cache strategy for public offline Enketo Forms#1182matthew-white merged 1 commit intogetodk:nextfrom
Conversation
a90d94b to
f0e6a92
Compare
Removed $ from the enketo cache strategy regex so that enketo offline line works with query parameter suffix as well
f0e6a92 to
592ab8e
Compare
lognaturel
left a comment
There was a problem hiding this comment.
Thanks! Makes sense to me.
|
@getodk/testers once this is merged it would be great to get some testing on staging asap so we can schedule the point release. Thank you! You can see the bad behavior on the QA server by going to a public access link like https://test.getodk.cloud/f/gOG1T0w7FLSkZLIUcCdLC3okEcBY3dC?st=Hh6JTAbyhFL1D2Yw58dspfdxEtQEuX2NVgC$MwsrP!KvRpofYEGxF95fLo82KkKz and adding Then you need to go offline, refresh, and you'll see that the page doesn't load. However, if you go back online, remove the ?st part and then go offline again, you should be able to refresh successfully. Once this PR is on staging, it should be possible to refresh while offline even with public access links. It should also be possible to add other query parameters like defaults: https://forum.getodk.org/t/enketo-public-access-link-with-prefilled-fields/39125/2 |
|
@lognaturel Scenario where I have a normal public access link then in Dev Tools I'll switch to offline and refresh the page without adding anything to URL won't work and that is correct behavior? |
|
@sadiqkhoja @lognaturel If you are in a hurry and the answer to the comment above is yes, you can remove the ‘needs testing’ label. If not, I would check the other parameters tomorrow and then close the PR. |
|
Thanks! Yes, a public access link without the offline URL component should NOT work offline. |
Removed $ from the enketo cache strategy regex so that enketo offline line works with query parameter suffix as well
Closes forum post
What has been done to verify that this works as intended?
Added a test and manual verification on dev environment.
Why is this the best possible solution? Were any other approaches considered?
Simple solution. I was thinking about using regex with optional query parameters but that would make the regex complex without any benefits.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
No
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No
Before submitting this PR, please make sure you have:
nextbranch OR only changed documentation/infrastructure (masteris stable and used in production)