Skip to content

Confirmation dialog before deleting Group#4389

Merged
alanorth merged 4 commits intoDSpace:mainfrom
jlipka:fix/4346-delete-group-confirm-dialog
Jun 13, 2025
Merged

Confirmation dialog before deleting Group#4389
alanorth merged 4 commits intoDSpace:mainfrom
jlipka:fix/4346-delete-group-confirm-dialog

Conversation

@jlipka
Copy link
Contributor

@jlipka jlipka commented May 26, 2025

References

Description

Display a confirmation dialogue before deleting a group. The text has been extended to make it clear that all associated policies of the group will also be deleted.

Instructions for Reviewers

Confirm dialog added or extended at three places - these places could be tested during the review process:

  1. "Access Control" > "Groups" (Delete Button in listing - appears only if deletable)
  2. "Access Control" > "Groups" > Edit ("Delete Group" button next to "Save" button, only if deletable)
  3. "Edit" > "Collection" > (Choose any collection) > "Assign Roles" (Delete button next to each existing role)

List of changes in this PR:

  • Reused the already existing "ConfirmationModalComponent"
  • Tests extended to cover the changed behaviour
  • Translations added

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels May 27, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release May 27, 2025
@pcg-kk pcg-kk self-requested a review June 9, 2025 10:52
@alanorth
Copy link
Contributor

Thanks @jlipka. This works well. I tested it on sandbox.dspace.org on the three admin screens where deleting a user is possible.

Only small feedback is the text overflowing on deleting a workflow group. I was in Firefox if it makes a difference.

Screenshot 2025-06-11 at 14-44-31 DSpace Repository Collection Edit - Roles

@alanorth alanorth moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Jun 11, 2025
Copy link
Contributor

@pcg-kk pcg-kk left a comment

Choose a reason for hiding this comment

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

Work as expected - no other issue than reported by @alanorth - the X is going outside of the container when text is going outside.

@michdyk michdyk moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 10.0 Release Jun 12, 2025
jlipka added 3 commits June 13, 2025 17:22
Introduced a confirmation modal before deleting groups in both the Group Registry and Comcol Role components. This ensures users explicitly confirm deletion, reducing accidental data loss. Updated relevant tests and added new translations for modal text.
@jlipka jlipka force-pushed the fix/4346-delete-group-confirm-dialog branch from 027d1c0 to 55d2f0c Compare June 13, 2025 15:30
Words are forced to break if no more space available
@jlipka
Copy link
Contributor Author

jlipka commented Jun 13, 2025

Only small feedback is the text overflowing on deleting a workflow group. I was in Firefox if it makes a difference.

I just added some css code to make sure any long word will break to new line:

Bildschirmfoto 2025-06-13 um 17 35 17 Bildschirmfoto 2025-06-13 um 17 35 23

@alanorth alanorth added this to the 10.0 milestone Jun 13, 2025
@alanorth
Copy link
Contributor

Thanks for the code @jlipka. I have tested again and the text does not overflow anymore. This is now at +2 with @pcg-kk and my review. Looks good to me!

Heads up: I will tag this for automatic porting to DSpace 7, 8, and 9, but I'm expecting 7 and 8 to fail so we'll need to port it manually.

@alanorth alanorth merged commit aecfabb into DSpace:main Jun 13, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 10.0 Release Jun 13, 2025
@dspace-bot
Copy link
Contributor

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-4389-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-4389-to-dspace-7_x
git switch --create backport-4389-to-dspace-7_x
git cherry-pick -x 57bf254bec793800ba6c8d1ccd00b5513b5e528a 137bbc35bd93c76e1f841f33100b59aa52bcc6b8 55d2f0ce38be01a435d68e743c0b60666996d3bc 20510591e439fa68238c6b245d87413e916a458c

@dspace-bot
Copy link
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-4389-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-4389-to-dspace-8_x
git switch --create backport-4389-to-dspace-8_x
git cherry-pick -x 57bf254bec793800ba6c8d1ccd00b5513b5e528a 137bbc35bd93c76e1f841f33100b59aa52bcc6b8 55d2f0ce38be01a435d68e743c0b60666996d3bc 20510591e439fa68238c6b245d87413e916a458c

@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-9_x:

@jlipka jlipka mentioned this pull request Jun 16, 2025
12 tasks
@jlipka
Copy link
Contributor Author

jlipka commented Jun 16, 2025

Hey @tdonohue
I tried to create a backport (for the first time) for DSpace version 8 - i am not really 100% sure if everything did go right: #4479

@tdonohue
Copy link
Member

@jlipka : Your backport was unfortunately not accurate. I added a comment to #4479 (comment) with a few minor suggestions.

To be honest, if we find this fix is too complex to backport, then we can simply mark it as "fixed in 9.1" (I've done that for now). If another developer wants to backport it themselves at a later time if they desire.

@tdonohue tdonohue removed the port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release label Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Deleting a group should require confirmation

5 participants