Skip to content

feat(cli): preserve table column order - #16843

Merged
mtojek merged 8 commits into
mainfrom
16055-column-sorting
Mar 10, 2025
Merged

mtojek merged 8 commits into
mainfrom
16055-column-sorting

Conversation

@mtojek

@mtojek mtojek commented Mar 7, 2025 •

Copy link
Copy Markdown
Member

Fixes: #16055

This PR modifies table rendering code in CLI to preserve the same order of columns as selected with --column.

@mtojek mtojek self-assigned this Mar 7, 2025
@mtojek mtojek changed the title 16055 column sorting feat(cli): preserve table column order Mar 7, 2025
@mtojek
mtojek requested a review from mafredri March 7, 2025 13:35
@mtojek
mtojek marked this pull request as ready for review March 7, 2025 13:35

@mafredri mafredri 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.

Elegant solution ❤️, did not think it would be this easy, thanks!

Do we need an explicit test? We already have a bunch of golden files that implicitly test it though so I could go either way.

Comment thread cli/provisionerjobs.go Resolved
Comment thread cli/provisioners.go Resolved
mtojek and others added 3 commits March 10, 2025 12:25
Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Mathias Fredriksson <[email protected]>
@mtojek

mtojek commented Mar 10, 2025

Copy link
Copy Markdown
Member Author

Do we need an explicit test? We already have a bunch of golden files that implicitly test it though so I could go either way.

Looking at the number of golden files affected by changes introduced in this PR, I would say we're fine :)

@mtojek
mtojek force-pushed the 16055-column-sorting branch from c8c3f89 to b01c35f Compare March 10, 2025 12:13
@mtojek
mtojek enabled auto-merge (squash) March 10, 2025 12:15
@mtojek
mtojek merged commit 4b1da9b into main Mar 10, 2025
@mtojek
mtojek deleted the 16055-column-sorting branch March 10, 2025 12:28
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add column ordering support to cliui table

2 participants