Commit graph

580 commits

Author SHA1 Message Date
Dan Stillman
3f371f1cad Update translators 2022-05-09 09:26:43 -04:00
Abe Jellinek
5196ba379b
Update typeSchemaData and builder script (#2576) 2022-04-28 02:12:29 -04:00
Dan Stillman
9b81e73906 Update translators 2022-04-21 15:46:50 -04:00
Adomas Ven
7b0d6951d2
Update csl validator for CSL 1.0.2 (#2493) 2022-04-19 18:42:48 -04:00
Adomas Venčkauskas
0f2273ea43 Link to manual word plugin installation instructions on install failure.
Closes #2444
2022-03-23 11:12:42 +02:00
Dan Stillman
afeb6afecf Update translators 2022-03-21 06:33:58 -04:00
Dan Stillman
555c937957 Update translators 2022-03-16 20:45:18 -04:00
Dan Stillman
ad74a28f1a Update translators 2022-03-15 07:43:11 -04:00
Dan Stillman
053d6a0116 Add Preprint item type
See zotero/zotero-bits#88
2022-03-05 02:03:29 -05:00
Dan Stillman
0089794810 Update translators 2022-03-02 22:36:45 -05:00
Abe Jellinek
5409ae3313 Overhaul Scaffold (#2293) 2022-03-02 22:36:04 -05:00
Dan Stillman
706233c974 Sync reminders changes (#2354)
- Adjust text
- Add "Learn More" button with link to sync documentation for
  set-up-sync notification
- Show "Don't Show Again" for set-up-sync even on first display
- Don't perform any action when clicking unlinked text
- Use yellow/orange background instead of blue for notification bar
- Prevent text from wrapping out of the bar at narrow window widths
- Use local variable for observer id
2022-03-02 05:20:34 -05:00
Dan Stillman
ca3fd80825 Remove use of Promise.tap() from Bluebird and our own Promise.check() 2022-02-21 15:46:23 -05:00
Dan Stillman
7700cd776a Repeat itemAnnotations schema update step after 078e3bb079 2022-02-21 15:13:38 -05:00
Dan Stillman
fac8d55002 Update submodules 2022-02-19 13:53:03 -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
6e0bc58052 Upgrade to React 17
And update other React dependencies
2021-12-23 01:18:22 -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
63a0452a77 Update submodules 2021-12-15 01:55:36 -05:00
Adomas Venčkauskas
d03c495563 Update SingleFile to the latest version 2021-11-19 14:22:45 +02:00
Martynas Bagdonas
3ed23e5cce Fix PDFRenderer ink annotations rendering 2021-10-26 15:02:12 +03:00
Martynas Bagdonas
d1322bd4b6 Improve PDFRenderer efficiency and add support for ink annotations 2021-10-25 12:46:12 +03:00
Dan Stillman
9432cb7e72 Update translators 2021-10-14 04:53:02 -04:00
Dan Stillman
4cfa230508 Add module import shim for 'zotero/filePicker' for plugins
Changed to 'zotero/modules/filePicker' in af597d943b, but a lot of
plugins haven't yet been updated
2021-09-18 06:57:35 -04:00
Adomas Venčkauskas
af597d943b Move js-tree files out from /containers subfolder 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
cbbff600a6 XUL -> JS tree megacommit
- Just a single huge commit. This has been developed over too long a
time, required many tiny changes across too many files and has seen too
many iterations to be separated into separate commits.
The original branch with all the messy commits will be kept around for
posterity
bb220ad0f2...adomasven:feature/react-item-tree
- Replaces XUL <tree> element across the whole zotero client codebase
with a custom supermegafast virtualized-table inspired by
react-virtualized yet mimicking old XUL treeview API. The
virtualized-table sits on top on a raw-to-the-metal,
interpreted-at-runtime JS based windowing solution inspired by
react-window. React-based solutions could not be used because they were
slow and Zotero UI needs to be responsive and be able to
display thousands of rows in a treeview without any slowdowns.
- Attempts were made at making this screen-reader friendly, but yet to
be tested with something like JAWS
- RTL-friendly
- Styling and behaviour across all platforms was copied as closely as
possible to the original XUL tree
- Instead of row-based scroll snapping this has smooth-scrolling. If
you're using arrow keys to browse through the tree then it effectively
snap-scrolls. Current CSS snap scroll attributes do not seem to work in
the way we would require even on up-to-date browsers, yet alone the ESR
version of FX that Zotero is on. JS solutions are either terrible for
performance or produce inexcusable jitter.
- When dragging-and-dropping items the initial drag freezes the UI for
a fairly jarring amount of time. Does not seem to be fixable due to
the synchronous code that needs to be run in the dragstart handler.
Used to be possible to run that code async with the XUL tree.
- Item tree column picker no longer has a dedicated button. Just
right-click the columns. The column preferences (width, order, etc) are
no longer handled by XUL, which required a custom serialization and
storage solution that throws warnings in the developer console due to
the amount of data being stored. Might cause temporary freezing on HDDs
upon column resize/reorder/visibility toggling.
- Context menu handling code basically unchanged, but any UI changes
that plugins may have wanted to do (including adding new columns) will
have to be redone by them. No serious thought has gone into how plugin
developers would achieve that yet.
- Opens up the possibility for awesome alternative ways to render the
tree items, including things like multiple-row view for the item tree,
which has been requested for a long while especially by users switching
from other referencing software
2021-08-21 06:58:12 -04:00
Dan Stillman
0f96c20f3c Fix several possible DB upgrade errors from 4.0 to 5.0
- We were updating global schema before migrating userdata, but a 4 → 5
  upgrade involved a system.sql version bump, which wiped out itemTypes,
  causing 'annotation' to not exist after the upgrade. This moves global
  schema updates after userdata migration and bumps the global schema
  version to repair DBs that were already upgraded and broken.

- A system.sql bump without a global schema update would result in empty
  tables. This moves the global-schema-related tables to userdata.sql.

- The DB integrity check before userdata updates added in 5b9e6497a
  could fail when coming from an older DB, because the checks assume
  current schema. An integrity check is now done after a userdata update.
  (We were already skipping the new table/index reconciliation stuff. If
  old DBs are discovered to have problems that would cause a migration
  step to fail, we'll fix those explicitly in the steps.)

Also:

- Make sure `version` is `versionNumber` in the `fields` table. It was
  changed with a system.sql bump in 5.0, but hard-coded fields were later
  removed from system.sql in favor of schema.json, meaning that anyone who
  upgraded from 4.0 after that would never have `version` removed and so
  would have both fields (one from before and one from schema.json).
2021-08-17 00:41:59 -04:00
Dan Stillman
ee2b63bf18 Update submodules 2021-08-06 16:56:31 -04:00
Dan Stillman
a5902fc466 Update translators 2021-07-22 02:17:35 -04:00
Dan Stillman
1c61c86801 Update translators 2021-07-07 01:45:11 -04:00
Adomas Venčkauskas
3199d23d09 Fix word plugin state display in the Pref dialog 2021-06-25 10:36:45 +03:00
Martynas Bagdonas
814cbc0ee3 Introduce spell checker context menu and dictionaries managing 2021-06-23 19:25:46 -04:00
Dan Stillman
7a4b27e774
Merge pull request #2071 from jryans/feed-processor
Import feed processor
2021-06-17 03:27:36 -04:00
J. Ryan Stinnett
2bd4904ead Add DOMParser-based XML reader
This adds a `DOMParser`-based XML reader which emits events like a SAX XML
reader for compatibility with the feed processor.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
29ebaa5ec6 Assume fetch-based API for feed processsing
This converts the feed processor to expect a `fetch`-based API instead of an
XPCOM stream.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
1d93296481 Convert feed processor to HTML attribute manipulation
This moves the feed processor away from custom XPCOM SAX attributes and over to
standard HTML attribute map APIs.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
891ba599a6 Convert feed processor parsing to native DOM APIs
This uses native DOM APIs to create document fragments and parse content instead
of XPCOM utils.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
b4303eaa45 Absorb feed processor types from interface
This moves the type constants into code, rather than pulling them from an XPCOM
interface.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
a0694cd8fb Convert feed processor type checks away from XPCOM
This converts the type checks for arrays and interfaces to use native JS
approaches instead of XPCOM.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
a3e6f96289 Remove MIME type description feature from feed processor
This removes the feed processor's feature of converting enclosure MIME types to
a textual type description. This is not used by Zotero and removes an XPCOM
dependency.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
af6029b854 Convert feed processor to native URLs 2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
be80598c6b Convert feed processor data away from XPCOM
This changes the feed processor XPCOM array and property bags to native arrays
and objects.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
bea3b3d3b2 Remove unimplemented registerExtensionPrefix API 2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
9d0e1932dc Convert feed processor structure away from XPCOM
This changes the various components to invoke each other directly as regular
objects without involving XPCOM.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
e120ca7395 Align variable style in feed processor
This tweaks variable naming and related details to match Zotero conventions.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
76873bda95 Approaching readable code in feed processor
This adjusts bracing style and other aesthetics to match Zotero conventions.
2021-06-16 20:59:57 +01:00
J. Ryan Stinnett
a210f1fbde More style alignment for feed processor 2021-06-16 20:59:57 +01:00
Dan Stillman
1daf4b0413 Update locales from Transifex and merge new English strings 2021-05-28 02:58:53 -04:00
Dan Stillman
6be797bc14 Fix additional imported Mendeley annotation color ("#000")
This is going to start redacting people's PDFs until we change the
default opacity.
2021-05-27 05:30:39 -04:00
Dan Stillman
3815197b92 Don't allow site-specific Quick Copy setting without domain
And remove existing blank entry in schema update step

Closes #2053
2021-05-16 05:08:44 -04:00
Dan Stillman
146e1af189 Update submodules 2021-05-14 22:44:33 -04:00
Dan Stillman
7e23cfef96 Fix invalid imported Mendeley annotation color
After fix in 808b71832e

And require annotation colors to be 6-char hex colors going forward
2021-05-14 04:20:50 -04:00
J. Ryan Stinnett
71dc4e9bf9 Convert feed processor indentation to Zotero style
This adjust feed processor indentation to match Zotero conventions for tabs and
continuous indents in blocks.
2021-05-11 10:05:59 +01:00
J. Ryan Stinnett
48a6e90b4f Initial import of feed processor
This imports Mozilla's feed processor which has been removed upstream as part of
Firefox 66. Some changes are likely needed before this will actually run in
Zotero.
2021-05-07 14:02:56 +01:00
Dan Stillman
7065dacee8 Move About pane strings and URLs to ZOTERO_CONFIG 2021-04-19 18:30:21 -04:00
Dan Stillman
76d504c564 Delete child annotations when deleting attachment
And fix a FK definition that could result in orphaned `items` rows
without `itemAnnotations` rows after an attachment was deleted.
2021-03-12 06:35:21 -05:00
Dan Stillman
d98fabc5ab Add annotation type to schema 2021-03-03 03:33:52 -05:00
Martynas Bagdonas
83109fc076 Fix and attach image annotation renderer 2021-03-02 18:12:24 -05:00
Martynas Bagdonas
8d87eeae35 Capitalize acronyms 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
Martynas Bagdonas
a19693fa7a Improve PDF importing and introduce rendering 2021-03-02 17:58:28 -05:00
Dan Stillman
ebc0ca2462 Add annotationIsExternal property to annotations 2021-03-02 17:58:28 -05:00
Dan Stillman
9a41dc69fe Add PDF attachment properties to Zotero.Item
- .attachmentLastProcessedModificationTime
- .attachmentPageIndex
2021-03-02 17:58:27 -05:00
Martynas Bagdonas
de5206d926 Hack in TinyMCE to support selection and links 2021-03-02 17:43:10 -05:00
Dan Stillman
199619f40e Remove .noteSchemaVersion
This leaves item.note in place, rather than reverting all the
`getNote()` → `.note` changes. We can consider which we want to keep.
2021-03-02 17:36:05 -05:00
Dan Stillman
ebc53a2bbc Add noteSchemaVersion, and replace item.getNote() with .note
```
var noteContents = item.note; // was item.getNote()
var schemaVersion = item.noteSchemaVersion;

item.setNote(contents) // default to Zotero.Notes.schemaVersion
item.setNote(contents, schemaVersion) - explicit version
```
2021-03-02 17:36:05 -05:00
Dan Stillman
1c366de546 Initial annotation support 2021-03-02 17:36:05 -05:00
Dan Stillman
8026f744c5 Remove old HTML snapshot annotation support
Any data trapped in these tables hasn't been accessible in many years.
2021-03-02 17:36:04 -05:00
Dan Stillman
b54d4e78b7 Save createdByUserID and lastModifiedByUserID for group items 2021-03-02 17:36:04 -05:00
Dan Stillman
b2b909b42c Update submodules 2021-02-25 18:45:28 -05:00
Dan Stillman
e45ca4edad Support deleted property for collections and searches
This lays the groundwork for moving collections and searches to the
trash instead of deleting them outright. We're not doing that yet, so
the `deleted` property will never be set (except for items), but this
will allow clients from this point forward to sync collections and
searches with that property for when it's used in the future. For now,
such objects will just be hidden from the collections pane as if they
had been deleted.
2021-01-13 00:49:12 -05:00
Dan Stillman
80b8280e9d Update submodules 2021-01-10 14:58:37 -05:00
Fletcher Hazlehurst
36d81e839c Use ace-builds NPM package 2020-12-18 10:45:38 -07:00
Dan Stillman
87352822fa Delay properly on 429 response in syncAPIClient
ConcurrentCaller wasn't waiting properly if start() was called again
while it was pausing, so 429 caused an immediate retry, which is pretty
much exactly what you don't want a 429 to do.
2020-12-11 02:02:20 -05:00
Dan Stillman
07874d84bd
Merge pull request #1909 from fletcherhaz/snapshot
Update SingleFile for bug fixes
2020-11-17 16:02:13 -05:00
Dan Stillman
d5ac87648b Update submodules 2020-11-04 15:04:44 -05:00
Fletcher Hazlehurst
a2620b757d Update SingleFile and fix several bugs
- Using `sandboxPrototype` properly uses window as prototype
- This commit removes the need for our patch in babel-worker.js:
3d0bc4cf9f
- We properly inject into frames in the client if we ever include frames
2020-11-02 17:24:14 -07:00
Dan Stillman
daefc9c0ae Downgrade SingleFile module
4be877ca1e
breaks some things in our hidden browser. They can probably all be fixed
by adding `window.` (e.g., `setTimeout()` → `window.setTimeout()`), but
for now just use the commit before that one.
2020-10-24 01:15:21 -04:00
Dan Stillman
e31fa0b150 Update SingleFile submodule
Fixes resizing issue from
https://forums.zotero.org/discussion/85789/zotero-connector-zooms-web-pages-to-very-small-sizes
in Firefox, though seemingly not in Chrome (#1907)
2020-10-24 00:42:10 -04:00
Dan Stillman
bdc3cfcb97 Remove SingleFileZ submodule
Follow-up to 76ae5d9f59
2020-10-24 00:06:01 -04:00
fletcherhaz
76ae5d9f59
Switch back to SingleFile from SingleFileZ (#1904)
Our SingleFileZ integration would save images inside directories following the
SingleFileZ format. However, Zotero does not support syncing sub-directories of
attachments. This commit switch back to a single HTML file with base64 encoded
resources. We think that the 33% increase in resources will be offset by the
compression of HTML and removal of JavaScript and unused CSS.

This commit does not fix past snapshots that were saved using SingleFileZ.
2020-10-23 19:39:07 -04:00
Dan Stillman
93d3a4be7a Update translators 2020-10-15 17:42:38 -04:00
Dan Stillman
828ec4010e Don't allow items to be set as their own parents, and correct existing 2020-10-14 19:33:46 -04:00
Fletcher Hazlehurst
9b9bafe48e Update SingleFileZ submodule 2020-10-12 17:28:04 -06:00
Dan Stillman
dc41e82833 Update submodules 2020-10-03 17:51:07 -04:00
Dan Stillman
20c8cede4d
Merge pull request #1846 from fletcherhaz/snapshot
Use SingleFile to create snapshots of web pages
2020-09-24 18:08:34 -04:00
Fletcher Hazlehurst
0fba08b3c9 Use SingleFile to create snapshots of web pages 2020-09-23 09:37:09 -07:00
Dan Stillman
fa8e25eaca Update submodules 2020-07-22 18:40:20 -04:00
Dan Stillman
3e8f0af583 Schema upgrade debugging
Include flags in repo update checks indicating whether a database table
that was previously supposed to be removed was removed and whether a new
table was created. This should help us figure out whether we can safely
perform schema update steps or whether we need to figure out why some
schema update steps aren't being applied.
2020-06-21 03:08:03 -04:00
Dan Stillman
c1839596cf Update submodules 2020-06-12 13:50:55 -04:00
Dan Stillman
482b8b6f75 Update locales from Transifex 2020-06-11 04:21:07 -04:00
Dan Stillman
b2c03a9a3e Update submodules 2020-05-18 01:38:59 -04:00
Dan Stillman
b03a49ce33 Update submodules 2020-05-12 17:48:58 -04:00
Dan Stillman
849d52f1bb Update submodules 2020-05-09 03:20:53 -04:00
Dan Stillman
a416400036 Update locales from Transifex 2020-05-09 03:18:14 -04:00
Dan Stillman
595ba396ef Fix invalid relations from copying invalid feed item to collection
Prior to fdfa8052d1, it was possible to create an item in a feed
library using Add Item by Identifier. If you did that, and then copied
it to a collection in your personal library, it would somehow end up
with an owl:sameAs relation to a `/users/local` URI (probably because
the URI functions don't work properly on a feed library).

This will clean up such relations in a schema update.
2020-04-17 05:42:21 -04:00
Dan Stillman
7fe1dec173 Update translators 2020-03-23 16:05:26 -04:00
Dan Stillman
d95b507ea0 Update locales from Transifex 2020-03-23 16:05:26 -04:00
Dan Stillman
52d5b68564 Update 'type:' handling when migrating Extra lines
- When changing type based on 'type:' line, move existing fields that
  are no longer valid to Extra
- Remove 'type:' line with CSL type if the item's existing type is one
  of the types mapped to it
2020-03-22 15:19:24 -04:00
Dan Stillman
fe9f2ebe01 Update locales from Transifex 2020-02-24 18:48:09 -05:00