Commit graph

11846 commits

Author SHA1 Message Date
Dan Stillman
f697e103d8 Update utilities submodule 2026-01-14 13:16:58 -05:00
Dan Stillman
84f067a4cb Fix base-mapped fields not being migrated from Extra
https://forums.zotero.org/discussion/comment/505322/#Comment_505322
2026-01-14 11:48:31 -05:00
Dan Stillman
9ff73630c6 Fix unloaded-item error for attachments in tabs notifier observer
I was seeing this after the Extra field migration. The logic here has
changed in Z8, but just fix this to only get the attachment for loaded
tabs.
2026-01-12 12:54:22 -05:00
Dan Stillman
d7b2f57bde Update utilities submodule to 7.0 branch 2026-01-09 13:27:36 -05:00
Dan Stillman
899bc9eacf Batch Extra field migrations in transactions 2026-01-09 13:27:35 -05:00
Dan Stillman
add3046e49 Add timing for Extra field migration 2026-01-09 13:27:35 -05:00
Dan Stillman
e964c56c82 Remove unnecessary comment about testing Extra field migration
Just need to disable auto-sync to trigger migration
2026-01-09 13:27:35 -05:00
Dan Stillman
b84605cf79 Always use Zotero.CreatorTypes.getLocalizedString()
Since some strings are now stored in schema.ftl

