glamour icon indicating copy to clipboard operation
glamour copied to clipboard

feat: render table with lipgloss

Open bashbunni opened this issue 10 months ago • 4 comments

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

bashbunni avatar Sep 27 '23 21:09 bashbunni

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.

bashbunni avatar Sep 28 '23 19:09 bashbunni

Going to work on margin support in another PR - the scope of this one is just table rendering

bashbunni avatar Sep 29 '23 23:09 bashbunni

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

bashbunni avatar Mar 28 '24 18:03 bashbunni

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?

gamebox avatar Apr 18 '24 15:04 gamebox