Skip to content

feat(utilities): enable auto width detection for rich renderables#858

Merged
AlessandroPomponio merged 1 commit into
mainfrom
ap_20260415_add_auto_width_to_render_to_string
Apr 15, 2026
Merged

feat(utilities): enable auto width detection for rich renderables#858
AlessandroPomponio merged 1 commit into
mainfrom
ap_20260415_add_auto_width_to_render_to_string

Conversation

@AlessandroPomponio
Copy link
Copy Markdown
Member

Summary

Enhanced the render_to_string utility function to support automatic width detection for renderables, preventing content truncation when rendering to files. This change simplifies the API by allowing the function to automatically use the renderable's width instead of requiring manual width specification.

Files Changed

📄 orchestrator/utilities/rich.py

Added an auto_width parameter to the render_to_string function. When enabled, the function automatically detects and uses the renderable's width attribute (if available), preventing content truncation. This parameter takes precedence over the manual width parameter. The implementation checks if the renderable has a width attribute and uses it when auto_width=True.

📄 tests/utilities/cli_rendering.py

Updated the render_ado_resources_to_cli_output function to use the new auto_width=True parameter instead of manually passing width=table.width. This simplifies the function call and demonstrates the intended usage of the new feature.

Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
@AlessandroPomponio AlessandroPomponio changed the title feat(core): enable auto width detection for rich renderables feat(utilities): enable auto width detection for rich renderables Apr 15, 2026
Copy link
Copy Markdown
Member

@christian-pinto christian-pinto left a comment

Choose a reason for hiding this comment

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

LGTM

@AlessandroPomponio AlessandroPomponio added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit 328f782 Apr 15, 2026
19 checks passed
@AlessandroPomponio AlessandroPomponio deleted the ap_20260415_add_auto_width_to_render_to_string branch April 15, 2026 14:23
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.

2 participants