Opened 10 years ago
Closed 10 years ago
#482 closed defect (fixed)
Tag selector does not refresh on import/delete
| Reported by: | stakats | Owned by: | simon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0 Beta 4 |
| Component: | interface | Version: | 1.0 |
| Keywords: | Cc: | dstillman |
Description
If I delete all items from my library, the tag selector continues to display that library's tags until I take one of the following actions:
- Close and reopen the tag selector
- Close this Firefox window and open a new one
- Restart Firefox
Likewise, if I import items to an empty library, the tag selector remains blank until one of the above actions is taken.
In case library size is an issue, I am attaching a zipped version of my test RIS file for import/delete.
Attachments (1)
Change History (6)
Changed 10 years ago by stakats
comment:1 Changed 10 years ago by dstillman
comment:2 Changed 10 years ago by dstillman
- Resolution set to fixed
- Status changed from new to closed
(In [1051]) Fixes #482, Deleting tag with tag-selected item makes library seem to disappear
Fixed some subtle tag issues, hopefully without causing new ones:
1) If no tags visible after a delete, deselect all
2) If a selected tag is deleted, deselect it
3) If a selected tag goes out of scope in Display All mode, deselect it (otherwise a tag stays selected after removing an item with that tag from the current collection)
comment:3 Changed 10 years ago by dstillman
- Resolution fixed deleted
- Status changed from closed to reopened
Oops, closed wrong one.
comment:4 Changed 10 years ago by dstillman
- Cc dstillman added
- Owner changed from dstillman to simon
- Priority changed from minor to major
- Status changed from reopened to new
Reassigning to Simon.
Simon, this is due to your disabling of Notifier events during translation. The tag update notifications never get called.
Notifier.disable() shouldn't be necessary anymore now that we have event queuing, which automatically queues and consolidates events called while the queue is locked. This happens automatically during DB transactions, but it can be done manually for things not all in one DB transaction:
try {
var unlock = Zotero.Notifier.begin(true);
... lots of stuff, possibly including DB commits ...
}
finally {
Zotero.Notifier.commit(unlock);
}
Passing true to begin() tells it to lock the queue, and the return value indicates whether it is the original locker or whether locking is already on so. Since only the original locker should commit the queue, that value should be passed to commit(). The finally {} is important since otherwise if there's an error the queue gets left open until a restart.
I'm hoping there's a way to do this in the translation process.
It'd be great to fix this for Beta 3 if you have time today, since not having tags appear after you import a huge library (or, I imagine, scrape something with tags) is a bit confusing/disconcerting.
comment:5 Changed 10 years ago by simon
- Resolution set to fixed
- Status changed from new to closed
(In [1118]) closes #505, Bibliography alpha sorting by case
closes #376, Bibliography export order jumbled
closes #482, Tag selector does not refresh on import/delete
closes #499, zotero RDF import of attachments has a flaw
closes #500, Improve COinS handling of other item types
- fixes an issue with importing directory hierarchy
- fixes an issue where the SpringerLink translator could fail to recognize a scrapable resource
- fixes an issue where the Nature translator could fail to retrieve an associated PDF
feel free to push the updates to the SpringerLink and Nature translators to the repository; theoretically, the RDF translator should be backwards-compatible too, but I'd like to test it with b3 before potentially breaking functionality.
(In [1050]) Addresses #482, Tag selector does not refresh on import/delete
This addresses the delete problem. I need to talk to Simon about the import one.