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

Parent -> ChildOf #17427

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Parent -> ChildOf #17427

merged 5 commits into from
Jan 20, 2025

Conversation

cart
Copy link
Member

@cart cart commented Jan 19, 2025

Fixes #17412

Objective

Parent uses the "has a X" naming convention. There is increasing sentiment that we should use the "is a X" naming convention for relationships (following #17398). This leaves Children as-is because there is prevailing sentiment that Children is clearer than ParentOf in many cases (especially when treating it like a collection).

This renames Parent to ChildOf.

This is just the implementation PR. To discuss the path forward, do so in #17412.

Migration Guide

  • The Parent component has been renamed to ChildOf.

@cart cart added the A-ECS Entities, components, systems, and events label Jan 19, 2025
@cart cart added this to the 0.16 milestone Jan 19, 2025
@alice-i-cecile alice-i-cecile added X-Controversial There is active debate or serious implications around merging this PR S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 19, 2025
@BenjaminBrienen BenjaminBrienen added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label Jan 19, 2025
@cart
Copy link
Member Author

cart commented Jan 20, 2025

I removed the Children -> ParentOf rename, following the discussion in #17412. I think this is good to merge now.

@cart cart changed the title Parent -> ChildOf, Children -> ParentOf Parent -> ChildOf Jan 20, 2025
@alice-i-cecile alice-i-cecile added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Jan 20, 2025
Copy link
Contributor

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

@alice-i-cecile alice-i-cecile added X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers and removed X-Controversial There is active debate or serious implications around merging this PR labels Jan 20, 2025
@alice-i-cecile
Copy link
Member

I like this: I think it's a good compromise and I appreciate that the two terms are related.

Copy link
Contributor

@Carter0 Carter0 left a comment

Choose a reason for hiding this comment

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

It seems our bikes have been successfully shed.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 20, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 20, 2025
Merged via the queue into bevyengine:main with commit ba5e71f Jan 20, 2025
31 checks passed
mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 4, 2025
Fixes bevyengine#17412

## Objective

`Parent` uses the "has a X" naming convention. There is increasing
sentiment that we should use the "is a X" naming convention for
relationships (following bevyengine#17398). This leaves `Children` as-is because
there is prevailing sentiment that `Children` is clearer than `ParentOf`
in many cases (especially when treating it like a collection).

This renames `Parent` to `ChildOf`.

This is just the implementation PR. To discuss the path forward, do so
in bevyengine#17412.

## Migration Guide

- The `Parent` component has been renamed to `ChildOf`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename Parent to ChildOf and Children to ParentOf
7 participants