-
-
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] - Document Size
and UiRect
#5381
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.
These are excellent. Ping @Weibye @TimJentzsch for a review or two :)
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.
In general I really like the docs!
Some things I'd like to discuss:
- For some examples, all the values for left, right, top and bottom are mentioned again at the text, even though they are already specified clearly in the code. I'm wondering if that is necessary, i.e. if it adds additional value. If not I'd prefer to leave it out in favor of shorter docs. I'd ve curious to hear @alice-i-cecile's and @Weibye's opinion on this.
- All of the examples are with pixel units, it might make sense to also include some with percentages (or other units if we have more), to demonstrate that this is possible.
I think we should cut this. It's a bit more verbose, but the critical thing is that this is duplication that isn't automatically checked for us by the compiler, and risks getting desynced.
Firmly agree. |
Removed!
I changed some of the |
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.
bors r+
# Objective - Migrate changes from #3503. ## Solution - Document `Size` and `UiRect`. - I also removed the type alias from the `size_ops` test since it's unnecessary. ## Follow Up After this change is merged I'd follow up with removing the generics from `Size` and `UiRect` since `Val` should be extensible enough. This was also discussed and decided on in #3503. let me know if this is not needed or wanted anymore!
Pull request successfully merged into main. Build succeeded: |
Size
and UiRect
Size
and UiRect
# Objective - Migrate changes from bevyengine#3503. ## Solution - Document `Size` and `UiRect`. - I also removed the type alias from the `size_ops` test since it's unnecessary. ## Follow Up After this change is merged I'd follow up with removing the generics from `Size` and `UiRect` since `Val` should be extensible enough. This was also discussed and decided on in bevyengine#3503. let me know if this is not needed or wanted anymore!
# Objective - Migrate changes from bevyengine#3503. ## Solution - Document `Size` and `UiRect`. - I also removed the type alias from the `size_ops` test since it's unnecessary. ## Follow Up After this change is merged I'd follow up with removing the generics from `Size` and `UiRect` since `Val` should be extensible enough. This was also discussed and decided on in bevyengine#3503. let me know if this is not needed or wanted anymore!
# Objective - Migrate changes from bevyengine#3503. ## Solution - Document `Size` and `UiRect`. - I also removed the type alias from the `size_ops` test since it's unnecessary. ## Follow Up After this change is merged I'd follow up with removing the generics from `Size` and `UiRect` since `Val` should be extensible enough. This was also discussed and decided on in bevyengine#3503. let me know if this is not needed or wanted anymore!
Objective
Solution
Size
andUiRect
.size_ops
test since it's unnecessary.Follow Up
After this change is merged I'd follow up with removing the generics from
Size
andUiRect
sinceVal
should be extensible enough. This was also discussed and decided on in #3503. let me know if this is not needed or wanted anymore!