taiga-ui icon indicating copy to clipboard operation
taiga-ui copied to clipboard

feat(kit): highlight improvements

Open MillerSvt opened this issue 1 year ago • 12 comments

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Refactoring
  • [ ] Build or CI related changes
  • [ ] Tests related changes
  • [ ] Documentation content changes

What is the current behaviour?

  1. Not support for multiple occurrences
  2. Not support for multiple highlights
  3. Not support for case-sensitive mode
  4. Not support for regexp

Closes #5838

What is the new behaviour?

  1. Adding support for multiple occurrences
  2. Adding support for multiple highlights
  3. Adding support for case-sensitive mode
  4. Adding support for regexp

MillerSvt avatar Nov 03 '23 04:11 MillerSvt

Tests completed successfully :white_check_mark:

Good job :fire:

lumberjack-bot[bot] avatar Nov 03 '23 05:11 lumberjack-bot[bot]

Tests are running :rocket:

Wait for workflow run with tests to finish :coffee:

lumberjack-bot[bot] avatar Nov 03 '23 05:11 lumberjack-bot[bot]

BundleMon

Files updated (3)
Status Path Size Limits
:white_check_mark: demo/browser/main.(hash).js
298.67KB (+639B +0.21%) +10%
:white_check_mark: demo/browser/runtime.(hash).js
41.45KB (+156B +0.37%) +10%
:white_check_mark: demo/browser/styles.(hash).css
13.75KB (-137B -0.96%) +10%
Unchanged files (2)
Status Path Size Limits
:white_check_mark: demo/browser/vendor.(hash).js
206.9KB +10%
:white_check_mark: demo/browser/polyfills.(hash).js
11.21KB +10%

Total files change +658B +0.11%

Groups updated (1)
Status Path Size Limits
:white_check_mark: demo/browser/*..js
7.4MB (+28.65KB +0.38%) -

Final result: :white_check_mark:

View report in BundleMon website ➡️


Current branch size history | Target branch size history

bundlemon[bot] avatar Nov 03 '23 05:11 bundlemon[bot]

Visit the preview URL for this PR (updated for commit e289cd8):

https://taiga-ui--pr5841-task-5838-tv2q2kvu.web.app

(expires Thu, 06 Jun 2024 07:38:15 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4b5ece1e114386f6a105425ef799091475b249eb

github-actions[bot] avatar Nov 03 '23 05:11 github-actions[bot]

Codecov Report

Attention: Patch coverage is 92.92929% with 7 lines in your changes missing coverage. Please review.

Project coverage is 71.98%. Comparing base (43c0ebb) to head (30d1178). Report is 650 commits behind head on main.

:exclamation: Current head 30d1178 differs from pull request most recent head e289cd8

Please upload reports for the commit e289cd8 to get more accurate results.

Files Patch % Lines
...ts/kit/directives/highlight/highlight.directive.ts 93.33% 5 Missing :warning:
projects/cdk/utils/miscellaneous/to-array.ts 50.00% 1 Missing :warning:
projects/kit/pipes/to-regexp/to-regexp.pipe.ts 85.71% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5841      +/-   ##
==========================================
+ Coverage   70.19%   71.98%   +1.79%     
==========================================
  Files        1460     1467       +7     
  Lines       15934    16032      +98     
  Branches     2292     2276      -16     
==========================================
+ Hits        11185    11541     +356     
+ Misses       4369     4119     -250     
+ Partials      380      372       -8     
Flag Coverage Δ
addon-charts 71.10% <ø> (?)
addon-doc 59.66% <ø> (?)
addon-mobile 60.58% <ø> (?)
addon-table 60.75% <ø> (?)
addon-tablebars 90.90% <ø> (?)
cdk 78.65% <75.00%> (?)
core 77.99% <ø> (?)
kit 70.30% <93.68%> (?)
summary 71.98% <92.92%> (+1.79%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 03 '23 05:11 codecov[bot]

What about if search will be string[]?

splincode avatar Nov 03 '23 07:11 splincode

What about if search will be string[]?

This will work the same way as with regular expressions. Or do you mean that I didn't add a demo?

MillerSvt avatar Nov 03 '23 08:11 MillerSvt

Yes, you didn't add a demo

splincode avatar Nov 03 '23 08:11 splincode

Yes, you didn't add a demo

added

MillerSvt avatar Nov 03 '23 08:11 MillerSvt

@waterplea @nsbarsukov let's wait for our jedi to review

splincode avatar Nov 03 '23 11:11 splincode

I found some problems here:

  1. We can't highlight multiline occurrences correctly in this solution.
  2. We may get performance degradation when resize with large DOM tree.

I'll think about what we can do with it, and I'll see how these problems are solved in third-party libraries.

MillerSvt avatar Nov 09 '23 06:11 MillerSvt

I found some problems here

fixed, ready to review

MillerSvt avatar Apr 30 '24 11:04 MillerSvt