Conversation
rodrigogiraoserrao
left a comment
There was a problem hiding this comment.
This is looking great to me. I didn't think of using the border edge styles as styles for the rule but that makes a lot of sense to me.
Feels like you are pretty much on the right track, yes.
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Sorry, I've now changed my mind on this! I realised many border styles don't actually make sense in this context (e.g., round, panel, tall, hkey), so I've reduced the rule styles accordingly. See updated screenshots above. |
|
Sorry @rodrigogiraoserrao a quick question: do I need to make the non-widget |
I'd say so, yes. |
|
Thanks for confirming. I've marked this as ready for review, but I appreciate there is a lot else happening in Textual at the moment! |
|
Haha, looks like I just mistimed merging main so I could update the changelog! Thanks Will. |
Description
Draft PR to add a
Rulewidget - closes #2982. This takes inspiration from the good work already done in #3060.As discussed in the linked issue, this adds a single
Rulewidget rather than separate widgets for horizontal and vertical orientations.@rodrigogiraoserrao This is still a work in progress, but I just wanted to double-check I was on the right track with this?
Especially with the differentline_stylesfor the rule where I'm directly using the existing border styles?Related Issue
Rulewidget #2982How Has This Been Tested?
TODO!Snapshot tests added for the horizontal and vertical rule examples. Also added tests that an invalid rule orientation or line style will raise an exception.Screenshots (if appropriate):
Horizontal rules:
Vertical rules:
Checklist: