Commit graph

15478 commits

Author SHA1 Message Date
abaevbog
4dbe0f7842
Citation dialog: fix broken item details popup with some non-english locales (#5354)
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
2025-06-25 02:17:41 -04:00
Martynas Bagdonas
774173f04d Update reader submodule and provide FTL data 2025-06-24 21:48:55 +03:00
Martynas Bagdonas
37f8c4d4f4 Fix strings for annotation deletion prompt
Fixes https://forums.zotero.org/discussion/124901/confirm-message-for-deleting-multiple-annotations-in-the-reader
2025-06-24 21:02:30 +03:00
windingwind
6eb8a80e12
Fix reader sidenav buttons wrongly disabled (#5348)
fix: #5332
2025-06-20 23:32:30 -04:00
Martynas Bagdonas
0b5012555d Fix regression triggering multiple reader context menus
Fixes https://forums.zotero.org/discussion/124939/persistent-context-menu-in-the-snapshot-reader
Fixes https://forums.zotero.org/discussion/124938/double-context-menus-on-annotations-in-the-pdf-reader
2025-06-19 21:11:03 +03:00
Adomas Venčkauskas
0acfcd3f99 Update LibreOffice submodule 2025-06-19 11:39:51 +03:00
windingwind
50cafe57a2
Fix linux menu checkmark icon overlap (#5343)
Fix linux menu checkmark icon overlap

fix: #5340
2025-06-19 10:57:53 +03:00
Tom Najdek
57bc913304
Fix tag swatches regressions. Resolve #5322
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.
2025-06-17 15:09:55 +02:00
Bogdan Abaev
e6ce021b5f return tags in /connector/getSelectedCollection
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
2025-06-16 09:34:33 +03:00
Dan Stillman
408f1274f4 Select library tab before item tags box tests 2025-06-12 09:45:27 -04:00
Bogdan Abaev
f50e8b0b35 do not open hidden Zotero window on connector save
And fix regression where selecting a collection
in connector would always switch to the library tab.
It was originally added in https://github.com/zotero/zotero/pull/5020
but was lost after https://github.com/zotero/zotero/pull/5148.
2025-06-12 08:33:22 +03:00
Dan Stillman
1c469ce1a0 Remove duplicate general-back string from 3f84856e1 2025-06-11 22:59:33 -04:00
Dan Stillman
9dbac93dc9 Remove lines inadvertently included in ee35361
I meant to merge the test without those lines, since I fixed the problem
from #5297 properly in ded8dca66.

Fixes #5337
2025-06-11 21:57:59 -04:00
abaevbog
96d3f312b3
fix web link attachment row not selected on create (#5338)
Small followup to tweak 5721744386
2025-06-11 21:50:03 -04:00
Martynas Bagdonas
195629186b Update reader submodule and complete migration to Fluent localization 2025-06-11 22:48:49 +03:00
Martynas Bagdonas
3f84856e1e Update strings for reader localization with Fluent 2025-06-11 22:29:22 +03:00
abaevbog
c493a17b13
Connector server support to adding a note (#5064)
* 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
2025-06-11 14:50:48 +03:00
Tom Najdek
e50787c94f
File renaming: Add pascal case. Fix unicode handling. (#4876) 2025-06-11 01:03:34 -04:00
Dan Stillman
15269763bb Don't use Firefox user agent for files.zotero.net requests 2025-06-11 00:47:28 -04:00
Dan Stillman
b05ddaf32b Fix escaping in rpl command 2025-06-11 00:46:04 -04:00
Dan Stillman
4f7f9ae75b Update reader submodule 2025-06-11 00:46:04 -04:00
Bogdan Abaev
65bc56b07b dont exclude image annotations when creating notes
from multiple selected items.
Regression from 48fd23ccec
2025-06-10 22:22:33 +03:00
Dan Stillman
7a74384b42 Update locales from Transifex and merge new English strings 2025-06-10 11:06:42 -04:00
Adomas Venčkauskas
27648bd73a Update LibreOffice and Word for Windows submodule 2025-06-09 12:23:42 +03:00
Dan Stillman
28ffdd4c10 Update CSL locales 2025-06-08 00:32:49 -04:00
Abe Jellinek
777d6f951f
Undo Scholaread changes to user.js (#5313)
And any other fileHandler changes
2025-06-08 00:30:10 -04:00
Martynas Bagdonas
8cf61fed9e Add spell checking options to reader annotation text box context menu
Fixes #5308, #2838, #2109
2025-06-06 18:40:40 +03:00
abaevbog
6ff349d65d
Select child attachment after a file is drag-dropped onto a top-level item (#5328)
And also handle attachments added via context menu

Fixes: zotero#5320
2025-06-05 02:20:13 -04:00
windingwind
51a62022e9
Improve tabs menu keyboard handle (#5319)
Use space to close tab if the close button is active
Focus next close button after closing tab with keyboard
2025-06-05 02:11:53 -04:00
Dan Stillman
0b7340a651 Update reader submodule 2025-06-05 01:58:58 -04:00
Abe Jellinek
110d04f5f7 Add localization for Focus Mode string 2025-06-04 12:01:06 -04:00
Tom Najdek
ee35361608 Test for subsequent updates providing stale changed object data
From #5297
2025-05-31 02:20:32 -04:00
Dan Stillman
ded8dca668 Properly clear previousData on save for primary data and item fields
Closes #5297
2025-05-31 02:18:07 -04:00
Dan Stillman
05a2539b81 Don't corrupt DataObject#_relations while saving
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
2025-05-31 02:16:05 -04:00
abaevbog
1f8e05bfd8
Fix new annotation changing the scroll position in itemTree (#5309)
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
2025-05-30 01:31:11 -04:00
windingwind
cdcac8a6e1
Fix sidenav drop indicator position (#5304)
regression after #5263
2025-05-30 00:59:08 -04:00
Abe Jellinek
769b4c8c34
Fixes for tags-box regressions (#4951)
* 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
2025-05-30 00:56:56 -04:00
windingwind
3b151a0b18
Fix inconsistent collapsed sidenav state (#5311)
fix: #5276
2025-05-30 00:51:10 -04:00
Adomas Venčkauskas
9d04392eb0 Add a read-only library param to /connector/getSelectedCollection
Part of zotero/zotero-connectors#546
2025-05-26 13:41:07 +03:00
Abe Jellinek
3ff13bc08d Info box: Fix second right-click opening section menu
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
2025-05-21 12:12:31 -04:00
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
Bogdan Abaev
dfc31d9961 citation dlg: data structure refactor, bug fixes
- 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
2025-05-19 09:24:01 +03:00
windingwind
086b0c3d84
Allow plugin to uninstall itself in update manifest (#5292)
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
2025-05-16 06:10:45 -04:00
windingwind
e18bf2165a
Fix locate button for annotation item (#5298) 2025-05-16 06:05:02 -04:00
Tom Najdek
b0506aafe1
Unhide "title" column on "Restore Column Order" (#5299)
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.
2025-05-15 07:48:25 -04:00
Dan Stillman
2bc0c4861c Fix changed object data not being passed in notifier extraData
Which I apparently broke a decade ago in afe0412c5

And add support for 'deleted' and 'tags', which now use a different
mechanism
2025-05-12 23:36:58 -04:00
Tom Najdek
ed24cce4a1
Fix custom trash header persisting after items are restored or deleted. Fixes #5279.
This was due to a logic bug in `getCurrentPane()`, which returned the wrong pane, causing the incorrect one to be updated.
2025-05-12 17:28:11 +02:00
abaevbog
1eacc8bbdf
Citation dialog: updated Enter handling in panels (#5281)
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
2025-05-10 00:29:44 -04:00
Abe Jellinek
9ed3f6363c Add test for synchronous Zotero.done() call
No one should do this nowadays, but EM still does.

zotero/translate@c858ce9613
2025-05-09 14:42:06 -04:00
Abe Jellinek
420b84d17e Update translate submodule 2025-05-09 14:25:48 -04:00