https://forums.zotero.org/discussion/128757/z8-beta-films-dont-have-any-creator-types
2026-01-09 13:27:35 -05:00
Dan Stillman
49812d6efc Fix migrateExtraFields() when onProgress isn't passed 2026-01-09 13:27:35 -05:00
Dan Stillman
d0182e1ef4 Clarify comment for Extra field migration 2026-01-09 13:27:35 -05:00
Dan Stillman
3d63db2576 Delay Extra field migration until after auto-sync and show progress
This avoids redundant field migration on other devices if it has already
run on one. Conflict resolution should automatically ignore identical
changes, so it's not the end of the world if it runs in multiple places,
but we might as well avoid it if we can.
2026-01-09 13:27:35 -05:00
Dan Stillman
e68b8954ca Add Zotero.startupSyncPromise
Resolves after initial auto-sync completes or after the initial
auto-sync would run if disabled
2026-01-09 13:27:35 -05:00
Dan Stillman
fa105159b0 Add pause mechanism for feed updating
```
var handler = await Zotero.Feeds.pause();
[...]
handler.resume();
```
2026-01-09 13:27:35 -05:00
Dan Stillman
3dd99be0a7 Allow wider text for items in progress popup 2026-01-09 12:52:06 -05:00
Dan Stillman
4c196cf414 Fix creator extraction from Extra
Creators shouldn't be extracted if creators of the same type already
exist on the item, to follow citeproc-js behavior, but the code to do
that was broken.
2026-01-09 12:51:09 -05:00
Dan Stillman
5422688e76 Don't upload tags on item conflict if only tag order has changed 2026-01-09 12:41:03 -05:00
Dan Stillman
b867b700a6 Don't try to hide/show Retracted Items if ZoteroPane is still loading 2026-01-09 10:34:03 -05:00
Abe Jellinek
9b1e7d8d4b Fix ebook hyphenation pref not applying when reader opens
https://forums.zotero.org/discussion/128612/enable-automatic-hyphenation-not-working-after-closing-and-reopening-epubs
2026-01-07 13:47:37 -05:00
Northword
585b121101 Fix(Plugins): Prevent user preferences from being lost on plugin disable (#5646)
When a Zotero plugin is disabled, user-modified preferences can be inadvertently reset to their default values. This occurs under specific conditions where a parent preference has not been user-modified, but a child preference within that branch *has* been modified.

The root cause lies in the `Zotero.Plugins.clearDefaultPrefs` function. For preferences that do not have a user-set value (`!branch.prefHasUserValue(pref)`), it incorrectly calls `Services.prefs.getDefaultBranch('').deleteBranch(pref)`. While intended to clear unmodified defaults, `deleteBranch(pref)` operates on the *entire preference branch* starting with `pref`, inadvertently removing any user-modified sub-preferences as well.

This commit changes the problematic line from `branch.deleteBranch(pref)` to `branch.clearUserPref(pref)`. `clearUserPref(pref)` correctly removes only the user-set value for the *specific* preference `pref`, leaving default values and any user-modified sub-preferences intact. This ensures that only truly unmodified default preferences are cleared, preserving user data for related sub-preferences.

This fix prevents unintended loss of user settings when plugins are disabled.
2025-12-30 14:17:58 -05:00
Adomas Venčkauskas
7399f5a574 Fix remaped styles not working in Document Preferences dialog
If you're writing a document and a citation style is renamed
Zotero-side, then the citation dialog won't load with the style
preselected without this
2025-12-30 14:17:21 -05:00
Dan Stillman
f76bf565de Fix potential sync error if unloaded editable library becomes read-only
https://forums.zotero.org/discussion/128001/app-not-syncing-to-newly-created-group
(error was in an existing group, not the new one)

Fixes #5625
2025-11-20 15:53:38 -05:00
abaevbog
7df3dafb9e fix createParent dialog stuck during quicksearch (#5596)
Fix createParentDialog hanging when opened during
quicksearch or in saved search. After a parent item
is added, itemTree is being refreshed. If _refreshPromise
is resolved after a timeout, it will not complete until the
modal dialog is closed. Instead, resolve _refreshPromise
after Zotero.Promise.delay, which uses the XPCOM global
timer unaffected by modals.

Fixes: #3026
2025-11-20 15:53:37 -05:00
Tom Najdek
18f3557742 Use current collection when adding items (#5598) 2025-11-20 15:53:37 -05:00
Dan Stillman
b7fa1e8903 Fix slow purging of creators
Same as e532e435f but for creators
2025-11-20 15:53:37 -05:00
Abe Jellinek
a4e0eaaba4 Style configurator: Log error and discard invalid locale values 2025-10-16 15:10:35 -04:00
Abe Jellinek
c76371aeed Style configurator: Don't use string interpolation to build XUL 2025-10-16 15:10:35 -04:00
Dan Stillman
feaa36a700 Update restore-to-server strings from Transifex 2025-10-09 14:50:29 -04:00
Abe Jellinek
0852296dd8 Document Preferences: Add missing FTL to fix variable in title
Fixes #5570
2025-10-09 13:10:41 -04:00
Dym
a7421eccc2 Local API: Resolve 500 error on single item export (#5560) 2025-10-09 13:09:23 -04:00
abaevbog
c339d52ec3 tagsbox: fix deleted tags reappearing (#5533)
https://forums.zotero.org/discussion/110655/z7-beta-tags-reappear-after-quickly-deleting-them

If a library has many tags and one quickly clicks on "-" button
to deleted multiple tags from an item, the database updates
may not keep up with UI. To address this, save item only
once after a debounce.

Fixes: #5410
2025-10-09 13:09:16 -04:00
Abe Jellinek
035a03fdf2 Item pane header: Only pre-cache CSL.Engine if set to bibEntry mode 2025-10-08 13:46:59 -04:00
abaevbog
ace4d92136 fix "Next" button not appearing in merge dialog (#5563)
On windows and linux.
Fixes: #5561
2025-10-08 13:46:33 -04:00
abaevbog
8374dde232 no find-as-you-type on 0 keypress in itemTree (#5564) 2025-10-08 13:46:27 -04:00
abaevbog
5ad6704da8 Fix item sometimes not added to collection on cross-library drag-drop (#5547)
When drag-dropping items into a collection in another library,
perform the addition to collection in the same transaction
as creating a new item in the target library.

When the librariesCollectionsBox refreshes on the `modify` event
when a newly created group item is linked to the selected item,
it re-loads the data of the linked item via item.loadAllData().
This could happen after the item is added to the collection
but before this change is saved. In that case, item._changed.collections
would be cleared, and when the item is saved, there would be
no changes to collections to save.

Fixes: #5539

Also, cleanup leftover unused logic of restoring linked item
from trash on drop that was removed in 2dd16b44d6
2025-10-08 13:45:54 -04:00
Abe Jellinek
a82d04304f Style installation: Don't prompt on validation error in silent mode 2025-09-14 03:04:22 -04:00
Dan Stillman
fcec11ee13 Fix max-width on hardConfirmationDialog and reduce input font size 2025-09-13 18:36:16 -04:00
Tom Najdek
458bbd90a9 Display the number of items that would be deleted when replacing the online library (#5359)
And require checkbox or text challenge depending on the severity of the
action

Includes replacement for Set.prototype.difference() for Fx115

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2025-09-13 18:36:16 -04:00
Dan Stillman
740a7601eb File sync: Use filtered filename when renaming from multi-file ZIPs
Follow-up to bab0237727
2025-09-13 18:36:16 -04:00
Dan Stillman
b50e18059b File sync: Rename single HTML file within multi-file ZIP to known name
If a file was renamed remotely and a new copy wasn't uploaded for some
reason, the ZIP wouldn't contain the new filename. We already renamed a
single file within the ZIP to match the new filename, but now we also
rename a single HTML file in old multi-file snapshot ZIPs. If there are
multiple HTML files for some reason (old-style ZIP with iframes?), we
let the user fix it.

And then we can stop reuploading files after renames.
2025-09-13 18:36:15 -04:00
Dan Stillman
998fee9bc2 Rename file on remote filename change during sync
Previously, the local file wasn't renamed, so it would become unlinked.
Since we currently force reuploading/reregistering of files when they're
renamed, opening the attachment would then redownload the modified
remote file, but there's no need for the file to become unlinked in the
first place.
2025-09-13 18:36:15 -04:00
Abe Jellinek
20c66b5aa1 Stop using restoreProcessorState() (#5516)
restoreProcessorState() breaks locale-specific punctuation (and is
deprecated).

rebuildProcessorState() is enough if we're passing an empty citation
list; if we're reinitializing with a new non-empty list, call
updateItems() first.

Also:

- Add tests for this issue and for potential regressions in disambiguation handling
2025-09-13 18:36:15 -04:00
Adomas Venčkauskas
05e9f756e7 Fix note type picker appearing for Google Docs
Report https://forums.zotero.org/discussion/126026/endnotes-option-showing-in-google-docs
2025-09-13 18:36:15 -04:00
abaevbog
8344caeae0 qf: fix breakage if unloaded tab's item is deleted (#5535)
Fixes: #5534
2025-09-13 18:36:15 -04:00
Tom Najdek
25e0f35230 Enable u RegExp flag in file renaming by default (#5522) 2025-09-13 18:36:14 -04:00
abaevbog
5bbf4fb664 avoid relation to self after merging related items (#5488)
When copying over relations during merge of items
that are related to one another, avoid relating the
chosen main item to itself.

Fixes: #5487
2025-08-16 11:26:58 -04:00
Abe Jellinek
6c390ad56c Handle invalid path when launching/revealing on macOS (#5485) 2025-08-16 11:26:45 -04:00
Abe Jellinek
d6f83e5f6c Clean up JSDoc comments and unused field (#5443) 2025-08-14 10:42:41 -04:00
Abe Jellinek
72c229eda4 Find Full Text: Simulate ProQuest redirect back to original page (#5443)
We don't follow JS redirects, so this is necessary in order for
us to get to a translatable page after authentication.
2025-08-14 10:42:26 -04:00
Abe Jellinek
1fa0824027 Attach CookieSandbox to Find Full Text requests and translation (#5443)
With a 24-hour validity per site (eTLD+1).
2025-08-14 10:42:21 -04:00
abaevbog
a899accd76 filter out trashed items in relatedBox (#5482)
If the item itself is trashed, all related items are displayed
(trashed or not).

Fixes: #1780
2025-08-14 10:32:16 -04:00