Skip to content

achievements: smoother achievement delete confirmation (fixes #8097) - #10379

Open
RyanS4 wants to merge 1 commit into
masterfrom
8097-confirm-delete-achievements
Open

achievements: smoother achievement delete confirmation (fixes #8097)#10379
RyanS4 wants to merge 1 commit into
masterfrom
8097-confirm-delete-achievements

Conversation

@RyanS4

@RyanS4 RyanS4 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Description

  • Adds confirmation dialog prompts before deleting achievements, references, links, or uploaded link attachments in the user achievements editor to prevent accidental data loss.
  • Configures [confirmDelete]="true", custom item names, and localized confirmation prompts across the achievements, references, and links <planet-step-list> instances in users-achievements-update.component.html.
  • Extends PlanetStepListComponent with @Input() deletePromptMessage?: string to support tailored confirmation prompt text per item type while defaulting to "Are you sure you want to delete the following step?".
  • Updates removeExistingResume() in UsersAchievementsUpdateComponent to open a confirmation dialog (DialogsPromptComponent) displaying the resume file name before marking the attachment for deletion.
  • Adds unit tests in planet-step-list.component.spec.ts and users-achievements-update.component.spec.ts verifying prompt generation and deletion handling.

Fixes #8097

Summary by CodeRabbit

  • New Features

    • Added customizable delete-confirmation messages for planet steps.
    • Enabled localized delete confirmations for achievements, references, and links.
    • Added confirmation before deleting an existing resume, displaying its filename.
    • Resume deletion now occurs only after confirmation.
  • Bug Fixes

    • Prevented accidental immediate deletion of uploaded resumes.
  • Tests

    • Added coverage for customized delete prompts and resume deletion confirmation behavior.

@github-actions github-actions Bot added the large 101-200 reviewable lines label Sep 1, 2026
@RyanS4 RyanS4 changed the title users/achievements: smoother achievement delete confirmation (fixes #8097) achievements: smoother achievement delete confirmation (fixes #8097) Sep 1, 2026
@RyanS4 RyanS4 added the review label Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 7a1578c3-bc6e-47d0-bbb9-64711c4a2ee2

📥 Commits

Reviewing files that changed from the base of the PR and between da71ac2 and dc1075e.

📒 Files selected for processing (5)
  • src/app/shared/forms/planet-step-list.component.spec.ts
  • src/app/shared/forms/planet-step-list.component.ts
  • src/app/users/users-achievements/users-achievements-update.component.html
  • src/app/users/users-achievements/users-achievements-update.component.spec.ts
  • src/app/users/users-achievements/users-achievements-update.component.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

PlanetStepListComponent now accepts a custom deletePromptMessage and uses it in deletion confirmation dialogs. Achievement, reference, and link lists enable confirmation with localized labels and prompts. UsersAchievementsUpdateComponent now confirms resume deletion before updating deletion state. New tests cover the custom step-list prompt and resume confirmation flow.

Assessment against linked issues

Objective Addressed Explanation
Add a confirmation prompt when deleting achievements [#8097]

Out-of-scope changes

Code Change Explanation
Enable confirmation for reference and link deletion (src/app/users/users-achievements/users-achievements-update.component.html:89,106) Issue #8097 covers achievement deletion. It does not define confirmation behavior for references or links.
Add confirmation before resume deletion (src/app/users/users-achievements/users-achievements-update.component.ts:441-457) Issue #8097 concerns achievement deletion. Resume deletion is a separate workflow.

Merge Risk: ⚪ Minimal · up to dc107

The change adds confirmation prompts before achievement and resume deletions while preserving the existing save behavior; no actionable merge-blocking risk remains beyond normal checks and review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

large 101-200 reviewable lines review requested review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deleting achievements has no confirmation prompt

1 participant