This allows the locator dropdown to be as wide as it wants
(depending on the longest option in the current locale),
with inputs occupying the remaining space. This is
a more flexible layout that avoids broken UI in
cases if <select> dropdown tries to become too wide
while <input>s occupy a fixed space to remain aligned.
Fixes: #5350
Fixes missing tag swatches borders, a regression due to a change of the
default values for the `focus-states` mixin in #4961 (61b62d0).
Also introduces opaque tag colors so that tag swatches are not
semi-transparent.
Together with all collections and libraries.
To account for tags that may contain "," characters,
expect connector to send tags as an array. If tags
are sent as a string, it will be split by "," for
compatibility with older connector versions.
Addresses: #1706
* support adding a note from connector
- pass canUserAddNote flag in ping response to tell
the connector that it should display a note field
- when the connector sends a note, create a child note item
if it does not yet exist and set its content. If the
child item for user-added notes is already created,
update it
- if the connector sends an empty note, user-added child
note item is deleted
- record child notes added by the user in _userAddedNotes
cache to distinguish between user added notes and
notes added by the connector automatically
- if the target library changes, child note items are
moved to the new library as well. _userAddedNotes
will be updated to reflect new itemIDs
- if there are multiple toplevel items being added,
the note is added to all of them
Also fix breakage when switching between collections
from different libraries. Fixes: #5331
The predicate name used as an object key was being converted to an id,
so if relations weren't reloaded properly, they would be broken after a
save.
Discovered while working on #5297
Extend scrollToRow in windowed-list.js to allow to
scroll the specified row to the top of the window
even if it is located below the current scroll window.
With this, when scroll position is restored in itemTree,
the same row remains at the top.
Fixes: #5233
* Show "Remove All Tags..." when right-clicking textbox
* Fix pasting multiple tags adding concatenated tag
* Remove unnecessary check
* Fix tag count changing when unsaved tag is removed
On Windows, after right-clicking on a title field.
this.querySelector('popupset') matched the popupset in the
collapsible-section head, not our own.
Fixes#5294
* 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)
- replace objects with zoteroItem, citationItem, etc.
as the main representation of an entry in the citation
(CitationDataManager.items) with instances of a new BubbleItem class.
BubbleItem has two static methods to create
a new instance: BubbleItem.fromCitationItem() used
to create entries from io.citation.citationItem on load,
and BubbleItem.fromItem used to create entries from
Zotero.Item when a new item is being added into the citation.
BubbleItem.getCitationItem will return a citationItem
in a format that citeproc consumes. This streamlines
the flow of data, makes it easier to manage and avoids
unnecessary conversions between citationItem and Zotero.Item.
- This refactoring fixes the issue of added suffix/prefix
sticking to an item and persisting even if the bubble
is removed and re-added. Fixes: #5282
- add csl data to virtual item in io.customGetItem
to remain consistent with Zotero.Integration.Citation.loadItemData.
That way, csl data is always found on Zotero.Item
and we don't have to check citationItems.
Also:
- apply deduplication to cited items, so that a cited
item from the library that appears in selected or
opened section does not have a duplicate entry in
the cited section.
- added initial test suite for citation dialog
Use `uninstall: true` in `update_url` JSON `updates` that is valid
for the installed plugin to uninstall the plugin the next time it
checks for updates
This actually checks for a "primary" column, so if an extension hides the "title" column but provides its own "primary" column, the "title" column remains hidden.
Unhandled Enter keypress from inside of a panel will now close it.
Enter on "Omit Author" checkbox or on the inactive locator
label dropdown will close the item details popup.
Enter on "Keep sources sorted" checkbox of settings
popup will close it for consistency.
Fixes: #5277