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

feat(kit): highlight improvements #5841

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

feat(kit): highlight improvements #5841

wants to merge 1 commit into from

Conversation

MillerSvt
Copy link
Collaborator

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • 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

Copy link

lumberjack-bot bot commented Nov 3, 2023

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

Copy link

lumberjack-bot bot commented Nov 3, 2023

Tests are running 🚀

Wait for workflow run with tests to finish ☕

Copy link

bundlemon bot commented Nov 3, 2023

BundleMon

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

Total files change +658B +0.11%

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

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Contributor

github-actions bot commented Nov 3, 2023

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

Copy link

codecov bot commented Nov 3, 2023

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.

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 ⚠️
projects/cdk/utils/miscellaneous/to-array.ts 50.00% 1 Missing ⚠️
projects/kit/pipes/to-regexp/to-regexp.pipe.ts 85.71% 1 Missing ⚠️
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%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@splincode
Copy link
Member

What about if search will be string[]?

@MillerSvt
Copy link
Collaborator Author

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?

@splincode
Copy link
Member

Yes, you didn't add a demo

@MillerSvt
Copy link
Collaborator Author

Yes, you didn't add a demo

added

@splincode
Copy link
Member

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

@MillerSvt MillerSvt force-pushed the task/5838 branch 2 times, most recently from 1c507d0 to e236141 Compare November 9, 2023 06:23
@MillerSvt
Copy link
Collaborator Author

MillerSvt commented Nov 9, 2023

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 MillerSvt marked this pull request as draft November 9, 2023 06:31
@splincode splincode force-pushed the task/5838 branch 2 times, most recently from e03c688 to 30d1178 Compare November 14, 2023 08:24
@MillerSvt
Copy link
Collaborator Author

I found some problems here

fixed, ready to review

@MillerSvt MillerSvt marked this pull request as ready for review April 30, 2024 11:32
@MillerSvt MillerSvt requested a review from mdlufy as a code owner April 30, 2024 11:32
@MillerSvt MillerSvt force-pushed the task/5838 branch 4 times, most recently from 4079e42 to 00d2333 Compare April 30, 2024 12:37
1. Adding support for multiple occurrences
2. Adding support for multiple highlights
3. Adding support for case-sensitive mode
4. Adding support for regexp
@splincode splincode closed this Sep 14, 2024
@splincode splincode deleted the task/5838 branch September 14, 2024 16:05
@waterplea waterplea restored the task/5838 branch September 15, 2024 08:56
@waterplea waterplea reopened this Sep 15, 2024
@@ -0,0 +1,5 @@
import type {TuiArrayOrValue} from '@taiga-ui/cdk/types';

export function tuiToArray<T>(value: TuiArrayOrValue<T>): readonly T[] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use coerceArray from angular/cdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

🚀 - Добавить поддержку searchWords, regex и сaseSensitive в TuiHighlight
3 participants