Z7 removed an `OS.File.open()` in `_checkForUpdatedFiles()` that would
throw on missing files and cause them to be marked for download in a
`catch`.
This likely caused the fix for #1753 not to work in Z7.
Do not switch to library tab while changing target
collection in connector.
Deprecate inLibraryRoot as an independent boolean
param in ZoteroPane.selectItems to instead have
a composite options param { inLibraryRoot, noTabSwitch }
Fixes: #4262
* citation dlg: cleaner search value
Additional cleanup of the search value to not include
some punctuation ("(),.;:"), localized "and",
ampersand, and localized "et al". That way, if one
copies a citation like "(Smith et al., 2020)" and pastes it into the
citation dialog, it is more likely that appropriate search
results will appear.
Fixes: #1864
* handle citations with locators
Clean the input before fetching the locator so that
if one copies and pastes (Smith et al., 2025, p. 15),
the locator is still correctly extracted.
This fixes the breakage in tabs menu on initial load
if one of the tab is for an item from not-loaded group.
Now, every component relying on tab items (e.g. tabs menu)
can just assume that items are all loaded.
Fixes: #5192
On initial load, the grippy does not immediately
appear because it needs to be loaded. This means that
when itemBox is rendered for the first time, the grippy
has a width of 0, which later becomes 18px. If the
itemPane is narrow, it may push the columns out
and lead to text of value components wrapping
without the rows getting stretched.
This sets explicit width to the grippy to avoid such behavior.
Fixes: zotero#5166
- removed quickFormat, insertNoteDialog, and addCitationDialog
.xhtml and .js files, since all of them are now replaced
with new citationDialog
- removed quickFormat and insertNote strings from
en-US localization files
- replaced all mentions of quickFormat in comments and
variables of integration.js and editorInstance.js with
citationDialog
- removed big-sur-specific styling for quickFormat
Closes#5046
Do not lowercase the entire title before capitalizing
the first letter of each word to preserve abbreviations
or spelling of unusual words (e.g. 3D or iPhone).
Fixes: #5165
Also:
- Introduce a mixin for a toolbar button that appears on hover or focus
- Unifies the border radius of such buttons, which was previously different for the "Libraries and Collections" toolbar button.
- last-closed -> last-used for citationDialogMode pref value
- pref label citationDialogLastClosedMode -> citationDialogLastUsedMode
- update Zotero.Prefs version. While migrating, if
integration.useClassicAddCitationDialog is true, set
integration.citationDialogLastUsedMode to 'library'
so the citation dialog opens in library mode on the first run.
If citationDialogLastClosedMode pref exists, it is
migrated to citationDialogLastUsedMode and cleared
- redone logic of extracting the locator to allow for better
detection of locators and to not rely on long regular
expressions that are hard to troubleshoot. Added tests for it.
These are the new rules for extracting locators:
- locator value can be either a set of numbers potentially
with some punctuation in between OR text surrounded with
single or double quotes
- locator labels can be typed in any of 3 formats:
full (chapter), short (chap.), or short with no
punctuation (chap)
- locator labels go before the locator values and there
may or may not be a space in between. For example,
chap.10 is the same as chap. 10.
Fixes: #5092Fixes: #5093
- get opened items asynchronously and load their data
in case if there are items opened across multiple
libraries, and some of them are unloaded.
This fixes#5161, which makes the dialog unresponsive
upon initial load.
- enfore io.filterLibraryIDs in library mode, the same
way it already is being applies in list mode. This
is currently used to only show items from the current
library when adding citations in a note.
- account for the change above in collectionTree to
by focusing the first library from io.filterLibraryIDs,
if those are present, and only default to userLibraryID
if io.filterLibraryIDs is empty.
Keep the placeholder node to retain the positioning
of the text consistent but remove the border
so the item card is invisible.
Also: remove spinner
Fixes: #5151
- pass ref to itemsView.changeCollectionTreeRow
to avoid errors thrown when typing numbers (related to
tags shortcuts)
- return string equivalents of true/false in getExtraField.
virtualized-table expects a string in its typing handler.
Previously returned boolean was causing an error.
Remove refocusing of the input on Enter from item details
popup - just let focus go back to the bubble.
Input refocusing was initially added with the idea that once
you make some edits and confirm them with Enter,
you are ready to go back to typing in the search input.
But then, Enter on Done or Cancel is treated as equivalent
to click, so the focus goes back to the bubble. When
the dialog is cancelled via Escape, focus lands
on the bubble as well, in case you need to keep going to
locate the another item to customize.
This different focus behavior on Enter is indeed a bit
inconsistent and likely no longer needed, now that
you can always refocus input with Cmd/Ctrl+F.
https://forums.zotero.org/discussion/122823/some-advice-for-citation-dialog-in-beta
Before making the dialog interactable.
Initialize loading cited items via io.getItems when the dialog appears.
Once they are loaded, itemsList is refreshed to include
cited matching items and all subsequent searches will include
them too. During the refresh immediately after cited items load,
try to preserve focused/selected state of items.
Added IOManager.preInit that is ran as soon as the dialog
is loaded. Move accept/cancel initialization there.
IOManager.init runs at the very end of onLoad because
it relies on most data and layouts being loaded,
It means if there is some delay or error during loading,
the dialog cannot be closed. To avoid it, setup
cancel/accept buttons separately in the beginning.
Also, minor refactoring of SearchHandler to handle
refreshing of cited items separately from selected and
open items.
Fixes: #5121
- add dropmarker to bubbles after the text to indicate
that bubbles are clickable
- remove X remove button that was there before
- no more mask over the bubble on hover, since dropmarker
is just always visible
- 4px distance between the dropmarker and bubble text
Fixes: #2712
In library mode, apply highlighting to bubbles that
correspond to selected items in itemTree only when
the items table is focused. When the focus leaves,
highlighting is removed from bubbles.
Fixes: #5138