Skip to content

fix(lightspeed): delete-button-bg-color#3324

Closed
rohitratannagar wants to merge 1 commit into
redhat-developer:mainfrom
rohitratannagar:fix/lightspeed-notebook-delete-button
Closed

fix(lightspeed): delete-button-bg-color#3324
rohitratannagar wants to merge 1 commit into
redhat-developer:mainfrom
rohitratannagar:fix/lightspeed-notebook-delete-button

Conversation

@rohitratannagar

Copy link
Copy Markdown
Contributor

Summary

  • Fixed delete button background color in DeleteNotebookModal and DeleteDocumentModal to use
    theme-aware error colors instead of relying on MUI's color="error" prop
  • The RHDH theme (@red-hat-developer-hub/backstage-plugin-theme) does not define palette.error,
    so color="error" falls back to MUI's default (#d32f2f) which differs from the expected RHDH
    error color (#b1380b)
  • Buttons now explicitly use theme.palette.error?.main || '#b1380b' with a fallback, ensuring
    correct appearance in both RHDH and the dev workspace

Why

The RHDH theme currently does not define the following error palette colors:

  • palette.error.main
  • palette.error.dark
  • palette.error.contrastText

These need to be defined in the RHDH theme (@red-hat-developer-hub/backstage-plugin-theme) so
that any component using color="error" or theme.palette.error gets the correct RHDH-branded
colors instead of MUI defaults. The expected values are:

  • palette.error.main: #b1380b
  • palette.error.dark: #731f00
  • palette.error.contrastText: #fff

Once the RHDH theme defines these, the hardcoded fallbacks in this PR become redundant safety
nets.

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Jun 8, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-lightspeed workspaces/lightspeed/plugins/lightspeed patch v2.9.0

@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.91%. Comparing base (201cdbe) to head (6dc2886).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3324      +/-   ##
==========================================
- Coverage   53.92%   53.91%   -0.01%     
==========================================
  Files        2379     2379              
  Lines       86125    86132       +7     
  Branches    23913    23922       +9     
==========================================
- Hits        46441    46440       -1     
- Misses      39383    39391       +8     
  Partials      301      301              
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 201cdbe
ai-integrations 70.03% <ø> (ø) Carriedforward from 201cdbe
app-defaults 69.60% <ø> (ø) Carriedforward from 201cdbe
augment 46.39% <ø> (ø) Carriedforward from 201cdbe
bulk-import 72.86% <ø> (ø) Carriedforward from 201cdbe
cost-management 16.49% <ø> (ø) Carriedforward from 201cdbe
dcm 59.64% <ø> (ø) Carriedforward from 201cdbe
extensions 61.79% <ø> (ø) Carriedforward from 201cdbe
global-floating-action-button 74.30% <ø> (ø) Carriedforward from 201cdbe
global-header 61.63% <ø> (ø) Carriedforward from 201cdbe
homepage 51.52% <ø> (ø) Carriedforward from 201cdbe
konflux 91.01% <ø> (ø) Carriedforward from 201cdbe
lightspeed 68.40% <0.00%> (-0.11%) ⬇️
mcp-integrations 85.46% <ø> (ø) Carriedforward from 201cdbe
orchestrator 37.34% <ø> (ø) Carriedforward from 201cdbe
quickstart 62.09% <ø> (ø) Carriedforward from 201cdbe
sandbox 79.56% <ø> (ø) Carriedforward from 201cdbe
scorecard 83.84% <ø> (ø) Carriedforward from 201cdbe
theme 64.54% <ø> (ø) Carriedforward from 201cdbe
translations 8.49% <ø> (ø) Carriedforward from 201cdbe
x2a 78.79% <ø> (ø) Carriedforward from 201cdbe

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 201cdbe...6dc2886. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

color: theme.palette.error?.contrastText || '#fff',
'&:hover': {
backgroundColor: theme.palette.error?.dark || '#731f00',
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should not use this hardcoded color #b1380b . We should use theme specific color.

color: theme.palette.error?.contrastText || '#fff',
'&:hover': {
backgroundColor: theme.palette.error?.dark || '#731f00',
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not use this hardcoded color #b1380b . We should use theme specific color.

@rohitratannagar

Copy link
Copy Markdown
Contributor Author

closing this in favour of: #3346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants