Commit graph

8279 commits

Author SHA1 Message Date
Dan Stillman
078e3bb079 Switch from Bluebird coroutine to async/await for DB/schema
We've been seeing some behavior in `Schema::_migrateUserDataSchema()`
that should be impossible, with conditional blocks totally skipped. I
can't see how this is anything other than either a JS engine bug with
generators or some sort of bug in our version of Bluebird, but with any
luck it will go away by switching everything to async/await.
2022-02-21 15:13:05 -05:00
Dan Stillman
9a2aec970d Load styles list in preferences even if custom style has an invalid date
A bundled style will get replaced from the repo if it has an invalid
date, but a custom style would result in an empty list.

https://forums.zotero.org/discussion/comment/399774/#Comment_399774
2022-02-21 15:12:46 -05:00
Adomas Ven
191e43dcfa
Delay querying attachment state from DB on tree scroll (#2357)
This improves item tree fast-scrolling performance when attachment
column is enabled, but adds a noticable attachment state pop-in
2022-02-21 13:28:15 -05:00
Martynas Bagdonas
b71367760d Don't jump to library tab when closing tab after startup
Fixes #2362
2022-02-21 18:43:04 +02:00
Martynas Bagdonas
822f821718 Set the current author name when creating an annotation in a group
Fixes #2322
2022-02-21 18:11:56 +02:00
Martynas Bagdonas
04fa89ffc8 Don't copy/import/delete note images if library files aren't editable
#2364
2022-02-21 18:11:56 +02:00
Adomas Venčkauskas
000599bfff Do not load citeproc-rs on Style.init() unless it's enabled
Closes #2363
2022-02-21 13:50:08 +02:00
Abe Jellinek
48a3235a2e
Disable Delete/Restore menu items appropriately (#2340) 2022-02-20 11:45:53 -05:00
Abe Jellinek
13f48ec5c7
Render markup in item tree, strip when sorting (#2355) 2022-02-19 15:49:35 -05:00
Dan Stillman
a45da8df17 Add Greek locale 2022-02-19 14:18:50 -05:00
Dan Stillman
fac8d55002 Update submodules 2022-02-19 13:53:03 -05:00
Dan Stillman
b54b7edf9b Don't set author name of current user when copying annotation from group
Fixes #2358
2022-02-19 13:47:28 -05:00
Dan Stillman
72ac453a8c Set createdByUserID to current user for locally created group item
Addresses #2322
2022-02-19 13:47:28 -05:00
Dan Stillman
4a914c26db Set user display name from /keys/current
So that it can be available for annotations created locally before
they're uploaded
2022-02-19 13:47:28 -05:00
Dan Stillman
a2458614df Don't include date line when generating filename for annotations note
Since in many locales it would contain slashes and colons, both of which
would be stripped in the filename, leaving long strings of numbers in
the filename
2022-02-19 13:45:29 -05:00
Dan Stillman
5eee488e20 Update utilities submodule
And add tests for `Utilities.Internal.noteToTitle()`

Follow-up to zotero/utilities@df2dda23b
2022-02-19 13:43:41 -05:00
Martynas Bagdonas
5405da99db
Add support for annotation templates (#2359) 2022-02-18 14:38:36 -05:00
Dan Stillman
db35f55c96 Limit autocomplete in Advanced Search to specific creator types
For `author`, `bookAuthor`, and `editor` conditions added in #2253
2022-02-17 01:43:39 -05:00
Abe Jellinek
91cdc5610b
Search by specific creator type (#2353)
Author, editor, or book author.
2022-02-17 01:06:14 -05:00
Martynas Bagdonas
924d29ff7e Fix undefined Zotero_Tabs issue 2022-02-14 14:13:30 +02:00
Adomas Venčkauskas
06676be8e4 Add defaultSort attribute to columns
Sort date columns in descending order by default.
Closes #2344
2022-02-11 16:19:59 +02:00
Martynas Bagdonas
e6c835abc8
Allow to show/hide citations in notes (#2288) 2022-02-11 12:50:43 +02:00
Martynas Bagdonas
bcfd93bc79 Set lastModifiedByUser even if an annotation author is authoritative 2022-02-10 10:55:02 +02:00
qqobb
47799adb3c
Improve directoryContains() (#2335) 2022-02-10 03:17:46 -05:00
Dan Stillman
f509e9063a Fix arrow keys in View menu
Arrow keys still step through `collapsed` menuitems, whereas `hidden`
properly hides them from key navigation.
2022-02-10 02:52:02 -05:00
Dan Stillman
76c7e832bb Add accesskey for View menu
https://forums.zotero.org/discussion/94431/6-0-beta-underline-of-view-menu
2022-02-10 02:52:02 -05:00
Martynas Bagdonas
ee3e28e126 Changes to how author name is passed to pdf-reader and pdf-worker 2022-02-09 16:54:46 +02:00
Dan Stillman
c6d03753fd Don't copy external annotations to between libraries 2022-02-09 07:08:18 -05:00
Dan Stillman
bacc5b4428 Preserve explicit annotation author name when copying from group 2022-02-08 23:57:49 -05:00
Abe Jellinek
9cf45c0a0b
Set default filename when exporting single note (#2339) 2022-02-08 23:28:53 -05:00
Dan Stillman
734057ff9b Require DB transaction in Zotero.Items.moveChildItems()
But make optional with deprecation warning for now, since it's used in
ZotFile
2022-02-08 06:38:48 -05:00
Dan Stillman
f684984b07 Copy annotations across libraries
Based on option in prefs

When copying an annotation group the
2022-02-08 06:38:32 -05:00
Dan Stillman
67451dffd5 Add annotationAuthorName property to annotation items
And pass both `authorName` and `lastCreatedByUser` to the PDF reader.
The former can either come from `createdByUser` or be set directly on
the item (for group annotations dragged to personal libraries).
2022-02-08 06:38:32 -05:00
Dan Stillman
60f9a0417f Remove isAuthor from JSON passed to PDF reader 2022-02-08 06:38:32 -05:00
Dan Stillman
bf9ef5fc01 Disable PDF annotation transfer in group libraries 2022-02-08 06:38:32 -05:00
Dan Stillman
cc0687a574 Fix selectLibrary() in CollectionTree if no libraryID passed 2022-02-08 06:38:32 -05:00
Adomas Venčkauskas
0d2cfef160 HTML Tree: fix errors being thrown on hover over empty cells
Regression in 54ad6da1
2022-02-08 10:00:36 +02:00
Martynas Bagdonas
b865ee8b65 Fix tagsBox issues in a separate note window:
- Invisible auto-suggested tags
- Oversized tag icon
2022-02-07 17:39:09 +02:00
Dan Stillman
e4f5241058 Add missing quote in logged error 2022-02-05 03:17:51 -05:00
Adomas Venčkauskas
54ad6da1af HTML Tree: make tooltip setting code use any parent xul node 2022-02-04 14:19:20 +02:00
Dan Stillman
c78bf1b2a3 Fix feed item guid in logged warning when item exists in different feed 2022-02-04 02:18:38 -05:00
Abe Jellinek
e8b574da0b
Fix React icons only using 2x image once (#2324)
a1267bc fixed repeated re-appending of '@2x' by moving the modified URL
to a local variable, but it still set hasHiDPI to false permanently;
this meant that icons displayed repeatedly in the same window, like the
tab close button, would only use their 2x versions the first time they
were displayed (in the case of tabs, this is the library tab's invisible
close button, so *no* tabs got visible 2x buttons).

This commit moves the HiDPI check and URL modification out of the render
function and instead runs it a single time when i() is first called.
2022-02-04 00:38:01 -05:00
Adomas Venčkauskas
8de1ddcaf4 HTML Tree: Display a tooltip with full cell contents when truncated
Closes #2321

Also added tooltips for cells that use an icon in their contents
2022-02-03 16:09:40 +02:00
Abe Jellinek
4777f0ec89 Double-click/enter to edit feed
Closes #2323
2022-02-02 23:03:04 -08:00
Tom Najdek
90da2563c8
Decouple progress queue table from progress window (#2318)
* Tweaked ProgressQueue to accept multiple listeners per event.
  Removing listeners now requires specifying which one to remove.
* Decoupled progress queue table into new ProgressQueueTable component
2022-02-02 17:15:57 -05:00
Dan Stillman
1ea1a134ba Reset extensions.spellcheck.inline.max-misspellings
Closes #2108
2022-02-02 05:48:23 -05:00
Adomas Venčkauskas
060d2f1c37 Item tree: Add tooltips for header cells.
Restrict the html-tooltip [title] selector to not fall back to
window title when no title attributes are present.
2022-02-02 12:25:50 +02:00
Dan Stillman
4e6b68477d PDF reader: Annotation name display changes
- Show creator's name in groups even when it's the current user
- Don't show name for external annotations
2022-02-02 03:54:34 -05:00
Dan Stillman
a6e0432848 PDF reader: Tweak annotation deletion confirmation text 2022-02-02 02:09:20 -05:00
Martynas Bagdonas
21ca1555c1 Focus tag input field if tagsBox doesn't have tags
Fixes #2315
2022-01-31 19:49:58 +02:00
Dan Stillman
637acbe693 Fix incorrect isEditable() test in Item::moveToLibrary() 2022-01-31 06:48:05 -05:00
Dan Stillman
df64a16b55 Disallow unowned group annotation edits, but allow deletions
Update `DataObject::isEditable()` to take an optional `op` argument to
test individual operations as opposed to general library editing.
Erasing objects now tests `erase`, and `Item::isEditable()` allows
`erase` for unowned group annotations while disallowing the default
`edit`.

It's still up to the reader to handle this appropriately in the UI and
not allow operations it shouldn't, but this enforces it in the data
layer.
2022-01-31 06:48:05 -05:00
Dan Stillman
5a0cd78f06 Enable PDF reader by default and enable for groups
"Zotero" is now the first and default option in the "Open PDFs using"
drop-down in the General pane of the preferences.
2022-01-31 06:48:05 -05:00
Martynas Bagdonas
f8d7eb8ed7 Prompt confirmation when deleting annotations in PDF reader 2022-01-28 17:32:41 +02:00
Adomas Venčkauskas
d2aa945083 Select full item name upon entering edit mode in the collection tree
(Instead of placing the cursor at the end of the edit field)
Closes #2316
2022-01-26 15:10:59 +02:00
Martynas Bagdonas
e46f210b6c
Add color and tag selector to annotations sidebar (#2299) 2022-01-17 04:20:35 -05:00
Martynas Bagdonas
f2e9efaf1d Don't show multiple separators in PDF reader annotation context menu 2022-01-04 19:11:38 +02:00
Dan Stillman
035aac30f2 Fix misplaced '?' in regexp from 52d5652540 2022-01-03 01:31:02 -05:00
Dan Stillman
52d5652540 Don't use Firefox UA for proxy-check S3 domain
https://forums.zotero.org/discussion/comment/396502/#Comment_396502
2022-01-03 01:22:49 -05:00
Dan Stillman
4f8fccd598 PDF reader: Page label popup tweaks (#2267)
- Change text of context menu option
- Add header line above radio boxes
2021-12-28 01:19:48 -05:00
Martynas Bagdonas
2cd756b7ae PDF reader: Add page label update option to annotation popup (#2267) 2021-12-28 01:19:48 -05:00
Martynas Bagdonas
3cb5340b26 PDF reader: Remove import bar artifacts 2021-12-28 01:19:48 -05:00
Martynas Bagdonas
6913c179dc Optimize annotations batch modification and deletion 2021-12-28 01:19:48 -05:00
Dan Stillman
819dc7f6f4 Include "Zotero/[version]" in file sync requests
To avoid blocking by some institutional firewalls

https://forums.zotero.org/discussion/93510/general-sync-error
2021-12-27 15:54:12 -05:00
Dan Stillman
3dab64ddbb Fix error deleting some orphaned or invalid WebDAV files
If a .prop file was passed to `_deleteStorageFiles()`, it would throw
`deletePropURI.QueryInterface is not a function`.
2021-12-27 14:53:28 -05:00
Dan Stillman
71248b591d Better handling of export option for notes in items list context menu
- Show "Export Note…"/"Export Notes…" if only notes or attachments
  selected
- Don't show export option if only attachments and no embedded notes
  (was previously disabled, and still is if all notes or a mixture of
  empty notes and attachments)
2021-12-26 23:50:15 -05:00
Dan Stillman
5c024e2859 Use Sets instead of Arrays in ZoteroPane.buildItemContextMenu() 2021-12-26 23:27:44 -05:00
Dan Stillman
f3a71a2c09 Log timing info for copying bibliography to clipboard and CSL Preview 2021-12-26 23:19:35 -05:00
Dan Stillman
24104dc685 Fix error generating context menu for multiple standalone attachments
Regression from f161d167ae
2021-12-26 23:15:47 -05:00
Dan Stillman
918570479e Hard-code "storage" in error when trying to set data dir to 'storage' 2021-12-24 02:06:39 -05:00
Dan Stillman
d361930bcc Remove PDF metadata retrieval problem reporting
Closes #1854
2021-12-23 06:11:13 -05:00
Dan Stillman
d3691473bc HTML tree: Fix Shift-Enter for opening PDFs in separate windows
This also required React 17, which removed event pooling [1], which was
breaking this even after the code change.

https://forums.zotero.org/discussion/comment/396112/#Comment_396112

[1] https://reactjs.org/blog/2020/08/10/react-v17-rc.html#no-event-pooling
2021-12-23 01:18:22 -05:00
Adomas Venčkauskas
5dabe390a2 Fix collection and item tree focusing code. Closes #2286 2021-12-22 13:48:41 +02:00
Tom Najdek
bbf3180a10 Fix rtfscan icons reported as having HiDPI variant 2021-12-22 05:06:21 -05:00
Dan Stillman
7285c32d28 Support Cmd/Ctrl-Shift-F to open advanced search window
https://forums.zotero.org/discussion/93600/shortcut-for-advanced-search

In olden days this used to trigger full-screen mode of our weird "tab
mode" in Firefox, but that hasn't existed in many years. At least on
macOS, the standard shortcut for that is Cmd-Ctrl-F.
2021-12-22 05:04:41 -05:00
Dan Stillman
0f676dd720 Remove lower row height in virtualized table on macOS
With the additional PDF icon in the Attachments column from b0ba7e464,
might as well have the same amount of spacing to tell the rows apart.
2021-12-22 05:04:28 -05:00
Dan Stillman
b0ba7e4646 Show small PDF icon in Attachments column when there's a PDF
Closes #2265

There's also new code for showing a different icon for snapshots, files,
and DOI/URL links, like the web library and iOS app, but it's commented
out for now. The bitmap icons create too much visual noise with the
greater information density and hierarchical tree of the desktop app
(not to mention many more low-DPI displays). We can revisit after
switching to SVGs across the board.
2021-12-22 03:38:12 -05:00
Dan Stillman
04fa066a14 Delete items with unmodified delete key when not in collections
Closes #2209
2021-12-21 03:19:13 -05:00
Dan Stillman
978e2c32b4 Remove "Toggle Tag Selector" command from Shortcuts preference pane
Cmd/Ctrl-Shift-T is now used for reopening a closed tab

This is now a View menu option, so macOS users can assign an
app-specific shortcut key for it. For other platforms that can't do
that, Zutilo could add it, and it will be an option if we add general
key-binding configurability in a future version.

Closes #2281
2021-12-21 02:22:29 -05:00
Dan Stillman
f161d167ae Show "Add Note from Annotations" for all items with PDF attachments
So that this works for PDFs with external annotations that haven't yet
been processed. Going forward, if we add automatic/background scanning,
we can avoid showing this option if the file hasn't changed and there
are no Zotero annotations, which would probably be the majority of
attachments.
2021-12-21 02:22:29 -05:00
Dan Stillman
ea18641a62 Annotation import: Use skipAll for lastProcessedModificationTime save 2021-12-21 02:22:29 -05:00
Dan Stillman
d76cf829b1 Additional logging for PDF annotation import 2021-12-21 02:22:29 -05:00
Adomas Venčkauskas
59969d1a7b Fix citeproc engine variable name in rtfScan.jsx 2021-12-20 15:53:59 +02:00
Dan Stillman
fa95de396d Add en-AU and en-NZ as available locales
Addresses #2268, but better support for other en-* locales will require
other changes, including `timeStyle` support in `Intl.DateTimeFormat` in
a newer Firefox version, which will let us use a custom `DateTimeFormat`
for dates instead of relying on `toLocaleString()`.
2021-12-20 01:24:43 -05:00
Dan Stillman
abe8c39c5b Ignore blank tags when saving from translator
Instead of throwing an error
2021-12-19 03:01:59 -05:00
Dan Stillman
f734e53ed9 Fix broken Export Library after #2214 2021-12-18 22:42:12 -05:00
Martynas Bagdonas
78526d7795 Include annotationKey when using "Add Item Note from Annotation"
Fixes #2279
2021-12-16 13:09:22 +02:00
Dan Stillman
88c3e6ca00 Fix wrong aria-disabled on context/non-context item rows
Regression from #2263
2021-12-15 22:05:28 -05:00
Adomas Ven
44b6cd0525
citeproc-rs support (#2220)
Disabled under zotero.cite.useCiteprocRs by default
2021-12-15 17:28:41 -05:00
Dan Stillman
55e8f7914b Handle style errors in CSL Preview window
Keep going, and log the error
2021-12-15 17:21:26 -05:00
Dan Stillman
b28db2c8f9 Show "Add Notes from Annotations" when multiple items are selected
Closes #2277
2021-12-15 16:37:21 -05:00
Dan Stillman
a648da8507 Markdown/HTML note export: Switch hard-coded translator ids to constants 2021-12-15 06:10:58 -05:00
Dan Stillman
ad21d73ad9 Markdown note export: Replace zotero:// without separate saving code path 2021-12-15 06:10:58 -05:00
Martynas Bagdonas
19977598eb Markdown note export (#2214) 2021-12-15 06:10:58 -05:00
Dan Stillman
63a0452a77 Update submodules 2021-12-15 01:55:36 -05:00
Adomas Ven
0a8ba2bced
Improve tree screen reader accessibility (#2263)
Also:

* Allow opening tree context menu with Shift + F10 and Context Menu button
2021-12-15 01:47:06 -05:00
Dan Stillman
fbef7c00dd Fix error deleting feed item with invalid attachment
This shouldn't happen, and we should make sure we prevent plugins from
doing it, but if an attachment existed in a feed library, neither the
item nor the feed could be deleted.

https://forums.zotero.org/discussion/93453/unsubscribe-rss-feed-fail
2021-12-14 08:17:42 -05:00
Martynas Bagdonas
338d753eb3 Fix itemBox opening popups in wrong bindings 2021-12-13 16:36:47 +02:00
Dan Stillman
644c4e5925 Add objects from failed download requests to sync queue
Previously only individual objects from successful requests that
couldn't be processed for some reason would be added to the queue.

`Sync.APIClient.downloadObjects()` now returns clearer and more
consistent results. It now returns an array of promises for objects with
a `keys` array of requested keys and either a `json` array of returned
API JSON objects or an `error` Error, depending on whether the request
succeeded or failed. This makes it easier to detect remotely missing
objects and request failures.
2021-12-10 05:56:46 -05:00
Martynas Bagdonas
86965988b4 Make PDF reader File menu "Show in Library" option to show parent item
Fixes #2266
2021-12-09 15:32:24 +02:00