-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Added example of entity sorting by components #1817
Conversation
Since there were large changes and the original code doesn't exist anymore, where should I put the example? |
I would include this example as part of docs on |
I think including a complicated sort in the query iter doc comments is a bit distracting. It forces users to mentally break down what the sort is doing, which feels pretty tangential to the goal of teaching them how to query for something. Imo using |
Or alternatively simplify the sort by only sorting a single item, not using reverse, and using |
ea45962
to
3b8f10a
Compare
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
06ae11e
to
4a9d89b
Compare
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 like the for loop example a lot! That's very clear for beginners
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
bors r+ |
We discussed with @alice-i-cecile privately on iterators and agreed that making a custom ordered iterator over query makes no sense since materialization is required anyway and it's better to reuse existing components or code. Therefore, just adding an example to the documentation as requested. Fixes #1470. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Pull request successfully merged into main. Build succeeded: |
We discussed with @alice-i-cecile privately on iterators and agreed that making a custom ordered iterator over query makes no sense since materialization is required anyway and it's better to reuse existing components or code. Therefore, just adding an example to the documentation as requested. Fixes bevyengine#1470. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
We discussed with @alice-i-cecile privately on iterators and agreed that making a custom ordered iterator over query makes no sense since materialization is required anyway and it's better to reuse existing components or code. Therefore, just adding an example to the documentation as requested.
Fixes #1470.