Skip to content

Creating a fix so we show the StatusCard when the user can scale and the resource count is 0#16839

Merged
codyrancher merged 2 commits intorancher:masterfrom
codyrancher:zero-show
Mar 5, 2026
Merged

Creating a fix so we show the StatusCard when the user can scale and the resource count is 0#16839
codyrancher merged 2 commits intorancher:masterfrom
codyrancher:zero-show

Conversation

@codyrancher
Copy link
Copy Markdown
Member

@codyrancher codyrancher commented Mar 4, 2026

Summary

Addresses #14581 (comment)

Occurred changes and/or fixed issues

  • A new noResourcesMessage can now be configured for the card.
  • Fixed two color classes.

Technical notes summary

Areas or cases that should be tested

Areas which could experience regressions

  • See above

Screenshot/Video

image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

@codyrancher codyrancher marked this pull request as ready for review March 4, 2026 18:57
@codyrancher codyrancher requested a review from momesgin March 4, 2026 18:59
@momesgin momesgin requested a review from Copilot March 4, 2026 19:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes workload detail pages so the Pods StatusCard can still render when a scalable workload is scaled to 0 pods, and introduces a configurable empty-state message for the StatusCard.

Changes:

  • Adjusted Workload.podsCard to return a card when pods is an empty array (instead of returning null).
  • Added noResourcesMessage prop + empty-state rendering to the StatusCard component.
  • Updated muted text styling to use text-deemphasized and added an en-us translation string for the “no pods” message.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shell/models/workload.js Updates Pods card gating logic and passes a new empty-state message prop.
shell/models/__tests__/workload.test.ts Updates/extends unit tests for podsCard, including the “scaled to 0” case.
shell/components/Resource/Detail/ResourceRow.vue Switches muted text styling class to text-deemphasized.
shell/components/Resource/Detail/Card/StatusCard/index.vue Adds optional noResourcesMessage prop and renders an empty-state message when there are no rows.
shell/assets/translations/en-us.yaml Adds the podsCard.noPods translation string used for the empty-state message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codyrancher codyrancher merged commit 896c5fc into rancher:master Mar 5, 2026
38 checks passed
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.

3 participants