Skip to content
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

Location Search and Subject Search inputs are not debounced #1215

Closed
2 of 4 tasks
himeshr opened this issue May 7, 2024 · 1 comment
Closed
2 of 4 tasks

Location Search and Subject Search inputs are not debounced #1215

himeshr opened this issue May 7, 2024 · 1 comment
Assignees

Comments

@himeshr
Copy link
Contributor

himeshr commented May 7, 2024

Describe the bug
In DEA, while searching for a Subject or, while create/editing an Individual, for LocationFormElements and SubjectFormElement, we do not debounce the input, and end up invoking a costly search api on the server.
This also leads to poor user experience. We should atleast mitigate server side impact.

To Reproduce
Steps to reproduce the behavior:

Case 1:

  1. Go to 'DataEntryApp'
  2. Click on 'Register for any SubjectType'
  3. Scroll down to 'Address' field
  4. Input search string for finding location
  5. Developers can check the console Network tab to see the large number of search API calls invoked for one field input for each keystroke

Case 2:
Similar behaviour while searching for Subject using SubjectFormElement.

Expected behavior
We debounce the search and select (location / Subject) calls in DEA.

Developer Checklist(Developer fixing the bug should fill this checklist)

  • Does the fix require extensive regression testing?
    • Yes
    • No
  • Are you mentioning the required scenarios that could be affected?
    • Yes
    • No

Impact Areas

  • DEA (Added Debounce and corrected value set using callback)
    • Subject Search Page - Filter by Location
    • Subject / Encounter / Enrolment / ProgEnc Create / Edit Form - Location select
    • Subject / Encounter / Enrolment / ProgEnc Create / Edit Form - Subject select
    • Household Group Membership Add / Edit - Member select
  • App Designer (Minor code clean-up, no change in functionality)
    • CreateEditFilters
    • CreateEditFiltersV2
    • DocumentationSearch
    • LocationSearch
    • CommonSearch
    • LocationTypeSearch
    • ConceptSearch
@himeshr
Copy link
Contributor Author

himeshr commented May 16, 2024

Impact Areas

DEA

  • Subject Search Page - Filter by Location
  • Subject / Encounter / Enrolment / ProgEnc Create / Edit Form - Location select
  • Subject / Encounter / Enrolment / ProgEnc Create / Edit Form - Subject select
  • Household Group Membership Add / Edit - Member select

App Designer

  • CreateEditFilters
  • CreateEditFiltersV2
  • DocumentationSearch
  • LocationSearch
  • CommonSearch
  • LocationTypeSearch
  • ConceptSearch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants