Skip to content

Document ascii_pre_colorized parameter for colorized table content#6224

Open
Copilot wants to merge 3 commits intomainfrom
copilot/document-colorized-table-requirements
Open

Document ascii_pre_colorized parameter for colorized table content#6224
Copilot wants to merge 3 commits intomainfrom
copilot/document-colorized-table-requirements

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Documentation Plan for Colorized Table Content

  • Understand the issue and existing implementation
    • Review Formatter class and ascii_pre_colorized parameter
    • Review php-cli-tools Table and Ascii classes
    • Review test examples in php-cli-tools
  • Enhance documentation in Formatter.php
    • Update display_items() docblock with detailed explanation
    • Update display_item() docblock with detailed explanation
    • Update format() docblock for consistency
    • Update show_multiple_fields() docblock for consistency
    • Update show_table() docblock for consistency
    • Add usage examples in the docblocks (both boolean and array cases)
  • Run tests to ensure no regressions
    • Run linting (composer lint) - passed
    • Run code style checks (composer phpcs) - passed
    • Run static analysis (composer phpstan) - passed
    • Run unit tests (composer phpunit) - existing failures unrelated to changes
  • Code review and final verification
    • Code review completed - no issues found
    • Security scan completed - no applicable code changes
  • Address feedback
    • Added array usage examples to both display_items() and display_item() methods

Summary

Successfully documented the requirements for displaying colorized table content in WP-CLI. Enhanced documentation now includes comprehensive examples for both the boolean true case (all columns colorized) and the array case (specific columns colorized), making it clear how to use the $ascii_pre_colorized parameter in different scenarios.

Original prompt

This section details on the original issue you should resolve

<issue_title>Document requirements for colorized table content</issue_title>
<issue_description>There's currently a caveat when displaying table content that was passed through WP_CLI::colorize() (see wp-cli/php-cli-tools#134).

This needs to be documented, as the use of the $ascii_pre_colorized argument in the WP_CLI\Formatter::display_items() method is not clear.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Document requirements for colorized table content Document ascii_pre_colorized parameter for colorized table content Feb 2, 2026
Copilot AI requested a review from swissspidy February 2, 2026 18:39
@codecov

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

This comment was marked as resolved.

@swissspidy swissspidy marked this pull request as ready for review February 3, 2026 14:36
@swissspidy swissspidy requested a review from a team as a code owner February 3, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document requirements for colorized table content

2 participants