Repository navigation
Add confirmation before deleting individual notes - #2138
Conversation
128a8f7 to
1679ea5
Compare
juliusknorr
left a comment
There was a problem hiding this comment.
Thanks a lot for this. The tests are a good addition 👍 I left some comments inside, mostly about reusing what we already have. Otherwise only those two left as general note:
- DCO check is failing: please sign off your commits (
git commit -s), add theAssisted-by:trailer from AGENTS.md since AI was used, and squash into onefeat:commit. - The slow undo when deleting the last note is a good catch. Mind opening a separate issue for it?
Assisted-by: ChatGPT:GPT-6 Signed-off-by: Mahsa Kohan <mahsaa.kohan@gmail.com>
1679ea5 to
1c9af85
Compare
juliusknorr
left a comment
There was a problem hiding this comment.
Thanks for the quick update, looks good now 👍 Mind still opening a separate issue for the slow undo on the last note?
|
Thank you @juliusknorr for reviewing and approving the PR. |
|
Hey @Mahsakohan , thank you for that nice contribution! I think I have found a bug though: When clicking on the 'close'/X button of the dialog, I get this warning in the console:
And when I close the dialog via the 'escape' key, I get this error:
|
silverkszlo
left a comment
There was a problem hiding this comment.
and another small bug that Claude pointed me to:
The note title is HTML-escaped twice (NoteItem.vue:345):
this.tis Nextcloud core's globalt. It HTML-escapes placeholder values by default (options.escape = true, see server/core/src/OC/l10n.js). The dialog then shows text as plain text (textContent), so a note called Tom & Jerry appears as Delete note "Tom & Jerry"?. Pass { escape: false } as the 4th argument:
text: this.t('notes', 'Delete note "{title}"?', { title: this.note.title }, undefined, { escape: false }),
I have tested it in the UI:
Signed-off-by: Mahsa Kohan <mahsaa.kohan@gmail.com>
Signed-off-by: Mahsa Kohan <mahsaa.kohan@gmail.com>
|
Hey @silverkszlo,
|
silverkszlo
left a comment
There was a problem hiding this comment.
nice one, thank you! :)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |


Related issue
No confirmation for deleting a note#1548
Changes
showConfirmationfrom@nextcloud/dialogs.var(--color-text-error)andDeleteOutlineIconto make the action more noticeable, and usedNcLoadingIconto indicate the loading state.UX decisions
Testing
Limitations and observations
🤖 AI
I used ChatGPT to help write the Playwright tests and some CSS code. I reviewed the code and ran the tests myself.