-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
feat(#9489): collect telemetry for offline freetext searching #9525
Open
m5r
wants to merge
39
commits into
master
Choose a base branch
from
9489-offline-search-telemetry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+448
−97
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
991b281
wip
m5r 77d84fd
remove unused code
m5r 95a8b77
collect telemetry for searches against the `contacts_by_freetext` view
m5r 5cc183f
change telemetry key
m5r 913b1fc
wip `reports_by_freetext`
m5r 0e2cafd
wip `contacts_by_type_freetext`
m5r b76d85e
cleanup `contacts_by_freetext` telemetry
m5r 5d21f72
collect telemetry for searches against the `reports_by_freetext` view
m5r 6b94414
fix `currentQuery` being always equal to `params.data.q` since they s…
m5r 843888c
`freetextRequest.key` never exists, I think we were looking for `free…
m5r de70aad
collect telemetry for searches against the `contacts_by_type_freetext…
m5r d7c322a
fix test
m5r bf001aa
e2e test for contact search telemetry
m5r b5e5ee4
e2e test for report search telemetry
m5r bffd0a0
e2e test for contact_by_type search telemetry
m5r abfd112
return early
m5r 5c241a7
extract `findMatchingProperties`
m5r cea6292
ok sonar.
m5r 5589861
is sonar happy with `contacts-content.component.ts`?
m5r 19712b6
is sonar happy with `reports-content.component.ts` too?
m5r a2d3fff
refactor 👍
m5r 31d5b6b
refactor extra `select2:select` event listener
m5r a5a3b98
don't bother looping over the doc fields when we have a `key:value` c…
m5r ab8d9e5
move `propertyPath` initialization
m5r b6e3b6b
revert db after telemetry test
m5r bca463f
use `void` keyword to mark promises as intentionally not awaited
m5r ef1918a
fix telemetry test
m5r 6cdb9cc
fix select2-search telemetry
m5r e59da86
remove `void` operator and add comment why we're not awaiting the pro…
m5r 4b59c92
handle select2search case where it calls `contacts_by_freetext`
m5r 156457a
`for..of` => `Promise.all`
m5r 06a86b5
unit test report search telemetry
m5r ab8bf82
unit test contact search telemetry
m5r 3ff8d1c
add e2e test for select2 without contact type
m5r 8bcd070
clean up e2e test
m5r 2e75674
wow is sonar finally happy with `void` here?
m5r 32ddecc
oops forgot some leftovers to clean up
m5r 857203f
clean up telemetry db before running our telemetry tests
m5r e795d34
clean up telemetry db after each telemetry tests
m5r 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 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 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
39 changes: 39 additions & 0 deletions
39
tests/e2e/default/telemetry/forms/select_contact_telemetry.xml
This file contains 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,39 @@ | ||
<?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"> | ||
<h:head> | ||
<h:title>Select contact by type and without type</h:title> | ||
<model> | ||
<itext> | ||
<translation lang="en"> | ||
<text id="/data/select_contact_by_type:label"> | ||
<value>Select the contact by type</value> | ||
</text> | ||
<text id="/data/select_contact_without_type:label"> | ||
<value>Select the contact without type</value> | ||
</text> | ||
</translation> | ||
</itext> | ||
<instance> | ||
<data id="select_contact_telemetry" prefix="J1!select_contact_telemetry!" delimiter="#" version="2024-10-30 16-00"> | ||
<select_contact_by_type/> | ||
<select_contact_without_type/> | ||
<meta tag="hidden"> | ||
<instanceID/> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/select_contact_by_type" type="db:person"/> | ||
<bind nodeset="/data/select_contactselect_contact_without_type"/> | ||
</model> | ||
</h:head> | ||
<h:body class="pages"> | ||
<group appearance="field-list" ref="/data"> | ||
<input appearance="select-contact" ref="/data/select_contact_by_type"> | ||
<label ref="jr:itext('/data/select_contact_by_type:label')"/> | ||
</input> | ||
<input appearance="select-contact" ref="/data/select_contact_without_type"> | ||
<label ref="jr:itext('/data/select_contact_without_type:label')"/> | ||
</input> | ||
</group> | ||
</h:body> | ||
</h:html> |
This file contains 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 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.
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 is a fix for
key:value
queries against the viewcontacts_by_type_freetext
. Without this, these queries would fail silently and the select2 input would show an infinite loader until a different query would return results. If this has never been noticed before I believe thekey:value
search feature isn't used very much...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.
🤯
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.
Thinking about this again, I feel like we really should include a unit test for this case (if possible).