zotero/test
abaevbog 46f80ebdfb
Citation Dialog: more optimization of initial loading (#5296)
* citation dialog: interactive before io.getFields

- added io.allCitedDataLoadedPromise, which is resolved
when both io.fieldIndexPromise and io.citationsByItemIDPromise
are resolved. Resolved io.allCitedDataLoadedPromise essentially
means that calls to io.sort() and io.getItems()
will be fast because all necessary data is already loaded.
- citation dialog uses io.allCitedDataLoadedPromise to
not await for functions relying on io.sort() and io.getItems()
before the data is loaded, as it could take an arbitrary
amoung of time. Speicifcally, SearchHandler._getCitedItems() and
CitationDataManager.sort. As soon as allCitedDataLoadedPromise
is resolved, cited items will be sorted.
This means that when retrieving fields takes a long time, one can
still add new items, their bubbles will just not immediately
be sorted.
- this replaces earlier SearchHandler.loadCitedItemsPromise, which
was a special case of this handling.
- added a new test ensuring that bubbles can be added even
when io.allCitedDataLoadedPromise is not resolved yet
- cleanup for buildCitation function to remove handling
of io.citation.sortedItems, which is always empty on
load before io.sort() runs
- added a few Zotero.debug statements for future debugging
- Uses a dummy promise if no allCitedDataLoadedPromise 
(e.g. to accomodate the note editor)
2025-05-21 09:55:41 +03:00
..
components fx128: Remove Services.jsm imports 2024-12-14 01:16:00 -05:00
content Use the bundled mozilla httpd (#5148) 2025-04-22 09:47:58 -04:00
resource Use the bundled mozilla httpd (#5148) 2025-04-22 09:47:58 -04:00
tests Citation Dialog: more optimization of initial loading (#5296) 2025-05-21 09:55:41 +03:00
chrome.manifest fx115: Restore test runner 2024-03-30 00:58:53 -04:00
runtests.sh Server: Expose actual bound port (#4903) 2024-12-14 01:16:03 -05:00