components icon indicating copy to clipboard operation
components copied to clipboard

Make autosuggest trigger and options list less coupled

Open pan-kot opened this issue 2 years ago • 1 comments

Description

The autosuggest component is used internally by the property filter where the coming use case requires the autosuggest to be better abstract allowing for any content in the dropdown. The PR factors out a new internal element - autosuggest options list to reduce coupling between the internal input and list-options elements.

How has this been tested?

Existing tests were updated to account for structural changes.

New tests added to cover the tab traps for recovery link.

Documentation changes

[Do the changes include any API documentation changes?]

  • [ ] Yes, this change contains documentation changes.
  • [x] No.

Related Links

[Attach any related links/pull request for this change]

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • [ ] Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • [ ] Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • [ ] Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • [ ] Changes are covered with new/existing unit tests?
  • [ ] Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

pan-kot avatar Aug 03 '22 10:08 pan-kot

Codecov Report

Merging #114 (b73b650) into main (39d3fc1) will increase coverage by 0.01%. The diff coverage is 97.26%.

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   92.38%   92.39%   +0.01%     
==========================================
  Files         535      536       +1     
  Lines       15462    15486      +24     
  Branches     4254     4256       +2     
==========================================
+ Hits        14284    14308      +24     
- Misses       1095     1096       +1     
+ Partials       83       82       -1     
Impacted Files Coverage Δ
src/autosuggest/virtual-list.tsx 90.90% <94.11%> (+3.03%) :arrow_up:
src/autosuggest/options-list.tsx 97.14% <97.14%> (ø)
src/autosuggest/internal.tsx 93.45% <100.00%> (-0.61%) :arrow_down:
src/autosuggest/plain-list.tsx 100.00% <100.00%> (ø)
src/date-picker/calendar/index.tsx 100.00% <0.00%> (ø)
src/date-picker/use-date-picker.tsx 95.23% <0.00%> (ø)
src/date-picker/index.tsx 98.76% <0.00%> (+0.93%) :arrow_up:

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

codecov-commenter avatar Aug 03 '22 10:08 codecov-commenter