-
Notifications
You must be signed in to change notification settings - Fork 20
feat(#249): Adds default geopoint question type #300
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
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
5b292dc
Adds demo xml form for geopoint
latin-panda 321d486
Adds watch for geolocation
latin-panda f919181
Adds buttons logic
latin-panda c94d612
Styles UI and DOM structure
latin-panda 1e08674
Node Definition for Geo types
latin-panda a10f171
Revert "Node Definition for Geo types"
latin-panda 889fe90
Fixes type check in webapp
latin-panda da8d36c
Fixes lint and type check in webapp
latin-panda 44655b6
Adds nodeOptions to access attributes
latin-panda b330e74
Adds parser functions for nodeOptions
latin-panda 03fba0d
Extract node option parsers to a file and test coverage
latin-panda f1446c1
Input node options is optional
latin-panda 362612f
Implement accuracy threshold logic in client vue component
latin-panda cd351bb
Fixes GitHub lint
latin-panda 1ea7869
Implements geolocation error case and improves quality assessment logic
latin-panda dca688a
Implements readonly
latin-panda 1b57c73
Implements saving when control leaves the viewport as the user scrolls
latin-panda 36ea1d1
Fixes vue component type check warning
latin-panda 05e12f4
Implements autosave when form submits for geopoint
latin-panda 001fdf8
Improving code style
latin-panda cf21460
Adding scenario tests for input type geopoint
latin-panda 059d4d4
Fixing title and icons
latin-panda 79a5432
codec
latin-panda c2dd023
Fixes codec to work with Note and Integrate codec to Geopoint Vue Com…
latin-panda 8fa68af
Refactored UI to match redesigned UI for geopoint
latin-panda b6e965c
Refactored Geopoint codec to support string in encode
latin-panda d54bb0a
Simplified decode and properly registered geopoint note
latin-panda c3d09fc
format
latin-panda 36c483d
Format constant for accuracy quality
latin-panda e97cb69
Fixes scenario's geopoint tests
latin-panda 443eb5c
Fixes type check in web forms package
latin-panda f907cc8
Fixes scenario smoke test
latin-panda 9bdff51
Tiny improvements in code
latin-panda eefb1e9
UIUX Feedback: fix margins and text indentation. Try again is hidden …
latin-panda c9ed78b
Codec feedback - minimum valuable solution
latin-panda a50983a
Codec feedback - extended solution with tuple type check
latin-panda aa8c1ab
Codec feedback - extended solution codec fix
latin-panda cecd173
Codec feedback - extended solution - geopoint class generates runtime…
latin-panda f18e875
Adding JSDoc and removing unnecessary symbol
latin-panda 1d9514c
Adding more scenario tests for geopoint codec
latin-panda c652c70
Feedback:
latin-panda 21f8964
Adds scenario tests for input as GeopointValue object
latin-panda 79b501f
Putting back the XML prolog
latin-panda d4e2066
Fixed bind type tests
latin-panda 790c325
Implements state machine in Web Form client
latin-panda 2714b21
Simplifying Geopoint tuple code and renaming NodeOptionsParser to Num…
latin-panda a0699d1
Moving code from Geopoint codec to Geopoint class
latin-panda 241db93
Validates null island case
latin-panda 1eca15a
Adds nodeOptions to base nodes
latin-panda 89255da
Adding changeset
latin-panda 37efc2f
Adding readonly nodeOptions null to node definitions
latin-panda 80e5251
Refactores geopoint state machine
latin-panda 62b4c6c
From Feedback: Truncating to max 3 decimals, space before meter unit
latin-panda bf60966
Resolves feedback: Refactors truncate function, rename number parser …
latin-panda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| '@getodk/xforms-engine': minor | ||
| '@getodk/web-forms': minor | ||
| '@getodk/scenario': minor | ||
| '@getodk/common': patch | ||
| --- | ||
|
|
||
| - Support for geopoint questions with no appearance | ||
| - Support for geopoint notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| <?xml version="1.0"?> | ||
| <h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
| xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
| xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
| xmlns:odk="http://www.opendatakit.org/xforms"> | ||
| <h:head> | ||
| <h:title>Geopoint</h:title> | ||
| <model odk:xforms-version="1.0.0"> | ||
| <itext> | ||
| <translation lang="English (en)"> | ||
| <text id="/data/intro:label"> | ||
| <value>The browser will display a permission prompt to allow or block location access. Click 'Allow' to enable location services. If dismissed, the prompt may not appear again unless permissions are reset in browser settings.</value> | ||
| </text> | ||
| <text id="/data/location_no_autosave:label"> | ||
| <value>Where are you filling out the survey?</value> | ||
| </text> | ||
| <text id="/data/location_with_big_threshold:label"> | ||
| <value>Where are you within the target area?</value> | ||
| </text> | ||
| <text id="/data/location_with_default_attributes:label"> | ||
| <value>Where are you within the default threshold area?</value> | ||
| </text> | ||
| <text id="/data/location_with_unacceptable_accuracy_only:label"> | ||
| <value>Try to provide a more specific location</value> | ||
| </text> | ||
| </translation> | ||
| <translation lang="French (fr)"> | ||
| <text id="/data/intro:label"> | ||
| <value>Le navigateur affichera une demande d'autorisation pour permettre ou bloquer l'accès à la localisation. Cliquez sur 'Autoriser' pour activer les services de localisation. Si vous ignorez la demande, elle pourrait ne plus réapparaître, sauf si vous réinitialisez les autorisations dans les paramètres du navigateur.</value> | ||
| </text> | ||
| <text id="/data/location_no_autosave:label"> | ||
| <value>Où remplissez-vous le sondage?</value> | ||
| </text> | ||
| <text id="/data/location_with_big_threshold:label"> | ||
| <value>Où êtes-vous dans la zone cible?</value> | ||
| </text> | ||
| <text id="/data/location_with_default_attributes:label"> | ||
| <value>Où êtes-vous dans la zone de seuil par défaut?</value> | ||
| </text> | ||
| <text id="/data/location_with_unacceptable_accuracy_only:label"> | ||
| <value>Essayez de fournir un emplacement plus précis</value> | ||
| </text> | ||
| </translation> | ||
| </itext> | ||
| <instance> | ||
| <data id="1_geopoint" version="2025020401"> | ||
| <intro/> | ||
| <location_no_autosave/> | ||
| <location_with_big_threshold/> | ||
| <location_with_default_attributes/> | ||
| <location_with_unacceptable_accuracy_only/> | ||
| <meta> | ||
| <instanceID/> | ||
| </meta> | ||
| </data> | ||
| </instance> | ||
| <bind nodeset="/data/intro" readonly="true()" type="string"/> | ||
| <bind nodeset="/data/location_no_autosave" type="geopoint"/> | ||
| <bind nodeset="/data/location_with_big_threshold" type="geopoint"/> | ||
| <bind nodeset="/data/location_with_default_attributes" type="geopoint" required="true()"/> | ||
| <bind nodeset="/data/location_with_unacceptable_accuracy_only" type="geopoint"/> | ||
| <bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/> | ||
| </model> | ||
| </h:head> | ||
| <h:body> | ||
| <input ref="/data/intro"> | ||
| <label ref="jr:itext('/data/intro:label')"/> | ||
| </input> | ||
| <input accuracyThreshold="0" ref="/data/location_no_autosave"> | ||
| <label ref="jr:itext('/data/location_no_autosave:label')"/> | ||
| <hint>(No autosave)</hint> | ||
| </input> | ||
| <input accuracyThreshold="100" unacceptableAccuracyThreshold="400" ref="/data/location_with_big_threshold"> | ||
| <label ref="jr:itext('/data/location_with_big_threshold:label')"/> | ||
| <hint>(Acceptable accuracy: 100m, unacceptable: 500m)</hint> | ||
| </input> | ||
| <input ref="/data/location_with_default_attributes"> | ||
| <label ref="jr:itext('/data/location_with_default_attributes:label')"/> | ||
| <hint>(Default acceptable accuracy: 5m, unacceptable: 100m)</hint> | ||
| </input> | ||
| <input unacceptableAccuracyThreshold="7" ref="/data/location_with_unacceptable_accuracy_only"> | ||
| <label ref="jr:itext('/data/location_with_unacceptable_accuracy_only:label')"/> | ||
| <hint>(Unacceptable accuracy: 7m)</hint> | ||
| </input> | ||
| </h:body> | ||
| </h:html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export type TimerID = ReturnType<typeof setTimeout>; | ||
| export type IntervalID = ReturnType<typeof setInterval>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.