-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Doc] Improve description of the pos parameter in gui #1904
Conversation
The current description of parameter pos in gui.text doesn't explicitly show it's intended value range. Same issue exists for other objects. I can make a through chk and update if you think the change is valuable. Thank you!
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.
Good idea! LGTM but I've several concerns:
- There're more than one place we have
pos
in GUI doc, will we modify them too? - Thank for clarifying
[0, 1]
, shall we also claim that X is from left to right and Y is from down to up?
So I'd suggest - instead of repeating ourselves by adding range [0,1]
to all pos
occasions, how about to add a brief introduction on what's the coordinate system Taichi GUI uses at the beginning of this doc, so that users will automatically know what the following pos
means?
docs/gui.rst
Outdated
@@ -202,7 +202,7 @@ Paint on a window | |||
|
|||
:parameter gui: (GUI) the window object | |||
:parameter content: (str) the text to draw | |||
:parameter pos: (tuple of 2) the top-left point position of the fonts / texts | |||
:parameter pos: (tuple of 2, range [0,1] ) the relative position of the top-left point of the fonts / texts |
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.
:parameter pos: (tuple of 2, range [0,1] ) the relative position of the top-left point of the fonts / texts | |
:parameter pos: (tuple of 2, range [0,1]) the relative position of the top-left point of the fonts / texts |
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 agree! I submitted a new commit with a brief introduction section. The explanation of pos goes into a Note section. Please review.
Codecov Report
@@ Coverage Diff @@
## master #1904 +/- ##
==========================================
+ Coverage 43.19% 44.14% +0.95%
==========================================
Files 44 44
Lines 6330 6121 -209
Branches 1092 1092
==========================================
- Hits 2734 2702 -32
+ Misses 3426 3250 -176
+ Partials 170 169 -1
Continue to review full report at Codecov.
|
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.
LGTMig + 2 nits :)
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.
Thanks for the PR, and welcome on board!
This mostly LGTM. I added some minor wording fixes. This PR can be merged if the suggestions are committed.
Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
The current description of parameter pos in gui.text doesn't explicitly show it's intended value range.
Same issue exists for other objects. I can make a through chk and update if you think the change is valuable.
Thank you!
Related issue = #
[Click here for the format server]