Dan Stillman
5b0f02a12b
Trigger auto-sync after item deletion
...
It looks like this has been broken for years.
2021-05-14 03:49:26 -04:00
Dan Stillman
6d5b00e94c
Fix descendant collections not skipping delete log
...
If a collection was deleted with `skipDeleteLog: true`, descendant
collections still ended up in the delete log, which could cause
constant "Reset Group and Sync" prompts.
https://forums.zotero.org/discussion/89485/warning-when-syncing-group-library
2021-05-06 03:34:09 -04:00
Dan Stillman
76d8818bed
Don't count missing annotation values as changed if empty string passed
...
Similar to 0d377a1c4a
, this fixes an unnecessary annotation reload and
loss of unsaved typing on auto-sync immediately after an annotation is
created.
2021-04-26 03:49:59 -04:00
Dan Stillman
0d377a1c4a
Clear changed state of annotation after saving color change
...
This was resulting in an extra 'modify' event after each sync upload.
2021-04-24 19:49:08 -04:00
Dan Stillman
749e28dc1f
Fix alphabetical sorting of child attachments in new databases
...
Broken after global schema introduction
2021-04-18 01:44:39 -04:00
Dan Stillman
52932b6eb0
Reduce auto-sync timeout to 3 seconds and optimize auto-sync process
...
Reduce timeout after an object change from 15 seconds to 3 seconds,
ecxept for individual notes. We should probably kick off an auto-sync
3 seconds after a note is blurred, but that's not implemented.
We also now skip file syncing and full-text content syncing altogether
unless an attachment has changed.
Reindexing an item now kicks off auto-sync, whereas before it didn't.
2021-04-06 05:09:42 -04:00
Martynas Bagdonas
20022a5d7c
Properly check schema version in note editor tests
2021-04-02 21:57:35 +03:00
Dan Stillman
26bf507fe2
Throw invalid-data error on unknown annotation type
2021-04-01 05:52:14 -04:00
Dan Stillman
31d095fb42
Add test for citeproc-js disambiguation hang
...
https://github.com/Juris-M/citeproc-js/issues/179
2021-03-29 01:41:37 -04:00
Dan Stillman
5e9636089d
Fix primary item types not appearing in More menu when not in MRU list
...
Regression in 1c366de54
2021-03-29 01:41:37 -04:00
Dan Stillman
8c341f2e26
Add field name to assertion in annotation clone test
2021-03-23 03:20:33 -04:00
Dan Stillman
dc12a2c95a
Stop file upload queue after low-quota errors
...
We weren't making actual upload requests after a quota error if the file
would exceed the quota, but we were still going through all attachments
to upload, which in some cases involves making stat() calls. We now just
stop the queue immediately after a quota error or when starting a new
background sync after a previous quota error.
Closes #1255
2021-03-23 03:20:26 -04:00
Dan Stillman
8f7afb4a57
Fix Zotero.automatedTest in GitHub Actions
...
$TRAVIS → $CI
Some tests were being run that should be skipped
2021-03-21 17:39:49 -04:00
Dan Stillman
b566c06f93
Add getImageBlob() support function for tests
2021-03-21 14:36:43 -04:00
Dan Stillman
06b28194da
Show annotation widget in conflict resolution window
...
This adds a very basic reimplementation of the annotation widget for use
in the CR window. It's not pixel-perfect, but it's close enough that
most people probably won't notice. We'll want to replace this with a
real version that's shared between the PDF reader and the rest of the
codebase.
Image annotations currently show an "[image not shown]" placeholder.
Showing images is tricky: we don't have the remote cache image, so if
the remote position has changed, we could only show an image by
rendering it from the file, and only if the file itself hasn't changed.
Just for a better user experience, we could use the local image as long
as the position and file are both the same, but that would take some
rejiggering of the CR window.
Tags aren't shown because they're not shown for CR at all, though that
could be changed in the future.
2021-03-21 14:36:43 -04:00
Dan Stillman
7889cd5d39
Fix item.clone() on annotation items
2021-03-21 14:36:42 -04:00
Dan Stillman
0bc6b2ccc6
Transfer annotations when converting linked files to stored files
...
Previously, any annotations on the linked file were partially deleted,
leaving broken `items` rows without `itemAnnotations` rows.
2021-03-12 06:35:21 -05:00
Dan Stillman
24cc59cc7e
Compress single-file HTML attachments and other text files
...
The test for ZIP uploads was having multiple files, but now snapshots
are all single files.
2021-03-10 09:37:52 -05:00
Dan Stillman
2cea1a50f5
Fix Translate.ItemGetter test
...
All we care about is whether annotations were excluded, so don't bother
counting all items.
2021-03-03 09:08:08 -05:00
Dan Stillman
8c1f10c782
Fix additional sync test after format=json
removal
2021-03-03 08:53:28 -05:00
Dan Stillman
903fc4d9a7
Fix another cause of syncEventListener test failure
2021-03-03 08:39:45 -05:00
Dan Stillman
e8b19934e2
Fix pref setting in syncEventListener tests
...
Prefs are reset after every test
2021-03-03 07:15:48 -05:00
Dan Stillman
9204e18ee3
Fix sync test after removing format=json
from syncAPIClient
2021-03-03 06:42:08 -05:00
Dan Stillman
914f86839c
Fix test failure in libraryTreeView after items test
2021-03-03 06:23:54 -05:00
Dan Stillman
92a073314a
Enable PDF reader pref for tests
2021-03-03 05:52:57 -05:00
Dan Stillman
79950ecfe5
Exclude annotations from library export
...
We'll want to support this eventually, but for now they would just break
translation.
2021-03-02 18:10:44 -05:00
Dan Stillman
2d2062a63d
Block saving of annotations and embedded images in groups
...
Both should already be disabled via the UI, but just in case there's
some way they sneak through
2021-03-02 18:10:44 -05:00
Adomas Venčkauskas
0fc9037a54
Add a version of citation dialog for citing notes
2021-03-02 18:10:44 -05:00
Dan Stillman
73ba5f9ffe
Auto-sync after setting change
2021-03-02 18:10:44 -05:00
Dan Stillman
77ea19277d
Remove embedded-image attachment under annotation in test
2021-03-02 18:10:44 -05:00
Dan Stillman
651aabc4dc
Prevent setting parent item to non-regular item
...
Except for embedded-image attachments under notes and annotations under
attachments
2021-03-02 18:10:44 -05:00
Dan Stillman
8b57d0000b
Don't orphan embedded-image attachments in schema integrity check!
2021-03-02 18:10:44 -05:00
Dan Stillman
eb865e2625
setAttachmentPageIndex() → setAttachmentLastPageIndex()
2021-03-02 18:10:44 -05:00
Dan Stillman
c8ee3196cd
Replace attachmentPageIndex with synced-setting-based mechanism
...
The page index needs to be per-person in group libraries, and it should
still work in read-only libraries, so it doesn't make sense to store it
on the item. This uses a synced setting in the user's library instead.
2021-03-02 18:10:44 -05:00
Dan Stillman
4a4a54da7b
Clear annotation change state after save
2021-03-02 17:58:28 -05:00
Dan Stillman
98f9a99126
Fix annotation tests after adding isExternal to annotation JSON
2021-03-02 17:58:28 -05:00
Dan Stillman
9f954488c6
Delete cache image when image annotation position changes
2021-03-02 17:58:28 -05:00
Dan Stillman
89d9efdec7
Use seconds instead of ms for attachmentLastProcessedModificationTime
2021-03-02 17:58:28 -05:00
Dan Stillman
88f886cb30
Don't delete all annotations when updating attachment item
2021-03-02 17:58:28 -05:00
Dan Stillman
857b413df1
Don't add non-syncing items to sync delete log
...
Currently just external annotations
2021-03-02 17:58:28 -05:00
Dan Stillman
226fc90308
Switch to cache files for image annotations
...
Instead of embedded-image attachments
Create with Zotero.Annotations.saveCacheImage({ libraryID, key }, blob)
2021-03-02 17:58:28 -05:00
Dan Stillman
8c464a7a8b
Add options
argument for Zotero.File.createDirectoryIfMissingAsync()
...
To allow passing 'from' argument through to OS.File.makeDir()
2021-03-02 17:58:28 -05:00
Dan Stillman
ebc0ca2462
Add annotationIsExternal
property to annotations
2021-03-02 17:58:28 -05:00
Martynas Bagdonas
5266734ac9
Fix note editor tests
2021-03-02 17:58:28 -05:00
Dan Stillman
1f2408a9c5
Fix ZFS tests after removing format=json
from syncAPIClient
2021-03-02 17:58:28 -05:00
Dan Stillman
0fe6e3d055
Fix some test breakages related to .note/.getNote() changes
2021-03-02 17:58:28 -05:00
Dan Stillman
9997ece0d2
Fix annotation tests for recent changes
2021-03-02 17:58:28 -05:00
Dan Stillman
55c6de23ba
Add "Include Annotations" checkbox to export options dialog
...
This changes the attachment saveFile() function in translators to be
async. In order for errors to be properly caught, translators will need
to be changed to make doExport() async and await on saveFile() calls.
(The translation architecture theoretically already allows doExport() to
be async.)
2021-03-02 17:58:28 -05:00
Dan Stillman
b1e324ddfb
Fix marking of childItems as loaded for non-top-level items
...
Now that attachments and notes can have child items too
2021-03-02 17:58:28 -05:00
Dan Stillman
6ee3863e37
Fix clearing of annotation fields
2021-03-02 17:58:28 -05:00