Commit graph

1211 commits

Author SHA1 Message Date
Dan Stillman
42a4649420 Add Dataset and Standard item types
zotero/zotero-bits#22
zotero/zotero-bits#52
2023-03-23 01:37:29 -04:00
Dan Stillman
b298a48cda Better way of skipping migration of Place and Date from Extra
Or at least a way that we already have built-in and that only applies to
the call in `Zotero.Item::migrateExtraFields()`. This doesn't
distinguish between CSL fields (`publisher-place`, `event-place`,
`issued`) and actual Zotero field, and we really only need to skip
the former, but it's fine.

Follow-up to 8a1dd3637, related to #3030
2023-03-21 06:29:50 -04:00
Dan Stillman
8a1dd3637c Temporarily disable extracting Issued from Extra
Until we can parse ranges in the Date field. See #3030.

citeproc-js will still use it (which is the point).
2023-03-21 05:55:08 -04:00
Tom Najdek
c57c3c470e
Mendeley importer: Fix issue with empty tags (#3018)
Also adds a test for this particular case and for importing tags in
general.
2023-03-09 16:13:19 -05:00
Tom Najdek
a1d06066b2
Mendeley importer: Fix issue with empty creators (#3016)
It does not appear to be possible to create a creator with no values in
Mendeley, however we got reports of these causing the imports to fail.
This tweak makes the importer more resilient by discarding empty/invalid
creators.
2023-03-07 19:40:42 -05:00
Adomas Ven
0f9024dc98
Remove firefox-zotero IPC pipe and switching code (#2990) 2023-02-13 19:18:40 -05:00
Dan Stillman
bbf72bfbcf Fix some lint errors in Zotero.Retractions 2023-02-05 21:50:29 -05:00
Dan Stillman
b924720a2d Detect retractions for DOIs with capital letters
https://forums.zotero.org/discussion/102745/retraction-watch-not-working
2023-02-05 21:50:29 -05:00
Adomas Ven
0ffe3122c2
Refactor l10n code. Remove use of react-intl. (#2975)
Strings from .dtd files are now accessible from Zotero.getMessage
as the eventual move to Fluent would remove their distinction.
2023-01-17 15:59:19 -05:00
Dan Stillman
21777af980 Fix incorrect retries if multiple HTTP.request() calls get 500s
https://forums.zotero.org/discussion/comment/425814/#Comment_425814

The passed intervals array was modified, so after a request() got a 500,
subsequent calls would start with longer delays and eventually start
retrying immediately.
2023-01-11 02:32:39 -05:00
Dan Stillman
7e61be9799 Disable /connector/request tests from 86c56951df
Until we restore the new header handling
2022-12-25 04:01:35 -05:00
Dan Stillman
0862e1e1bc Revert "Zotero.HTTP.request(): Process headers case insensitively"
This reverts commit f6dd47dd1f.

I shouldn't have cherry-picked this from fx102.
2022-12-24 03:55:15 -05:00
Abe Jellinek
f6dd47dd1f Zotero.HTTP.request(): Process headers case insensitively
Using the Headers class from the Fetch API.

Before, the added test would fail: `_requestInternal()`, not finding a header
named `Content-Type` (case sensitive), would set it to
`application/x-www-form-urlencoded`. XMLHttpRequest, upon being given both
`content-type`: `application/json`) and `Content-Type`:
`application/x-www-form-urlencoded`, would helpfully merge the two, producing
`content-type`: `application/json, application/x-www-form-urlencoded`. That's
obviously not the correct behavior.
2022-12-23 21:42:36 -05:00
Abe Jellinek
86c56951df Add /connector/request endpoint 2022-12-23 21:42:36 -05:00
Tom Najdek
91c385a67a Add option to Mendeley importer to relink items
New option only appears if importer version is < 1 or not present.
It will:
    * Skip fetching collections and attachments
    * Skip any new items
    * Update relations on existing items
2022-12-17 04:31:55 -05:00
Adomas Venčkauskas
3d8bbb3e55 Link Mendeley citations in documents to imported items. Closes #2622 2022-11-29 16:27:36 +02:00
Dan Stillman
f33cf1cde3 Don't show items with annotated attachments after moving to trash
https://forums.zotero.org/discussion/100775/deleted-items-keep-reappearing-in-my-library

Regression from 20c6fe67
2022-11-28 04:30:50 -05:00
Adomas Venčkauskas
2db90511f9 Import URL from XPCOM code instead of relying on window for Proxy code
Also fix other failing proxy tests. Closes #2928
2022-11-21 11:51:18 +02:00
Adomas Venčkauskas
8135895313 Fix proxy test 2022-11-21 11:28:52 +02:00
Dan Stillman
89bc094690 Fix response content type in Find Available PDF test 2022-11-16 18:35:31 -05:00
Dan Stillman
1a1c08890f Use clearer name for Find Available PDF tests 2022-11-16 18:35:31 -05:00
Dan Stillman
a48e0f2437 Handle relative PDF links when using custom PDF resolver 2022-11-16 18:35:31 -05:00
Tom Najdek
d131fe3dc9
Mendeley Import: Auth using direct login
* Importer will now ask user for a login and password via form and will perform sign-in directly
  using credentials rather than oauth
* Signing in this way enables importer to obtain desktop document ID which is now stored for each
  item
* It's possible to switch back to the old method (ouath) by setting `import.mendeleyUseOAuth` pref
  to `true`.
* New option to only import new items. This options only appears if database contains previously
  imported items.
* Importer will now update mendeleyDB:documentUUID on existing items to match value used in Mendeley
  Desktop if available
* Importer will no longer create collections when no new items are imported
* Importer will only report number of new items imported on re-import
* Importer will now preserve dateAdded on re-import

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2022-11-13 12:47:29 +01:00
Adomas Venčkauskas
378d8180e8 Adjust tests to not use the dotsToHyphens proxy option 2022-11-10 12:46:40 +02:00
Martynas Bagdonas
6bc1551f7f Increase wait time for pdf-reader iframe initialization in tests
This is necessary until a proper initialization promise is added to pdf-reader.
2022-10-31 18:03:42 +02:00
Dan Stillman
5cea183ae3 Avoid infinite/excessive loops in Find Available PDF
https://forums.zotero.org/discussion/100634/potential-infinite-loop-when-trying-to-find-available-pdf

Closes #2883
2022-10-30 04:53:09 -04:00
Dan Stillman
fe09afa0a6 Restore cell.csl for style tests
Removed in 4e1754b960
2022-10-26 05:14:47 -04:00
Adomas Venčkauskas
7db16843b3 Add an integration test for citation merging 2022-10-25 14:55:19 +03:00
Adomas Venčkauskas
a4eafd0307 Fix wrong given name disambiguation after editing author for citeproc-js
Closes #2870
2022-10-25 14:55:16 +03:00
Adomas Venčkauskas
4e1754b960 Change integration test citation style to APA and some refactoring 2022-10-25 14:55:16 +03:00
Dan Stillman
2b9e9c174f Don't match all attachments with annotations for "not" search conditions
Fixes #2867
2022-10-17 23:59:29 -04:00
Martynas Bagdonas
78eb857e73 Add annotation update test to pdf-reader tests 2022-10-11 18:07:03 +03:00
Martynas Bagdonas
7bada8ce0c Tweak pdf-reader annotation creation test 2022-10-10 17:09:30 +03:00
Martynas Bagdonas
af436d34a8 Add pdf-reader annotation creation test 2022-10-10 16:53:42 +03:00
Abe Jellinek
fb4f7b7932 Automatically relink attachments from LABD (#2374)
Fixes #2092
2022-10-08 02:29:31 -04:00
Tom Najdek
88217492f9
Map annotation colors colors on import #2819 (#2822) 2022-09-12 19:57:24 -04:00
Dan Stillman
66fccec6b4 Add "Create Note from Annotations" option to items list context menu
To allow creation of a standalone note with annotations from all the
selected top-level items and/or attachments. Annotations will be sorted
by the order of the items in the items list.

"Add Note from Annotations" remains when a single regular item or one or
more attachments under a single regular item are selected.
2022-09-05 10:37:07 -04:00
Dan Stillman
894309d061 Add collectionID option to EditorInstance.createNoteFromAnnotations()
For adding a standalone note to the current collection
2022-09-05 10:37:07 -04:00
Dan Stillman
b24c7577ec Rename Zotero.Items::keepParents() to keepTopLevel()
So that it works for more than two levels of items

Also fix a bug where the parent item could be returned more than once if
multiple child items were selected.
2022-09-05 10:37:07 -04:00
Dan Stillman
ca4ced1e9f Add Zotero.Item::topLevelItem and Zotero.Items.getTopLevel(items) 2022-09-05 10:37:07 -04:00
Martynas Bagdonas
6646be66d0 EditorInstance.createNoteFromAnnotations(): Handle multiple attachments 2022-09-05 10:37:07 -04:00
Dan Stillman
91ae576074 Fix HTTP.request() 5xx handling with errorDelayMax=0
This was causing delay-less infinite loops for OPTIONS requests to Box,
which are returning 502 errors.
2022-08-29 23:44:55 +02:00
Abe Jellinek
c255104ada duplicateAndConvertSelectedItem: Don't copy abstracts (#2799) 2022-08-29 16:27:26 -04:00
Dan Stillman
f4dfea6849 Don't repeatedly upload relations
Fixes #2772
2022-08-22 01:12:31 -04:00
Dan Stillman
8379540719 Include proper test for b373291c02 for #2771 2022-08-19 02:47:24 -04:00
Dan Stillman
b373291c02 Fixed filed items with annotations appearing in Unfiled Items
Fixes #2771

Regression from 20c6fe67
2022-08-19 00:15:55 -04:00
Abe Jellinek
3391f3bc99
Empty Trash: Visually remove deleted items, refresh icon (#2606)
There were a few problems causing the incorrect behavior:
1. Rows were being removed only if they had no non-deleted children, which
   wasn't the right check. We want to remove all rows with no *deleted*
   children.
2. Children of the removed rows weren't being removed with them.
3. We weren't invalidating the tree (which _removeRows() doesn't do).

Also:

* Erase trashed annotation after getAnnotations() test

Because ItemTree#notify() doesn't yet correctly handle refresh events on
parent items that are themselves children (three-level nesting: item ->
attachment -> annotation), this test was causing a failure in
itemTreeTest.js.
2022-08-18 21:14:34 -04:00
Dan Stillman
f368a53311 Fix and disable item-tree test for emptying trash
20c6fe6737 caused this to start failing, but only because the test was
testing something too specific. The change in that commit caused more
rows to be left behind when emptying the trash (for reasons I should
probably look into), but the trash wasn't being emptied properly before,
which #2606 should fix. This test should be restored as part of that PR.
2022-08-17 01:53:21 -04:00
Dan Stillman
20c6fe6737 Match parent attachments for annotation tags
Expose annotation tags in tag selector and match parent attachments when
filtering/searching

This also fixes searching for annotation text or comments when using
Everything quick search.

This is temporary until we display annotations in the items list
directly.
2022-08-16 22:56:39 -04:00
Dan Stillman
85b0c9dbad Fix importing of standalone attachments without URLs
And allow `importSnapshotFromFile()` without `parentItemID` or
`libraryID`, which is more consistent with other attachment functions

Follow-up to 318e4852e9

https://forums.zotero.org/discussion/comment/414802/#Comment_414802
2022-08-14 05:06:27 -04:00