Repository navigation
fix(ui): ask before deleting a gene panel or a project - #1114
Merged
Merged
Conversation
A gene panel and a project were deleted on one click. A panel takes its genes, regions and whole version history with it; a project's delete cascades to every family's and sample's link to it, to its members' access and to the review tags defined for it, so a family in no other project is left open to administrators only. Both deletes now open a confirmation (ConfirmDeleteDialog, on the shared ModalDialog) that says what goes, and only its confirming button sends the request; Cancel, Escape and the backdrop send nothing, and focus starts on Cancel. The panel's names the panel and its version (and the PanelApp release); the project's counts the families and samples that lose their link, the families in no other project, and the members, from the project list the administrator-only page already holds. The request and its audit are unchanged. The family-deletion dialog's styles are renamed to confirm-delete-* and moved to modals.css, shared by both dialogs. The user guide (with its golden fixture) and handleiding chapter 15 say a deletion asks first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes UI-7 from
docs/open-issues.md: a gene panel or a project is no longer deleted on one click.What changed
Gene panels (
GenePanelsPage, admins): Delete opens a confirmation, Delete gene panel PanelA v3. It says the panel goes with its genes, its regions and every archived version, and gives the source release when there is one (PanelApp 1.345). Only Delete panel in the dialog sendsDELETE /api/panels/{id}.Projects (
ProjectsPage, at/projectsand/admin/access/projects): Delete project opens a confirmation, Delete project X. It says no family or sample is deleted, then counts what the delete's cascade takes:The page reads these counts from the project list it already holds. The page is admin-only, and an administrator's list holds every project, so no new read or endpoint was needed.
The dialog (
components/ConfirmDeleteDialog.tsx) is built on the sharedModalDialog. Cancel, Escape and a backdrop click send nothing. Focus starts on Cancel, so Enter on the opened dialog cancels. While the request runs, the buttons are disabled and Escape does nothing. The request, its outcome message and its request audit are unchanged.Styles. The family-deletion dialog's classes (
admin-delete-family-*) are renamedconfirm-delete-*and move fromadmin-families.cssto the end ofmodals.css, which comes just before it in the cascade.DeleteFamilyDialogand the new dialog share them. The look is unchanged.Docs. The user guide (Administration: gene panels, projects; golden fixture regenerated), handleiding ch. 15 (gene panels, a new Een project verwijderen item; HTML rebuilt), and the
docs/testing.mdrows of both page tests.Change classification
Minor. This adds a confirmation step in two admin screens. Nothing about what is deleted, the endpoints, the audit, or any filter, scoring or decision rule changes.
Checks
npm run tscandnpm run lintclean.npx vitest run: 203 files, 2,788 tests passed, with noErrorsorUnhandledlines. A later run ofsrc/pages,src/componentsandsrc/styles, under a load average of 34 from other agents, failed two timing-sensitive tests in other pages. They were different tests on each run, and each file passed when run alone (FamilySmallVariantsPage,AdminRepeatLociPage,FamilyRepeatExpansionsPage,FamilyRoiMarkersPage).check-test-catalogue.shandcheck-handleiding-sync.sh: in sync.ruff check .clean.test_doc_test_references.pyandtest_deployment_config.pypassed (67).🤖 Generated with Claude Code