-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
[WIP] feat: better borders in tabs/layout #239
Conversation
fcdfe3f
to
c091220
Compare
There are no issues in my testing, please open a new issue if you find some! |
Nice refactor, I adapted my config using this new layout and, so far, this works perfectly, thanks! Some thoughts about this subject:
|
I dont like it either and was planning on deprecating it altogether, but I kinda like both your suggestions. I will sit on this one for a bit.
The biggest issue I have here is that I would like to be able to have connected borders (for example if you create a grid layout with single inner borders, now there are gaps between them). There is an issue opened in ratatui for that to happen automagically ratatui/ratatui#1468 so I am sort of waiting for whats going to happen there, because I don't know how the different border styles will interact. But I definitely want to introduce border style config as well.
I swear I had it in there 😄, I will take a look Thanks for the suggestions as always! |
This PR deprecates the
border_type
property on tabs, it will be silently ignored. Instead you can now configure the borders per Pane/Split which allows you to replicate the former behavior while providing more control over them at the same time.The borders are specified as
borders: "<value>"
where value can beNONE
,ALL
,RIGHT
,LEFT
,TOP
,BOTTOM
, their combination, ie.borders: "RIGHT | LEFT"
or omitted altogether which impliesNONE
.Note that you now have to account for the borders if you use exact sizing of panes. For example if your
Header
is supposed to be 2 rows tall and has borders atTOP
andBOTTOM
you must set its size as4
as seen in the example below.Consider this layout:
Click to expand
Along with this tab definition:
Click to expand
Produces this result: