Repository navigation
Ask before deleting a question, naming its answers and the rules that use it - #269
Conversation
…e or rule The dialog names the question, its answer count and the questions whose rules stop working. A choice nobody picked is deleted at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to fix/bits-279-delete-dialogs
…er it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 2fcfe3b. No CI (stacked): Vitest, lint, vue-tsc and the build pass locally.
Beyond the PR text: in the logic panel, Cancel, Escape and Delete rule close only the rule dialog, and focus goes back to the trash button. A question's own rules don't count as rules that stop working. A second click on Delete hits nothing, because the buttons leave at once. One should inline.
| const withAnswers = answers | ||
| ? ` and its ${answers} ${answers === 1 ? "answer" : "answers"}` | ||
| : ""; |
There was a problem hiding this comment.
When the counts can't load, answers is undefined and the text reads like a question without answers, though it may have 40. The choice dialog already says "The answers that picked it" in that case.
| const withAnswers = answers | |
| ? ` and its ${answers} ${answers === 1 ? "answer" : "answers"}` | |
| : ""; | |
| // unknown when the counts couldn't load: there may still be answers | |
| const withAnswers = | |
| answers === undefined | |
| ? " and its answers" | |
| : answers | |
| ? ` and its ${answers} ${answers === 1 ? "answer" : "answers"}` | |
| : ""; |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hoice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PhilReinking
left a comment
There was a problem hiding this comment.
OK at 58c1716. No CI (stacked): Vitest 257, lint, vue-tsc and the build pass locally. The should from the last review is fixed.
3 new tests fail on 2fcfe3b. Beyond that: clicking trash three times fast fetches once and deletes once. When the count can't load, a choice and a policy both ask, and nothing goes. Asking again after Cancel fetches a fresh count. The server sends a count for every policy, and only agreed policies are stored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the delete dialogs (#269) and the save status (#267). Conflicts: the old Workbench, Sidebar Block and Group stay deleted. Choice and policy rows keep their in-row delete button, which now asks first through useDeleteChoice; the list still does the delete so it can move focus once the row is gone (useDeleteChoice takes that delete). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ialogs # Conflicts: # CHANGELOG.md
PhilReinking
left a comment
There was a problem hiding this comment.
OK at e8da262, CI green. The merge of main changes only CHANGELOG.md by hand: main's #265 and #278 lines stay as on main, and the #269 line follows them. The PR's own diff against main is byte for byte the reviewed one from 1f385f3. A trial merge after #270 is also clean and keeps every changelog line.
Deleting a question, group, choice, consent policy or rule now asks in the app's dialog instead of the browser's. The dialog names the question, its answer count and the questions whose rules stop working. A choice or policy nobody picked goes at once, also with Cmd+Backspace.
Fixes BITS-279
includeSubmissionson Delete. If that fails, the dialog still asks and says "and its answers" without a number.lg.Stacked on #264, so no CI until it targets main.
Tested: Vitest, lint, vue-tsc, build; the new tests fail on the base. By hand at 1440 and 390: all dialogs, Cancel, Escape, real deletes, a failed count load.
Not tested: the PHP suite locally. No PHP changes here; #264 has its own CI.
🤖 Generated with Claude Code