Skip to content

Add semantic status parameters to ServerStatusSquareWidget and CircleCIBuildStatusWidget#271

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/review-issues-and-implement-improvements
Draft

Add semantic status parameters to ServerStatusSquareWidget and CircleCIBuildStatusWidget#271
Copilot wants to merge 2 commits intomainfrom
copilot/review-issues-and-implement-improvements

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 14, 2026

Both widgets required callers to manually specify hex BackgroundColor to convey status — losing the semantic intent and duplicating magic strings across usages.

Changes

ServerStatusSquareWidget — new Result parameter

  • bool? Result: true → green (#96BF48), false → red (#BF4848)
  • Explicit BackgroundColor still takes precedence
<ServerStatusSquareWidget Title="API Gateway" Result="true" />
<ServerStatusSquareWidget Title="Auth Service" Result="false" />

CircleCIBuildStatusWidget — new WidgetClass parameter

  • Added CircleCIWidgetClass enum: Failed / Pending / Passed
  • Maps to the background colors already defined in the existing CSS (.widget-circle-ci.failed, etc.)
  • Explicit BackgroundColor still takes precedence
<CircleCIBuildStatusWidget Title="Payment Service" State="FAILED" WidgetClass="@CircleCIWidgetClass.Failed" />

ListWidget — nullable fix

  • Replaced direct iteration over Items with Items ?? Enumerable.Empty<...>() to eliminate CS8602 warnings

Tests & stories updated

  • New test cases cover status→color mapping and BackgroundColor override precedence
  • Stories updated to use the new parameters in place of raw hex values

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

… to CircleCIBuildStatusWidget; fix ListWidget nullable warning

Co-authored-by: AlexHedley <1573469+AlexHedley@users.noreply.github.com>
Copilot AI changed the title [WIP] Review issues and implement missing functionality Add semantic status parameters to ServerStatusSquareWidget and CircleCIBuildStatusWidget Mar 14, 2026
Copilot AI requested a review from AlexHedley March 14, 2026 18:20
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