Commit graph

1368 commits

Author SHA1 Message Date
Adomas Ven
ba06db2e19 Remove firefox-zotero IPC pipe and switching code (#2990) 2023-02-24 02:11:17 -05:00
Adomas Ven
cfbfcf20bf 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-02-10 10:26:49 +02:00
Dan Stillman
3813456e2b Fix some lint errors in Zotero.Retractions 2023-02-10 01:55:18 -05:00
Dan Stillman
bac87cbc42 Detect retractions for DOIs with capital letters
https://forums.zotero.org/discussion/102745/retraction-watch-not-working
2023-02-10 01:55:12 -05:00
Dan Stillman
6a1f0251cd 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:20:07 -05:00
Abe Jellinek
fc8a037d12 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:37:15 -05:00
Abe Jellinek
e46ffaf84b Add /connector/request endpoint 2022-12-23 21:37:15 -05:00
Adomas Venčkauskas
e59bcd2b64 Link Mendeley citations in documents to imported items. Closes #2622 2022-11-29 16:27:19 +02:00
Dan Stillman
76f2f0c783 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 c3ee588bf
2022-11-28 04:34:49 -05:00
Adomas Venčkauskas
f98ab3b0a6 Import URL from XPCOM code instead of relying on window for Proxy code
Also fix other failing proxy tests. Closes #2928
2022-11-22 15:58:49 +02:00
Adomas Venčkauskas
7e4e66b54d Fix proxy test 2022-11-22 15:51:54 +02:00
Dan Stillman
7ffc509ee6 Fix response content type in Find Available PDF test 2022-11-21 01:14:07 -05:00
Dan Stillman
c6df0b586c Use clearer name for Find Available PDF tests 2022-11-21 01:14:07 -05:00
Dan Stillman
b5862ba780 Handle relative PDF links when using custom PDF resolver 2022-11-21 01:14:07 -05:00
Abe Jellinek
74492e40c4
Improve bidi & RTL support (#2415)
- Render cell text in its native direction
- Fix context menu positioning
- Fix item box (localizations needed)
- Fix column resizing
- Fix bidi text in collection tree
- Always right-align in RTL, always left-align in LTR.
  I'm going off advice from this excellent guide for RTL website design
  by Ahmad Shadeed: https://rtlstyling.com/posts/rtl-styling#tables
- Join creators in the tree ("Smith and Jones") using a format string to
  support languages like Arabic and Hebrew where there shouldn't be a
  space after the "and".
- Fix tabs
- Fix toolbar on Mac, flip icons on other platforms
2022-11-20 18:23:17 -05:00
Abe Jellinek
b6591dba5a
Make Feeds row into a selectable global view of feed items (#2800) 2022-11-14 16:55:28 -05:00
Adomas Venčkauskas
56229136be Adjust tests to not use the dotsToHyphens proxy option 2022-11-10 12:46:14 +02:00
Dan Stillman
8e59e49d29 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:44:31 -04:00
Dan Stillman
9869eb4bc8 Restore cell.csl for style tests
Removed in a28908f0b4
2022-10-27 05:07:46 -04:00
Dan Stillman
3a77eb85ed Don't match all attachments with annotations for "not" search conditions
Fixes #2867
2022-10-27 03:46:18 -04:00
Adomas Venčkauskas
0d1b194b6b Add an integration test for citation merging 2022-10-25 14:50:22 +03:00
Adomas Venčkauskas
19558a425b Fix wrong given name disambiguation after editing author for citeproc-js
Closes #2870
2022-10-25 14:50:05 +03:00
Adomas Venčkauskas
a28908f0b4 Change integration test citation style to APA and some refactoring 2022-10-25 14:50:05 +03:00
Adomas Venčkauskas
87a567122e Fx102: Fix Integration tests 2022-10-25 13:48:39 +03:00
Abe Jellinek
c1bb910d1c
Clear sync error and start sync after logging in in prefs (#2802)
Also fixes an existing error due to an argumentless call to
Zotero.Sync.Runner.updateIcons() in ZoteroPane.
2022-10-16 15:47:54 -04:00
Martynas Bagdonas
81c6c8deff Add annotation update test to pdf-reader tests 2022-10-13 02:20:42 -04:00
Abe Jellinek
5f9e8f5b7e Automatically relink attachments from LABD (#2374)
Fixes #2092
2022-10-10 10:38:43 -04:00
Martynas Bagdonas
ecd0e50ac4 Tweak pdf-reader annotation creation test 2022-10-10 17:06:00 +03:00
Martynas Bagdonas
3a26f6eb6f Add pdf-reader annotation creation test
(cherry picked from commit af436d34a8)
2022-10-10 16:56:17 +03:00
Tom Najdek
223f44fdfd Map annotation colors colors on import #2819 (#2822) 2022-09-12 19:58:21 -04:00
Dan Stillman
a63c634e3f 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-12 15:54:03 -04:00
Dan Stillman
e81b43be98 Add collectionID option to EditorInstance.createNoteFromAnnotations()
For adding a standalone note to the current collection
2022-09-12 15:54:03 -04:00
Dan Stillman
39e45221b1 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-12 15:54:03 -04:00
Dan Stillman
497d6376c8 Add Zotero.Item::topLevelItem and Zotero.Items.getTopLevel(items) 2022-09-12 15:54:03 -04:00
Martynas Bagdonas
f70ec29881 EditorInstance.createNoteFromAnnotations(): Handle multiple attachments 2022-09-12 15:54:03 -04:00
Abe Jellinek
5d6ad703c1 Preferences: Fix tests, improve clarity, and more
- Fix sync and advanced preferences tests; use a new waitForFirstPaneLoad()
  functions instead of the old paneload event listener
- Remove empty preferences_searchTest.js
- Rename some Zotero_Preferences members/functions for better clarity and
  public/private differentiation
- Reorder, also for clarity
- Fix tabIndex parameter causing an error if invalid
- Remove window.sizeToContent() call in Sync.displayFields()
    - So *that's* why the window resized every time the sync pane was loaded...
- Deprecate openURL() and simplify openInViewer()
2022-09-02 11:01:37 -04:00
Dan Stillman
00b24f85c9 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:46:58 +02:00
Abe Jellinek
63864f2f86
duplicateAndConvertSelectedItem: Don't copy abstracts (#2799) 2022-08-29 16:15:31 -04:00
Dan Stillman
170f1962ad Don't repeatedly upload relations
Fixes #2772
2022-08-22 01:15:21 -04:00
Dan Stillman
5103d904f3 Include proper test for b373291c02 for #2771 2022-08-19 12:05:30 -04:00
Dan Stillman
e9e1add9b8 Fixed filed items with annotations appearing in Unfiled Items
Fixes #2771

Regression from 20c6fe67
2022-08-19 12:05:30 -04:00
Abe Jellinek
22b00c33de 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-19 09:14:24 -04:00
Dan Stillman
d3d6a6be48 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 03:35:54 -04:00
Dan Stillman
c3ee588bfe 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-17 03:35:28 -04:00
Dan Stillman
6cd1a41a32 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-16 06:09:00 -04:00
Dan Stillman
676abca671 Fix importing of standalone attachments
Maybe has been broken for years?

https://forums.zotero.org/discussion/99020/warning-data-loss-when-exporting-collections
2022-08-13 16:24:14 -04:00
Dan Stillman
d546caca4c Don't relate book sections to each other when creating from book
Fixes #2757
2022-08-13 05:46:04 -04:00
Dan Stillman
344a10421a Fix copying of standalone attachments between libraries
Regression in f684984b07 (maybe a race condition)
2022-08-13 02:04:07 -04:00
Dan Stillman
c90f8415b3 Improve test for event-title substitution
And add comments

Follow-up to 20d0f103f
2022-08-11 03:57:25 -04:00
Dan Stillman
ebacb83563 Reset Zotero.locale to 'en-US' after cite test 2022-08-11 03:57:20 -04:00