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

Add debouncing for all new API's #9660

Open
i0am0arunava opened this issue Jan 2, 2025 · 10 comments · May be fixed by #9801
Open

Add debouncing for all new API's #9660

i0am0arunava opened this issue Jan 2, 2025 · 10 comments · May be fixed by #9801
Assignees
Labels
needs-triage question Further information is requested work-in-progress

Comments

@i0am0arunava
Copy link
Contributor

i0am0arunava commented Jan 2, 2025

Describe the bug
Debouncing is not added in organization and facilities search field. On every key stroke network call is made, that's not expected

To Reproduce
Steps to reproduce the behavior:

  1. Go to organization or facility page
  2. open network tab
  3. search anything
  4. notice On every key stroke a network call is made

Expected behavior
Network calls should be debounced so that they are made only after the user has stopped typing for a short period, reducing unnecessary calls and improving performance.

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@i0am0arunava
Copy link
Contributor Author

can anyone assign this to me ?

@github-actions github-actions bot added needs-triage question Further information is requested labels Jan 2, 2025
@bodhish
Copy link
Member

bodhish commented Jan 2, 2025

Add debouncing for all new API's

@bodhish bodhish changed the title Missing Debouncing in organization and facilities search field Add debouncing for all new API's Jan 2, 2025
@bodhish
Copy link
Member

bodhish commented Jan 2, 2025

Create a list of all API's before working on it.

@bodhish
Copy link
Member

bodhish commented Jan 2, 2025

For each route explain why we need debouncing

@i0am0arunava
Copy link
Contributor Author

i0am0arunava commented Jan 3, 2025

For each route explain why we need debouncing

No need to add denouncing for all new APIs, I want to add denouncing for the two
Organization searchfield and facility search field , because On every key stroke network call is made, that's not expected so Network calls should be debounced so that they are made only after the user has stopped typing for a short period, reducing unnecessary calls and improving performance.I mentioned above ,for 6 and 10 denouncing will be added

@i0am0arunava
Copy link
Contributor Author

i0am0arunava commented Jan 3, 2025

For each route explain why we need debouncing

No need to add denouncing for all new APIs, I want to add denouncing for the two Organization searchfield and facility search field , because On every key stroke network call is made, that's not expected so Network calls should be debounced so that they are made only after the user has stopped typing for a short period, reducing unnecessary calls and improving performance.I mentioned above ,for 6 and 10 denouncing will be added

@bodhish ,can I start work on this

@rithviknishad
Copy link
Member

there are more things that needs to be debounced. please find more usages and list them.

@i0am0arunava
Copy link
Contributor Author

i0am0arunava commented Jan 3, 2025

there are more things that needs to be debounced. please find more usages and list them.

@rithviknishad @bodhish, I found these three cases where debouncing is needed, particularly in the search bar component on each keystroke. If you know of any other APIs that need debouncing, please help

  1. https://care-api.do.ohc.network/api/v1/organization/?parent= &offset= &limit=
  2. https://care-api.do.ohc.network/api/v1/facility/?page= &limit= &offset= &geo_organization=
  3. https://care-api.do.ohc.network/api/v1/facility/fb8044e2-bc37-4402-b044-8e8ef4581135/organizations/?parent=e833aea2-
    367f-462c-9170-961ba92cedfc&offset=0&limit=12&name=bb

@i0am0arunava
Copy link
Contributor Author

there are more things that needs to be debounced. please find more usages and list them.

@rithviknishad @bodhish, I found these three cases where debouncing is needed, particularly in the search bar component on each keystroke. If you know of any other APIs that need debouncing, please help

  1. https://care-api.do.ohc.network/api/v1/organization/?parent= &offset= &limit=
  2. https://care-api.do.ohc.network/api/v1/facility/?page= &limit= &offset= &geo_organization=
  3. https://care-api.do.ohc.network/api/v1/facility/fb8044e2-bc37-4402-b044-8e8ef4581135/organizations/?parent=e833aea2-
    367f-462c-9170-961ba92cedfc&offset=0&limit=12&name=bb

@rithviknishad can you help ,I found these 3 only ..?

@i0am0arunava i0am0arunava linked a pull request Jan 6, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage question Further information is requested work-in-progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants