Skip to content

Use $PSStyle.Formatting.FormatAccent for Format-List and $PSStyle.Formatting.TableHeader for Format-Table output - #14406

Merged
Ilya (iSazonov) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:meta-color
Jul 20, 2021
Merged

Ilya (iSazonov) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:meta-color

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Dec 12, 2020 •

Copy link
Copy Markdown
Member

PR Summary

Leverage experimental feature PSAnsiRendering to use $PSStyle.Formatting.FormatAccent for list property names (similar to coloring for Get-Error) and add $PSStyle.Formatting.TableHeader for custom coloring of table headers. Change is in ListWriter and TableWriter to add color.

Example (note that the blue with white is just an example of customization):

image

PR Context

Fix #14429

PR Checklist

@ghost ghost assigned Ilya (iSazonov) Dec 12, 2020
@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Remaining codefactor issues are existing issues

@powercode

Copy link
Copy Markdown
Collaborator

Should table headers merit their own color definition? Or is it just Accent?

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Staffan Gustafsson (@powercode) that's a good question. Created #14429 to discuss.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) marked this pull request as draft December 15, 2020 17:27
@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Dec 18, 2020
@ghost ghost added the Stale label Jan 2, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

@ghost ghost removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Jan 8, 2021
@SteveL-MSFT
Steve Lee (SteveL-MSFT) marked this pull request as ready for review January 8, 2021 01:35
@SteveL-MSFT Steve Lee (SteveL-MSFT) changed the title Use $PSStyle.Formatting.FormatAccent for table headers and list property names Use $PSStyle.Formatting.FormatAccent for Format-List and $PSStyle.Formatting.TableHeader for Format-Table output Jan 8, 2021
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jan 8, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Jan 15, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

CodeFactor issues are in the existing code and tests and are by-design or won't fix.

@ghost ghost removed the Review - Needed The PR is being reviewed label Jun 25, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Jul 9, 2021
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

much tidier

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) I believe this is ready to be merged and maybe we can get it in time for next preview

@ghost ghost removed the Review - Needed The PR is being reviewed label Jul 19, 2021
@iSazonov
Ilya (iSazonov) merged commit b5efe7b into PowerShell:master Jul 20, 2021
@iSazonov Ilya (iSazonov) added this to the 7.2.0-preview.8 milestone Jul 20, 2021
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the meta-color branch July 20, 2021 14:07
@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.8 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Colorize table and list headers

5 participants