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
docs: add some lines of documentation to clear doubts #38
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.
Although it feels a little bit wordy, it will be a lot clearer for those not familiar with the ui design.
The way this PR defines X and Y is very unclear imo. Also, looking at the original issue, it would seem like the main difference between OPs perception of the x and y coordinate system and the actual tui implementation is only that the origin is in the top left instead of bottom left. |
Maybe just a note somewhere prominent that "The origin is in the upper left corner for all widgets"? |
I honestly feel like it's pretty common sense that the origin is in the top left corner in tui applications. It also feels weird to specify it in this small case where as I'm sure there's dozens if not hundreds of places we could specify this in this crate. |
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.
Added personal opinions.
/// The X Axis represents the count of columns of the Rect. | ||
/// | ||
/// The Y Axis represents the count of rows of the Rect. | ||
/// | ||
/// The Rect is always drawn from the top left to the bottom and to the right of the container. |
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 don't think these docs are needed since the fields are/will be already documented.
/// The X Axis represents the count of columns of the Line. | ||
/// | ||
/// The Y Axis represents the count of rows of the Line. | ||
/// |
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 should be above the respective fields.
/// The Line is always drawn from the top left to the bottom and to the right of the container. | ||
/// | ||
/// And when it is drawn, it will calculate the distance between the two points |
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 docs aren't necessary, since there's nothing unexpected here.
If I can get a couple upvotes on this message, I'll close this PR I think. We can take another look at it if someone requests it again. |
Alright, closing this then, if someone stumbles on this and disagrees / would like to discuss it further, feel free to open a discussion. |
Description
It is a PR just to resolve issue #352
Add a few lines to explain how to define the coordinates
Testing guidelines
Just test it using VS Code
Checklist