Skip to content

Conversation

@rak-phillip
Copy link
Member

@rak-phillip rak-phillip commented Dec 23, 2025

Summary

This resolves a console error by removing the bg- prefix from the state background.

Fixes #16267

Occurred changes and/or fixed issues

Remove bg- prefix from the state background

Technical notes summary

It appears that the stateBackground is prefixed with a bg-

get stateBackground() {
return this.stateColor.replace('text-', 'bg-');
}

While the status indicator expects no prefix:

export const StatusDefinitions = {
info: {
primary: '--rc-info',
secondary: '--rc-info-secondary'
},
success: {
primary: '--rc-success',
secondary: '--rc-success-secondary'
},
warning: {
primary: '--rc-warning',
secondary: '--rc-warning-secondary'
},
error: {
primary: '--rc-error',
secondary: '--rc-error-secondary'
},
unknown: {
primary: '--rc-unknown',
secondary: '--rc-unknown-secondary'
},
none: {
primary: '--rc-none',
secondary: '--rc-none-secondary'
},
};

Areas or cases that should be tested

See issue - there should be no error printed to the browser console when navigating to a deployment detail page. The status indicator should be correct.

Areas which could experience regressions

Any valid status that contains bg- will have the matching string stripped.

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

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.

Console Error: TypeError: can't access property "primary", statusColors.value is undefined

1 participant