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

fix: improve debounce implementation #1573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: improve debounce implementation #1573

wants to merge 1 commit into from

Conversation

knilink
Copy link
Contributor

@knilink knilink commented Mar 6, 2023

Description

improve debounce implementation

after the update, Search will only debounce entering action. hitting enter or clicking clear will trigger onSearch immediately.

also adding dev dep @testing-library/react-hooks

Does this PR introduce a breaking change?

  • Yes
  • No

Manual testing step?

Screenshots (if appropriate):

@knilink knilink force-pushed the fix-debounce branch 3 times, most recently from 5294ca4 to 83f239d Compare March 6, 2023 05:59
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #1573 (bcd81d4) into master (4709984) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1573   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           96        97    +1     
  Lines         1695      1731   +36     
  Branches       471       476    +5     
=========================================
+ Hits          1695      1731   +36     
Impacted Files Coverage Δ
src/components/HoverDropdownMenu/index.jsx 100.00% <100.00%> (ø)
src/components/Search/index.jsx 100.00% <100.00%> (ø)
src/hooks/useDebounce.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@knilink knilink force-pushed the fix-debounce branch 10 times, most recently from c19f1cf to db74289 Compare March 6, 2023 23:53
@knilink knilink requested a review from xiaofan2406 March 7, 2023 04:05
@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@knilink knilink removed the request for review from xiaofan2406 August 22, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant