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(cdk): implement tuiIsPresent pipe #3002

Merged
merged 3 commits into from
Nov 15, 2022

Conversation

theorlovsky
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows Conventional Commits
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring
  • Code style update
  • Build or CI related changes
  • Documentation content changes

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

@lumberjack-bot
Copy link

lumberjack-bot bot commented Nov 1, 2022

Pull request was closed ✔️

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

@bundlemon
Copy link

bundlemon bot commented Nov 1, 2022

BundleMon

Files updated (2)
Status Path Size Limits
demo/browser/main.(hash).js
323.53KB (+176B +0.05%) +10%
demo/browser/runtime.(hash).js
34.09KB (+66B +0.19%) +10%
Unchanged files (3)
Status Path Size Limits
demo/browser/vendor.(hash).js
205.38KB +10%
demo/browser/polyfills.(hash).js
19.92KB +10%
demo/browser/scripts.(hash).js
14.92KB +10%

Total files change +242B +0.04%

Groups updated (1)
Status Path Size Limits
demo/browser/*..js
2.18MB (+3.6KB +0.16%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Base: 61.88% // Head: 61.87% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (d888687) compared to base (d701407).
Patch coverage: 90.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3002      +/-   ##
==========================================
- Coverage   61.88%   61.87%   -0.02%     
==========================================
  Files        1483     1490       +7     
  Lines       17561    17602      +41     
  Branches     2395     2401       +6     
==========================================
+ Hits        10868    10891      +23     
- Misses       6253     6273      +20     
+ Partials      440      438       -2     
Flag Coverage Δ
addon-charts 72.48% <ø> (ø)
addon-doc 48.46% <ø> (ø)
addon-editor 51.42% <ø> (-0.17%) ⬇️
addon-mobile 62.31% <ø> (ø)
addon-table 64.06% <ø> (ø)
addon-tablebars 98.07% <ø> (ø)
cdk 40.37% <90.00%> (+0.11%) ⬆️
core 76.79% <ø> (ø)
kit 74.14% <ø> (+0.02%) ⬆️
summary 61.87% <90.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
projects/cdk/pipes/is-present/is-present.pipe.ts 75.00% <75.00%> (ø)
projects/cdk/pipes/index.ts 100.00% <100.00%> (ø)
projects/cdk/pipes/is-present/index.ts 100.00% <100.00%> (ø)
projects/cdk/pipes/is-present/is-present.module.ts 100.00% <100.00%> (ø)
...editor/components/edit-link/edit-link.component.ts 14.28% <0.00%> (-3.18%) ⬇️
projects/addon-editor/extensions/index.ts 100.00% <0.00%> (ø)
...rojects/addon-editor/components/edit-link/index.ts 100.00% <0.00%> (ø)
...on-editor/components/edit-link/edit-link.module.ts 100.00% <0.00%> (ø)
...ommerce/utils/create-auto-corrected-expire-pipe.ts 59.09% <0.00%> (ø)
...ult-editor-extensions/default-editor-extensions.ts 100.00% <0.00%> (ø)
... and 7 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@theorlovsky theorlovsky requested review from splincode and removed request for MarsiBarsi, waterplea, nsbarsukov and vladimirpotekhin November 4, 2022 11:03
@splincode
Copy link
Member

@waterplea
Copy link
Collaborator

I think a nice example would be something like:

<div *ngIf="count$ | async | tuiIsPresent as value">

showing how this can be used for falsy values like 0, but not for null while stream has not returned any value.

}

private objectifyValue(value: string): string | null | undefined {
if (value === `null`) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Looks like a job for switch :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you want to keep this example or completely replace it with the one above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went ahead and replaced it since the new example is more useful 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@waterplea please check if it's not too complicated

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks great. Thank you!

@splincode splincode merged commit db4a29b into taiga-family:main Nov 15, 2022
@well-done-bot
Copy link

well-done-bot bot commented Nov 15, 2022

'Well done'

splincode pushed a commit that referenced this pull request Nov 15, 2022
oknimot pushed a commit to oknimot/taiga-ui that referenced this pull request Nov 23, 2022
ddubrava pushed a commit that referenced this pull request Mar 25, 2023
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.

3 participants