Skip to content

refactor(*): switch to control flow blocks #14864

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

Merged
merged 67 commits into from
Feb 26, 2025
Merged

Conversation

damyanpetev
Copy link
Member

@damyanpetev damyanpetev commented Oct 2, 2024

Closes #15333

Some changes are manual since the migration didn't detect all uses. Also note that I've manually adjusted the default formatting the ng migration does (worse if it doesn't format), but that was far from error-free and I've corrected the more egregious mishaps or redundant changes. Not perfect yet and will be looking into a formatting tool to enforce since the default VS Code formatting doesn't handle these yet microsoft/vscode-html-languageservice#177.

Also there are an alarming number of warnings for the track handling that's migrated 1:1 from the old behavior, so there's extra reporting now and we should invest some time to track these down.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@damyanpetev damyanpetev marked this pull request as ready for review February 25, 2025 11:49
@damyanpetev damyanpetev requested a review from kdinev February 25, 2025 11:49
@ChronosSF ChronosSF self-requested a review February 25, 2025 16:13
ChronosSF
ChronosSF previously approved these changes Feb 25, 2025
@damyanpetev damyanpetev added the squash-merge Merge PR with "Squash and Merge" option label Feb 25, 2025
@ChronosSF ChronosSF merged commit a038a03 into master Feb 26, 2025
4 checks passed
@ChronosSF ChronosSF deleted the dpetev/control-flow branch February 26, 2025 07:46
@kdinev kdinev restored the dpetev/control-flow branch February 26, 2025 13:37
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

@@ -585,10 +584,12 @@ class ButtonGroupWithSelectedButtonComponent {
@Component({
template: `
<igx-buttongroup>
<button igxButton *ngFor="let item of items" [selected]="item.key === selectedValue">{{item.value}}</button>
@for (item of items; track item) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (item of items; track item) {
@for (item of items; track item.key) {

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

Successfully merging this pull request may close these issues.

Switch to control flow blocks
6 participants