Skip to content

feat: add alternate row style for table - #667

Merged
MarvinJWendt merged 3 commits into
pterm:masterfrom
PaulPowershell:add-AlternateStyle-for-grid
Aug 12, 2024
Merged

MarvinJWendt merged 3 commits into
pterm:masterfrom
PaulPowershell:add-AlternateStyle-for-grid

Conversation

@PaulPowershell

@PaulPowershell PaulPowershell commented Jul 25, 2024 •

Copy link
Copy Markdown
Contributor

Description

Add colored rows intermittently in tables with .WithAlternateRowStyle(pterm.NewStyle(pterm.BgDarkGray))

Scope

table/alternate-row-style

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Related Issue

Fixes #666

To-Do Checklist

  • tested my changes
  • have commented every method that I created/changed
  • updated the examples to fit with my changes
  • have added tests for my newly created methods

It's my first PR here, i don't know if i made all things correctly

@MarvinJWendt

Copy link
Copy Markdown
Member

Thanks for the PR!
Also thanks for fixing the linting, even tho the warnings were out of scope of your feature 💙

@MarvinJWendt MarvinJWendt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing 🚀

@MarvinJWendt
MarvinJWendt merged commit c012949 into pterm:master Aug 12, 2024
@MarvinJWendt MarvinJWendt changed the title Add alternate style for table feat: add alternate row style for table Aug 12, 2024
@github-actions github-actions Bot added feature and removed feature labels Aug 12, 2024
@PaulPowershell
PaulPowershell deleted the add-AlternateStyle-for-grid branch August 13, 2024 08:56
@PaulPowershell

PaulPowershell commented Aug 13, 2024 •

Copy link
Copy Markdown
Contributor Author

@MarvinJWendt i don't know if its in relation with my modifications or not but table in example have problems but not all, i havec check again all format table in local and it's ok, so i don't know..
https://github.com/pterm/pterm/tree/master/_examples/table

i think its appear when \n is used in table, like this :
{"Paul\n\nNewline", "Dean", "[email protected]"},

@MarvinJWendt

Copy link
Copy Markdown
Member

I will look into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add colored rows intermittently in tables

2 participants