Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discouraging delete #66

Open
bjohas opened this issue Oct 23, 2020 · 5 comments
Open

Discouraging delete #66

bjohas opened this issue Oct 23, 2020 · 5 comments

Comments

@bjohas
Copy link
Collaborator

bjohas commented Oct 23, 2020

https://forums.zotero.org/discussion/85810/discouraging-delete?new=1

We're using Zotero (and this plugin) in group libraries where a fair number of people are co-editing in principle. We've had issues where people have accidentally deleted items without realising (when e.g., they had just wanted to remove them from the collection).

Is there a way in which the delete dialogue could be made more distinct from the 'remove from collection' dialogue? Or restricting deletion?

Would it be possible to do with monkey patching in this extension? E.g.,

  • bring up a 2nd warning for deleting?
  • and/or disable delete for non-admins?
  • and/or make delete not delete, but just move it into a collection called 'Trash'?
@retorquere
Copy link
Collaborator

  • 2nd warning: possible. Easiest to do before the regular popup.
  • We'd have to check regularly whether the user is admin of the group using the web api, as the client doesn't have a notion of admin. When we know this, the "delete" option can be hidden from the menu.
  • possible but would be a pretty ugly monkey-patch, with multiple methods used throughout Zotero monkey-patched with interdependencies between them. I would advice against this one. If this errors out somewhere this is going to be very hard to diagnose/debug.

@bjohas
Copy link
Collaborator Author

bjohas commented Oct 26, 2020

| 2nd warning: possible. Easiest to do before the regular popup.

For this, would the monkey patch be easier? For me, any extra warning would be better than none, so if there's something that's easy to do, then let's do that.

@retorquere
Copy link
Collaborator

It'd be a monkey patch (no other way). How involved it'd be depends on where you want to interject -- all places, specifically the keystroke or menu option, etc.

@bjohas
Copy link
Collaborator Author

bjohas commented Oct 26, 2020

How many places are there? Menu for sure, as well as keystroke (the zotero default).

Another option would be to distinguish the delete dialogue better from the 'remove from collection dialogue'. E.g., if the delete dialogue could be bright red, that would also be ok. However, not sure whether that can be patched...

@retorquere
Copy link
Collaborator

I don't really know how many there are. Just struck me -- for an extra confirmation on delete, after the regular prompt would be easier, since we can patch zoteroPane.deleteSelectedItems.

The existing dialog is shown in response to a call into the C-based internals of Firefox. That's out of reach for monkey patches, so we cannot change that in any way.

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

No branches or pull requests

2 participants