Commit graph

11903 commits

Author SHA1 Message Date
Adomas Venčkauskas
5b1ed9ac8b Save session library switching with filesEditable support (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
5e18337cc6 Simple attachment saving via Connector (instead of Zotero) (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
d781151b9a Make server.js use mozilla httpd and support application/octet-stream (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
6d206f98bb Remove old Z4-fx connector switching code (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
67b5a0bb19 Use the bundled mozilla httpd (#5148) 2025-04-22 09:47:58 -04:00
Adomas Venčkauskas
db1c542a50 Remove unused connector server code (#5148) 2025-04-22 09:47:58 -04:00
abaevbog
e690b0b18e
Expand collectionTree containers on dragover (#5024)
- when something is dragged over a collapsed collection
or group, it will be expanded to reveal children
so one could drop the dragged item/collection/ into them
- when drag is over, the expanded collections will
collapse, except for the ancestors of the newly selected
collection
- trigger collapse of expanded collections on dragend
on the entire document (in case dragend happens not over
the collection tree), or from onDrop handler, from where
we will wait for selection to change before collapsing
rows

Fixes: #4952
2025-04-22 00:17:56 -04:00
abaevbog
dc084b6961
Move note-editor popup a11y strings to Fluent (#5212)
Per https://github.com/zotero/zotero/pull/5205#issuecomment-2809055908
2025-04-18 00:14:26 -04:00
Abe Jellinek
a7778b93e8 Tags box: Disable Remove All Tags when not editable 2025-04-16 10:29:40 -04:00
Abe Jellinek
b067e0d940 Scaffold: Add tags to item preview 2025-04-16 10:29:40 -04:00
abaevbog
173660d5c7
add string for note-editor a11y link popup message (#5205)
String read out by screen readers when the link popup
appears instructing users to navigate it.

Addresses: #5199
2025-04-16 02:42:42 -04:00
abaevbog
1459ca210d
new collection dlg: fix menu keyboard nav on win (#5208)
Fixed non-working selection of collections in the
dropdown via keyboard on Windows.

Fixes: #5202
2025-04-16 01:57:13 -04:00
abaevbog
f568363098
a11y: clear aria-expanded on empty itemTree rows (#5201)
Per https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-expanded#treeitems
only treeitems that contain children should have
the aria-expanded attribute. This is instead of having
aria-expanded="false" on empty regular items or standalone
attachments, which erroneously indicates to screen readers
that the row has children but is collapsed.

Fixes: #5200
2025-04-16 01:53:54 -04:00
windingwind
0bff70b186
Fix item pane blank (#5207)
This is caused by the persisted splitter state value to be blank from either older versions of client or plugins.
Resetting the empty values fixes this bug.
2025-04-16 01:53:03 -04:00
Abe Jellinek
246005a097
Accept length-7 sortIndexes for snapshots (#5209) 2025-04-16 01:52:09 -04:00
Abe Jellinek
2db51eb0e5 Scaffold: Don't collapse item preview sections
Fixes sections disappearing when collapsed in the main window's item
pane.
2025-04-15 13:01:01 -05:00
Abe Jellinek
71a4742092 Scaffold: Fix code completion not working until pref changes 2025-04-14 11:21:30 -06:00
Dan Stillman
f616d41546 Mark locally missing files marked for upload for download instead
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.
2025-04-14 04:22:16 -04:00
abaevbog
060a15fe78
Do not switch to library tab while changing target collection in connector (#5020)
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
2025-04-10 07:27:20 -04:00
Tom Najdek
cef26fae09
Tweak column behaviour on visibility and order changes (#5162) 2025-04-10 06:23:09 -04:00
Martynas Bagdonas
1116be4a02 Fix PDF worker not loading CMap files 2025-04-09 18:53:41 +03:00
Dan Stillman
e480c78898 Update locales from Transifex 2025-04-09 02:00:53 -04:00
abaevbog
3d1cf90934
runJS: better message if nothing is returned (#5181)
Display "===>undefined<=== (completed successfully)" instead
of current "===>undefined<=== (undefined)", which is a bit misleading.

Fixes: #5180
2025-04-09 01:31:22 -04:00
Abe Jellinek
650be7d350
Scaffold code completion (#5171) 2025-04-09 00:36:22 -04:00
windingwind
a4db5c9bd2
Fix can't move second-to-last item pane section down (#5187) 2025-04-09 00:34:05 -04:00
abaevbog
4fc7730181
Citation dialog: stricter cleanup of search value (#5185)
* 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.
2025-04-08 23:56:20 -04:00
abaevbog
b0b9442c95
load all tabs items' data when restoring tab state (#5193)
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
2025-04-08 22:42:56 -04:00
abaevbog
c6688ba9d4
include mru types in main list of "New Item" menu (#5195)
Per https://forums.zotero.org/discussion/123269/bad-practice-in-new-item-drop-down-menu
2025-04-08 22:40:07 -04:00
Abe Jellinek
c400d11c5c Remove dragstart listener from attachment row on destroy
Follow-up to e6f1983073
2025-04-04 12:36:53 -04:00
Abe Jellinek
e6f1983073
Make item pane attachments/notes/related item rows draggable (#5184) 2025-04-04 12:27:02 -04:00
abaevbog
3d538d71ca
citation dlg: search by identifier (#5182)
- if the search string looks like a DOI or ISBN, use
it as a search condition. https://forums.zotero.org/discussion/comment/489309/#Comment_489309
- have library use "All Fields & Tags" search mode.
Followup to zotero@b78bf8e
2025-04-04 00:27:46 -04:00
windingwind
0b8b4c0ff6
Draggable item pane sections (#5094) 2025-04-03 21:32:37 -04:00
Tom Najdek
4f03c5d360
File renaming: add support for counting creators (#5175)
Also extends the templating engine to support inequality comparisons.
2025-04-02 05:31:50 -04:00
abaevbog
f1244d824c
Remove old citation dialogs (#5177)
- 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
2025-04-02 05:26:06 -04:00
abaevbog
b8ec6eb75e
transform menu: preserve cases in capitalize title (#5174)
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
2025-04-01 01:25:34 -04:00
Tom Najdek
3a536c647b
Add ability to delete attachment from item pane (#5133)
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.
2025-03-27 23:25:52 -04:00
Dan Stillman
d5d24f5d9d Update utilities submodule 2025-03-27 23:10:05 -04:00
Abe Jellinek
8eda90cdc0
Scaffold: Add item pane-like preview of translated items (#5079) 2025-03-27 23:02:31 -04:00
Abe Jellinek
5a5f2c2e59 FileHandlers: Fix unintended fallthrough in switch
May have been responsible for this:
https://forums.zotero.org/discussion/comment/483004#Comment_483004
2025-03-27 10:32:12 -04:00
abaevbog
929147b33a
citation dlg: miscellaneous followup fixes (#5095)
- 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: #5092
Fixes: #5093
2025-03-27 03:45:31 -04:00
Abe Jellinek
d9e8ea8ff7
Let creator autocomplete popup fill row width (#5141) 2025-03-27 03:11:00 -04:00
abaevbog
4421de63de
citation dlg: fix unloaded items errors (#5163)
- 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.
2025-03-27 03:05:46 -04:00
abaevbog
a366f16346
citation dialog: remove cited item placeholder in library mode (#5152)
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
2025-03-27 03:03:03 -04:00
abaevbog
b3a3757716
Citation dialog: fixed errors thrown if you type in itemTree (#5143)
- 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.
2025-03-26 01:56:42 -04:00
abaevbog
314bd08c03
citation dlg: localized "Add to Citation" label (#5150)
Fixes: #5146
2025-03-26 01:35:37 -04:00
Tom Najdek
8ec81da1d9
Improve attachment column progress meter (#5156)
* Better styling for file download progress meter #5144

* Fix download progress meters not removed on completion #5145
2025-03-25 00:10:35 -04:00
abaevbog
951ed4fa4b
citation dlg: fix menubar missing on first open (#5154)
Do not wait for the itemTree to add the menubar but
create it immediately and just initialize it when
itemTree is ready.

Fixes: #5153
2025-03-25 00:06:49 -04:00
abaevbog
cf37bf5ce1
citation dlg: no input refocus on Enter from popup (#5159)
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
2025-03-25 00:04:13 -04:00
abaevbog
6787dcd596
Citation dialog: do not wait for cited items to load (#5127)
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
2025-03-20 23:42:00 -04:00
abaevbog
41bb2784b5
Citation dialog: add a dropmarker to bubbles (#5130)
- 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
2025-03-20 23:32:39 -04:00