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

Copy over docs for Condition trait from PR #10718 #10748

Merged
merged 2 commits into from Nov 27, 2023

Conversation

asuratos
Copy link
Contributor

Objective

Resolves #10743.

Solution

Copied over the documentation written by @stepancheng from PR #10718.

I left out the lines from the doctest where <()> is removed, as that seemed to be the part people couldn't decide on whether to keep or not.

Comment on lines 21 to 22
/// Type parameter in return type can be omitted by calling [`IntoSystem::into_system`],
/// but usually have to be specified when passing a condition to a function.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a button to suggest code edits.

Better replace "can be omitted" with something like "can be set to <()>".

/// ```
/// # use bevy_ecs::schedule::Condition;
/// # use bevy_ecs::system::IntoSystem;
/// fn not_condition<Marker>(a: impl Condition<Marker>) -> impl Condition {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we need <()> in Condition<()>.

@ItsDoot ItsDoot added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events labels Nov 26, 2023
@alice-i-cecile alice-i-cecile changed the title Copy over docs from PR #10718 Copy over docs for Condition trait from PR #10718 Nov 26, 2023
@asuratos
Copy link
Contributor Author

Thanks.

I noticed that the other examples have hidden code blocks for testing. Should this one have it as well?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Adding a test as part of this would be nice, but not required IMO.

@james7132 james7132 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 Nov 27, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 27, 2023
Merged via the queue into bevyengine:main with commit 1e21326 Nov 27, 2023
23 checks passed
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 C-Docs An addition or correction to our documentation 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.

Copy-and-paste draft documentation for the Condition trait
5 participants