Improve stacked table readability#8725
Conversation
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the readability of “stacked table” (grouped card) output in azd by making structural elements easier to visually parse and by styling URL-like values as links, aligning with the UX goals in #8668.
Changes:
- Render table header underlines, grouped card headers, and card borders using gray formatting.
- Prefix grouped card headers with the grouped column label (e.g.,
SOURCE: azd) to provide clearer context. - Style
LOCATIONvalues in extension/template source list output using the existing cyan “link” formatter, and add targeted formatter tests.
Show a summary per file
| File | Description |
|---|---|
cli/azd/pkg/output/pretty_table.go |
Applies gray styling to structural table/card elements and updates grouped header text to include the group label. |
cli/azd/pkg/output/pretty_table_test.go |
Updates existing grouping assertions and adds tests for labeled gray group headers and cyan link formatting. |
cli/azd/cmd/templates.go |
Styles template source LOCATION values with link/cyan formatting via a column transformer. |
cli/azd/cmd/extension.go |
Styles extension source LOCATION values with link/cyan formatting via a column transformer. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 4
Co-authored-by: Copilot <copilot@github.com>
📋 Milestone: June 2026This work is tracked for June 2026. The team will review it soon! |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
hemarina
left a comment
There was a problem hiding this comment.
Nice readability improvement. The stripTerminalEscapes extraction is a clean, behavior-preserving refactor, and the gray dividers plus labeled group headers match the intent in #8668. One minor observation below.
Low — Weakened card-body assertion
cli/azd/pkg/output/pretty_table_test.go:166
The check changed from require.NotContains(output, "SOURCE:") to require.NotContains(stripped, "\nSOURCE:"). The change is necessary now that the group header legitimately contains SOURCE:, but \nSOURCE: only catches a card-body field that begins at exact line start — it would miss a leak if card bodies were ever rendered with leading indentation. Acceptable as-is; just slightly less strict than before. Consider asserting against the specific card-body line format if you want to keep the guard tight.
Fixes #8668
Stacked table output for source and consent list commands lacked clear group context and used low-contrast styling for structural elements. Links also rendered like regular text, making URLs harder to scan.
Stacked table formatting
Link styling
LOCATIONvalues with link/cyan formatting for extension and template source lists.Coverage