-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[CL-553] Migrate CL to Control Flow syntax #12390
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d95218f
Run ng generate @angular/core:control-flow
Hinton 19bd4b8
Fix errors
Hinton 3b5c5d9
Merge branch 'main' of github.com:bitwarden/clients into arch/controlโฆ
Hinton 30cd36b
Re-run migration. to clean up some imports and manually convert story.
Hinton b9aeae1
Fix build
Hinton f364f09
Fix tests
Hinton 41a09ae
Merge branch 'main' of github.com:bitwarden/clients into arch/controlโฆ
Hinton 1ecd73a
Fix nav group
Hinton c2373d1
Merge branch 'main' into arch/control-flow
Hinton 0cc2509
Merge branch 'main' of github.com:bitwarden/clients into arch/controlโฆ
Hinton e9e3b66
Merge branch 'main' of github.com:bitwarden/clients into arch/controlโฆ
Hinton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<div class="tw-inline-flex tw-flex-wrap tw-gap-2"> | ||
<ng-container *ngFor="let item of filteredItems; let last = last"> | ||
@for (item of filteredItems; track item; let last = $last) { | ||
<span bitBadge [variant]="variant" [truncate]="truncate"> | ||
{{ item }} | ||
</span> | ||
<span class="tw-sr-only" *ngIf="!last || isFiltered">, </span> | ||
</ng-container> | ||
<span *ngIf="isFiltered" bitBadge [variant]="variant"> | ||
{{ "plusNMore" | i18n: (items.length - filteredItems.length).toString() }} | ||
</span> | ||
@if (!last || isFiltered) { | ||
<span class="tw-sr-only">, </span> | ||
} | ||
} | ||
@if (isFiltered) { | ||
<span bitBadge [variant]="variant"> | ||
{{ "plusNMore" | i18n: (items.length - filteredItems.length).toString() }} | ||
</span> | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<ng-template> | ||
<i *ngIf="icon" class="bwi {{ icon }} !tw-mr-2" aria-hidden="true"></i><ng-content></ng-content> | ||
@if (icon) { | ||
<i class="bwi {{ icon }} !tw-mr-2" aria-hidden="true"></i> | ||
} | ||
<ng-content></ng-content> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool that the migrator could link this if/else even though we were not already using NgIf's else syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, I manually migrated this. The migrator doesn't work in storybook.