glamour
glamour copied to clipboard
feat: render table with lipgloss
This is still a wip, but making a draft PR so it's easier to get feedback and help debugging along the way.
It seems to spit out the right table most of the time, but I'd still like to...
- [x] remove
StyleWriter
dep in table - [ ] fix failing test (or understand why it's failing)
ansi/TestRendererIssues/46_2
- [x] apply styling to cells and rows
- [ ] add margin support
I still don't know why the one test is failing, but I've added a basic padded cell style and support text styling for the cells. I wonder if using renderText for styling the text is the best call. It might end up making more sense to have the styling separate from writing so it's easier to amend styles throughout the program.
Going to work on margin support in another PR - the scope of this one is just table rendering
I believe this is using the Lip Gloss table in its pre-release state, so will need to tidy this up a bit before she's ready 2 rock
Maybe before it's considered perfect you could release this as a TermRendererOption (WithLipglossTableRenderer)? And then when you are satisfied, you can deprecate that option and noop it?