-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
feat(block): support placing the title on bottom #36
Conversation
@rabirabirara The test you added seems to be failing. |
I have a fix for the tests added, appears the expected behaviors were incorrectly input. Added a pull request for the branch here so this can be merged: #88 |
Merged #88 into this branch, however, note that since it's a new feature, it's still out of scope for the initial release. |
9f8333a
to
240738b
Compare
Seems like a small useful feature, I'm in favor of adding it in. Thoughts @sayanarijit @orhun ? |
Yup, I agree. (approved) |
Thank you for implementing this feature! (Am author of fdehau/tui-rs#625) |
Description
Before you could only put the title on the top row of a block. Now you can put it on the bottom row! Revolutionary.
In the future, implementing an option for both a bottom and top title is possible, but seems unnecessary considering you could just manually have a
Layout
and do the work yourself at that point, and having support for title wizardry seems pointless. The farthest you could go is having an option to actually move the title everywhere; it's an easy extension and seems like something that would normally be built-in. Hence here it is; you can do top and bottom, left right and center.Testing guidelines
When creating a
Block
with, say,Block::default().title()
, slap on a.title_on_bottom()
. Checktests/widget_block.rs
for the tests, which are just a copy of the alignment tests.Checklist