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

Remove Component derive for AlphaMode #8804

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

nicopap
Copy link
Contributor

@nicopap nicopap commented Jun 10, 2023

AlphaMode is not used as a component anywhere in the engine. It shouldn't implement Component. It might mislead users into thinking it has any effect as a component.


Changelog

  • Remove Component implementation for AlphaMode. It wasn't used by anything.

Migration Guide

AlphaMode is not a component anymore.

It wasn't used anywhere in the engine. If you were using it as a component for your own purposes, you should use a newtype instead, as follow:

#[derive(Component, Deref)]
struct MyAlphaMode(AlphaMode);

Then replace uses of AlphaMode with MyAlphaMode

- Query<&AlphaMode, …>,
+ Query<&MyAlphaMode, …>,

`AlphaMode` is not used as a component anywhere in the engine. It
shouldn't implement `Component`. It might mislead users into thinking it
has any effect as a component.
@nicopap nicopap added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide labels Jun 10, 2023
@nicopap nicopap added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 10, 2023
@mockersf mockersf added this pull request to the merge queue Jun 10, 2023
Merged via the queue into bevyengine:main with commit 0ed8b20 Jun 10, 2023
@nicopap nicopap deleted the alpha_mode_no_component branch August 30, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants