RedHatInsights / insights-chrome

Chroming for Insights apps
MIT License
27 stars 130 forks source link

Reduce amount of search highlighting #2907

Closed randomnetcat closed 1 month ago

randomnetcat commented 1 month ago

This should fix the issues with apparently-random characters being highlighted, as described in RHCLOUD-33948.

Hyperkid123 commented 1 month ago

This one was used before but it has the opposite problem, Sometimes it just does not highlight exact matches at all.

randomnetcat commented 1 month ago

Lovely. I've reverted back to Levenshetin search, fixed a bug in the highlighting code that offset the highlighted portion from where it should be, and also made it only show the lowest-distance matches.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 11.11111% with 48 lines in your changes missing coverage. Please review.

Project coverage is 47.42%. Comparing base (a545c27) to head (d62c37b). Report is 17 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907/graphs/tree.svg?width=650&height=150&src=pr&token=GuRwyW1uUf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) ```diff @@ Coverage Diff @@ ## master #2907 +/- ## =========================================== - Coverage 63.48% 47.42% -16.07% =========================================== Files 203 107 -96 Lines 4710 2598 -2112 Branches 876 469 -407 =========================================== - Hits 2990 1232 -1758 + Misses 1673 955 -718 - Partials 47 411 +364 ``` | [Files](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) | Coverage Δ | | |---|---|---| | [src/utils/levenshtein-search.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907?src=pr&el=tree&filepath=src%2Futils%2Flevenshtein-search.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3V0aWxzL2xldmVuc2h0ZWluLXNlYXJjaC50cw==) | `0.70% <5.00%> (-23.35%)` | :arrow_down: | | [src/utils/localSearch.ts](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907?src=pr&el=tree&filepath=src%2Futils%2FlocalSearch.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#diff-c3JjL3V0aWxzL2xvY2FsU2VhcmNoLnRz) | `13.51% <14.70%> (-7.39%)` | :arrow_down: | ... and [175 files with indirect coverage changes](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2907/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)
randomnetcat commented 1 month ago

Fixed, sorry.