Commit graph

1239 commits

Author SHA1 Message Date
Dan Stillman
c7ece79f79 Fix missing creators not being removed in item.fromJSON()
Apparently there's been a bug for years where removing a creator
remotely hasn't caused it to be removed locally via sync...

https://forums.zotero.org/discussion/94910/desktop-app-not-correctly-syncing
2022-03-09 02:43:22 -05:00
Dan Stillman
8b7afcf24c Fix utilities_item tests after adding Preprint in 053d6a011
Attachments and notes are now mapped to CSL `document` (though it
shouldn't be possible to export attachments or notes to CSL JSON anyway)
2022-03-05 07:41:42 -05:00
Dan Stillman
1ce47bc404 Add Preprint item type to additional sample data for tests 2022-03-05 07:23:50 -05:00
Dan Stillman
32fc1cad9c Add Preprint item type to sample data for tests 2022-03-05 06:03:44 -05:00
Dan Stillman
96347d4333 Fix error generate sample type/field data for tests 2022-03-05 06:03:44 -05:00
Martynas Bagdonas
b7f26c47c1 Split annotation if position data exceeds the limit 2022-02-28 20:10:20 +02:00
Dan Stillman
0e0bd0586b Update assignProps call in createUnsavedDataObject() 2022-02-21 21:22:46 -05:00
Dan Stillman
90531ea2a4 Fix notifier test after 078e3bb079 2022-02-21 19:22:29 -05:00
Dan Stillman
9cdcb2fd7c Fix DB timeout test after 078e3bb079 2022-02-21 16:58:57 -05:00
Adomas Venčkauskas
9ca617a6a9 Fix broken tests in 000599b 2022-02-21 14:06:20 +02:00
Abe Jellinek
48a3235a2e
Disable Delete/Restore menu items appropriately (#2340) 2022-02-20 11:45:53 -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
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
b99aeae76e Add DB test for combination of numbered and unnumbered query placeholders 2022-02-17 01:43:39 -05:00
Dan Stillman
cb2df23580 Add tests for directoryContains()
Follow-up to #2335
2022-02-10 03:18:06 -05:00
Dan Stillman
54eb13ce9e Fix annotation-copying tests after bacc5b4428 2022-02-09 00:07:58 -05:00
Dan Stillman
bacc5b4428 Preserve explicit annotation author name when copying from group 2022-02-08 23:57:49 -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
cec1f18670 Fix nesting of resetUnsyncedLibraryFiles() test 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
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
24104dc685 Fix error generating context menu for multiple standalone attachments
Regression from f161d167ae
2021-12-26 23:15:47 -05:00
Dan Stillman
1e1969a089 Fix getBestAttachmentState() tests after b0ba7e464 2021-12-22 05:23:16 -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
abe8c39c5b Ignore blank tags when saving from translator
Instead of throwing an error
2021-12-19 03:01:59 -05:00
Adomas Ven
44b6cd0525
citeproc-rs support (#2220)
Disabled under zotero.cite.useCiteprocRs by default
2021-12-15 17:28:41 -05:00
Martynas Bagdonas
19977598eb Markdown note export (#2214) 2021-12-15 06:10:58 -05: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
Adomas Ven
4405b59044
Add a function to download PDFs via a browser (#2248)
Fixes zotero/translators#2739
2021-12-02 04:27:33 -05:00
Dan Stillman
f772a0db7b Fix item tree test on macOS 2021-11-25 03:54:26 -05:00
Dan Stillman
07df7d0dec Fix standalone notes not being added to collections on RDF import
This includes the `Zotero.RDF.getResourceURI()` fix in
zotero/translate@85b39a5be.

This position change here for `this._handleRelated()` for attachments
isn't necessary, since the attachment is already saved and already has
an id, but it's done for consistency with the call for notes (where the
note previously didn't yet have an id).
2021-11-25 00:24:56 -05:00
Tom Najdek
092459dbfc
Mendeley Import: Tests for group annotations
Extended Mendeley Import test to include a scenario where other users
attached an annotation to an item in a group library that also exists
in user's library.
2021-11-15 11:39:57 +01:00
Tom Najdek
7664fedf70
Mendeley Import: Test skipping mismatched annotations 2021-11-15 11:37:34 +01:00
Tom Najdek
f10649483e
Mendeley Import: Add more tests for the importer
Also rephrased a comment in the importer code and renamed tests file
to mendeleyImportTest.js for consistency.
2021-11-15 11:19:19 +01:00
Dan Stillman
f5eb99ad4c Upload settings in batches of 250
Closes #2000
2021-11-07 23:46:54 -05:00
Abe Jellinek
cd3304e16c
Don't reset isRead when feed item metadata changes (#2215)
This prevents metadata changes from clearing the isRead status of feed
items as long as GUIDs remain constant. Previously, feed items with
randomized properties (like URLs generated dynamically each time the
feed is served) would be incorrectly marked as unread on every update.
2021-11-05 23:16:12 -04:00
Abe Jellinek
2cf436c67d
Async web translation (#2229) 2021-11-05 23:12:37 -04:00
Tom Najdek
7940915bb0
Fix arXiv ID not imported. Fix #2236. (#2238)
Mendeley online schema uses "arxiv", local DB uses "arxivId" hence it
was skipped. This commit adds mapping and a test.
2021-11-04 15:32:35 -04:00
Tom Najdek
882ecc205e
Mendeley import: Remove code to patch after earlier imports (#2234)
Fixes #2233, Mendeley import: Invalid-field-for-type error
2021-11-03 23:32:36 -04:00
Tom Najdek
a08c3dee14
Add tests for Zotero.File.download #2216
This test covers couple of scenarios downloading a 16MB file from a
local http server (simple and concurrently) using Zotero.File.download.

When running current implementation, this seems to fail persistently.

In real-world usage, current implementation seems to work
intermittently, failing more often for larger files.

This intermittent behaviour is most likely cause of #2216.
2021-10-02 00:39:09 +02:00
Dan Stillman
647afbb089 Update related box if related items are renamed or deleted 2021-09-14 01:50:58 -04:00
Dan Stillman
c5d89f6d07 Temporarily disable a tree test
Triggered by 4fa7070a31, but I think it's just a problem with
`ensureRowsAreVisible()` in the HTML tree
2021-08-31 07:27:49 -04:00
Dan Stillman
952663de73 Fix failing repo notice tests 2021-08-29 04:41:52 -04:00