Skip to content

Enhance Delete Modal and error display#3337

Merged
mareklibra merged 2 commits into
redhat-developer:mainfrom
asmasarw:fix/delete-dialog
Jun 10, 2026
Merged

Enhance Delete Modal and error display#3337
mareklibra merged 2 commits into
redhat-developer:mainfrom
asmasarw:fix/delete-dialog

Conversation

@asmasarw

@asmasarw asmasarw commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Tickets

  • FLPATH-4276 | [DCM] Delete dialog closes on failure losing user context
  • FLPATH-4258 | [DCM] Delete confirmation button uses secondary color not destructive red
  • FLPATH-4241 | [DCM] Delete dialog allows duplicate DELETE requests (no submitting guard)

Changes

Enhance the Delete Dialog UX: keep the dialog open on API errors and display them inline, disable the Delete button and show a loading spinner during submission to prevent double-clicks, use an error-red background for the Delete button, and suppress the external action alert for delete errors in favour of the in-dialog error banner.

@asmasarw asmasarw requested review from a team, jkilzi and mareklibra as code owners June 9, 2026 11:33
@rhdh-gh-app

rhdh-gh-app Bot commented Jun 9, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-dcm workspaces/dcm/plugins/dcm patch v1.0.0

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.00%. Comparing base (0239de6) to head (1d6fffa).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3337      +/-   ##
==========================================
- Coverage   54.01%   54.00%   -0.02%     
==========================================
  Files        2402     2403       +1     
  Lines       87402    87609     +207     
  Branches    24207    24294      +87     
==========================================
+ Hits        47212    47310      +98     
- Misses      38694    38789      +95     
- Partials     1496     1510      +14     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from ef0adca
ai-integrations 70.03% <ø> (ø) Carriedforward from ef0adca
app-defaults 69.60% <ø> (ø) Carriedforward from ef0adca
augment 46.39% <ø> (ø) Carriedforward from ef0adca
bulk-import 72.86% <ø> (ø) Carriedforward from ef0adca
cost-management 17.48% <ø> (ø) Carriedforward from ef0adca
dcm 59.61% <88.23%> (-1.62%) ⬇️
extensions 62.24% <ø> (ø) Carriedforward from ef0adca
global-floating-action-button 74.30% <ø> (ø) Carriedforward from ef0adca
global-header 61.63% <ø> (ø) Carriedforward from ef0adca
homepage 51.52% <ø> (ø) Carriedforward from ef0adca
install-dynamic-plugins 56.23% <ø> (ø) Carriedforward from ef0adca
konflux 91.01% <ø> (ø) Carriedforward from ef0adca
lightspeed 68.52% <ø> (ø) Carriedforward from ef0adca
mcp-integrations 85.46% <ø> (ø) Carriedforward from ef0adca
orchestrator 37.33% <ø> (ø) Carriedforward from ef0adca
quickstart 62.09% <ø> (ø) Carriedforward from ef0adca
sandbox 79.56% <ø> (ø) Carriedforward from ef0adca
scorecard 83.84% <ø> (ø) Carriedforward from ef0adca
theme 64.54% <ø> (ø) Carriedforward from ef0adca
translations 8.49% <ø> (ø) Carriedforward from ef0adca
x2a 78.79% <ø> (ø) Carriedforward from ef0adca

*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 0239de6...1d6fffa. 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.

@asmasarw asmasarw force-pushed the fix/delete-dialog branch from fa38a0f to ef0adca Compare June 9, 2026 11:39

@mareklibra mareklibra left a comment

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.

otherwise LGTM

// ── Delete dialog ────────────────────────────────────────────────────────
const [deleteOpen, setDeleteOpen] = useState(false);
const [deletingItem, setDeletingItem] = useState<T | null>(null);
const [deleteSubmitting, setDeleteSubmitting] = useState(false);

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.

when deleteSubmitting is true, the handleCloseDelete shuld be blocked till the request is done.

@sonarqubecloud

Copy link
Copy Markdown

@asmasarw asmasarw requested a review from mareklibra June 10, 2026 08:27
@mareklibra mareklibra merged commit 4da4d17 into redhat-developer:main Jun 10, 2026
69 checks passed
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