Skip to content

refactor(angular): Remove redundant children normalization#1447

Open
josemontespg wants to merge 7 commits into
google:mainfrom
josemontespg:remove-children-normalization
Open

refactor(angular): Remove redundant children normalization#1447
josemontespg wants to merge 7 commits into
google:mainfrom
josemontespg:remove-children-normalization

Conversation

@josemontespg
Copy link
Copy Markdown
Collaborator

refactor(angular): Remove redundant children normalization

This PR removes the redundant normalizedChildren computed property in RowComponent and ColumnComponent in the Angular renderer.

Reasoning

With better typing for children (via ChildListSchema and ComponentBinder), this.props()['children'].value() already returns an array of Child objects (which have id and basePath).
The normalization in RowComponent and ColumnComponent was repeating what ComponentBinder already does.

Changes

  • Removed normalizedChildren, isRepeating, templateId, and getNormalizedPath from RowComponent and ColumnComponent.
  • Simplified templates to use children() directly.

This cleanup simplifies the code and avoids manual path manipulation in favor of the framework's path resolution.

TAG=agy
CONV=ae89267a-2379-4900-b1b3-53c073042795

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the ColumnComponent and RowComponent in the Angular renderer, simplifying their templates and removing logic related to child normalization and repeating templates. Feedback indicates that tracking by child.id in the @for loops may cause rendering issues due to non-unique IDs, suggesting child.basePath as a more robust alternative. Furthermore, the package-lock.json file includes extensive unrelated changes and noise that should be addressed or reverted to maintain a clean history and prevent unintended dependency updates.

Comment thread renderers/angular/src/v0_9/catalog/basic/column.component.ts Outdated
Comment thread renderers/angular/src/v0_9/catalog/basic/row.component.ts Outdated
Comment thread renderers/angular/package-lock.json Outdated
@josemontespg josemontespg marked this pull request as ready for review May 15, 2026 23:04
@josemontespg josemontespg enabled auto-merge (squash) May 15, 2026 23:05
@josemontespg josemontespg requested a review from ditman May 15, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant