-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Improve query API docs #4989
Improve query API docs #4989
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the consistency this adds, and the language changes are good. There's a few things to clean up. Not sure if / how we can resolve the dev-dependency problem; I'd probably just revert that and merge it without links for now :(
I moved back the macro docs to the I also removed the |
Squashed because rebasing in multiple steps is a headache. I preserved co-authors in the commit message. |
Rebased. I also pushed new commits. The first of the new commits is 5b064a2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have time to look this over this morning, but I did a quick pass with the spell-checker.
Curious about the motivation behind
The general pattern in rust docs seems to be for the |
Ping @BoxyUwU for docs review following your |
Generally what happend in that PR is that all of the traits were merged into |
Co-authored-by: Boxy <supbscripter@gmail.com>
Thanks!! |
I split this into multiple PRs, since it's difficult to find people to review it. Hopefully they are more digestible. |
# Objective - Document `QueryCombinationIter` ## Solution - Describe the item, add usage and examples - Copy notes about the number of query items generated from the corresponding query methods (they will be removed in #5742 ([motivation])) ## Additional notes - Derived from #4989 [motivation]: #4989 (comment)
# Objective - Document `QueryCombinationIter` ## Solution - Describe the item, add usage and examples - Copy notes about the number of query items generated from the corresponding query methods (they will be removed in bevyengine#5742 ([motivation])) ## Additional notes - Derived from bevyengine#4989 [motivation]: bevyengine#4989 (comment)
# Objective - Update docs to `WorldQuery` ## Solution - See bevyengine#4989. This PR is derived from it, and limited to the `WorldQuery` item docs.
# Objective - Update `Query` docs with better terminology - add some performance remarks (Fixes bevyengine#4742) ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` struct docs.
# Objective - Increase consistency across documentation of `Query` methods. - Fixes bevyengine#5506 ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` methods' docs.
# Objective - Document `QueryCombinationIter` ## Solution - Describe the item, add usage and examples - Copy notes about the number of query items generated from the corresponding query methods (they will be removed in bevyengine#5742 ([motivation])) ## Additional notes - Derived from bevyengine#4989 [motivation]: bevyengine#4989 (comment)
# Objective - Update docs to `WorldQuery` ## Solution - See bevyengine#4989. This PR is derived from it, and limited to the `WorldQuery` item docs.
# Objective - Update `Query` docs with better terminology - add some performance remarks (Fixes bevyengine#4742) ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` struct docs.
# Objective - Increase consistency across documentation of `Query` methods. - Fixes bevyengine#5506 ## Solution - See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` methods' docs.
Objective
Query
docs need a refresh and they look quite inconsistent.WorldQuery
docs had some info about the derive macro that should not belong there.Solution
Documentation has been changed for the following items:
Query
(item level and methods)QueryCombinationIter
WorldQuery
traitWorldQuery
macroQuery
QueryCombinationIter
QueryCombinationIter
fromQuery
methods to the item itself.WorldQuery
traitWorldQuery
macroComponentA
,my_system
). Examples with concrete identifiers are used where appropriate.WorldQuery
macro.Additional notes
I had to addSolved.bevy_ecs
as a dev-dependency ofbevy_ecs_macros
to make doctests compile. Discussion on this is appreciated. I'm puttingS-Controversial
for now until a collective decision can be made.Query
andWorldQuery
macro idioms should be in the book, but in the meantime they can stay here.I don't know what the computational complexity forSolved.many_iter
andmany_for_each_mut
is, so I added a placeholder for now.#[world_query(ignore)]
feature, as it is no longer needed.cargo doc -p bevy_ecs --no-deps --open
).Todo list:
many_iter
andmany_for_each_mut
iter_many_mut
documentation is confused #5506