Commit graph

334 commits

Author SHA1 Message Date
Abe Jellinek
8d75f37548
fx-compat: Add preferences with full-text/keyword search (#2659) 2022-08-10 18:26:23 -04:00
Dan Stillman
78b0055206 Change app id to zotero@zotero.org
And remove all references to old id

We can do this because plugins will use new mechanisms for install and
update manifests that don't use the id (which also means it's now only
used internally).
2022-08-08 05:11:21 -04:00
Dan Stillman
51f9150410 fx-compat: Initial plugin support
Plugins are ZIPs containing at least these two files:

- manifest.json: A WebExtension MV2 manifest with basic metadata
  properties and `applications.gecko` with `id` and `update_url`
- bootstrap.js: A bootstrap file, similar to old bootstrapped extensions,
  with `installed()`, `startup()`, `shutdown()`, and `uninstalled()`
2022-08-05 01:08:51 -04:00
Dan Stillman
0120877623 fx-compat: Avoid automatic safe mode from Ctrl-C
Pressing Ctrl-C via the terminal is counted as a crash, and after three
recent crashes automatic safe mode is triggered. In Firefox, this
displays a prompt:

> Firefox closed unexpectedly while starting. This might be caused by
> add-ons or other problems. You can try to resolve the problem by
> troubleshooting in Safe Mode.

For us, that dialog doesn't appear for some reason (maybe we could make
it?) and Zotero just automatically opens in Safe Mode, which causes
state not to be restored and results in an annoying process fork that
breaks Ctrl-C. We might as well keep the automatic-safe-mode behavior
for end users, but we don't want to trigger it while working via the
terminal, so we just clear the recent crash counter when using
`-ZoteroDebug` or `-ZoteroDebugText`. (`extensions.zotero.debug.log`
won't trigger it, so it's best to use `-ZoteroDebugText`, which is
included automatically via the `build_and_run` script.)
2022-06-23 05:42:57 -04:00
Dan Stillman
41dd75af8a Wait for Zotero.init() before returning Zotero.reinit()
Not sure if this makes a difference, but it seems more correct.
2022-06-17 20:24:43 -04:00
Dan Stillman
f454944f8c fx-compat: Fix files not showing up in debugger 2022-06-16 04:19:41 -04:00
Dan Stillman
9e9ecc7dcf fx-compat: XPCOMUtilsComponentUtils for generateNSGetFactory 2022-05-13 04:28:56 -04:00
Dan Stillman
66a60eea64 fx-compat: Update custom protocol handler 2022-05-12 05:18:47 -04:00
Dan Stillman
94c7e0674d fx-compat: Remove 'context' from onStartRequest()/onStopRequest()/etc. 2022-05-12 05:18:47 -04:00
Dan Stillman
3454705825 fx-compat: Update devtools server loading 2022-05-12 05:18:47 -04:00
Dan Stillman
ccbc785499 fx-compat: XPCOMUtils.generateQI() → ChromeUtils.generateQI() 2022-05-12 02:38:59 -04:00
Dan Stillman
e5558b6f3e Remove note backup functionality
Closes #2191
2022-03-05 06:12:29 -05:00
Dan Stillman
db35f55c96 Limit autocomplete in Advanced Search to specific creator types
For `author`, `bookAuthor`, and `editor` conditions added in #2253
2022-02-17 01:43:39 -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
85b142ccb2
Restore tabs state (#2148) 2021-08-23 13:02:57 -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
Martynas Bagdonas
9b3367f227 Allow zotero://open-pdf/ to navigate to specific annotation by key
zotero://open-pdf/library/items/AABBCCDD?annotation=[annotation-key]

Fallback to a page if annotation is missing:
zotero://open-pdf/library/items/AABBCCDD?page=123&annotation=[annotation-key]

Fixes #2125
2021-08-06 13:06:40 +03:00
Adomas Venčkauskas
7814efcfe2 Use zotero/translate and zotero/utilities for shared code 2021-07-28 15:46:07 +03:00
Martynas Bagdonas
814cbc0ee3 Introduce spell checker context menu and dictionaries managing 2021-06-23 19:25:46 -04:00
Dan Stillman
f3aca749d9 Autocomplete improvements
- Limit field autocomplete to current library in item pane (previously
  only done for creator and access date)
- Improve positional parameter usage to avoid duplicate parameters
- Code cleanup
2021-06-04 02:14:17 -04:00
Martynas Bagdonas
8799de5284 Display embedded images in item reports
Fixes #2002
2021-04-28 13:05:43 +03:00
Adomas Venčkauskas
50dae87b07 Add a warning dialog for an outdated doc template 2021-03-02 18:10:44 -05:00
Dan Stillman
f0816cc8fb Add temporary prefs checkbox to use internal PDF reader
And use when opening PDFs in My Library from items list and
zotero://open-pdf

This also adds "Zotero" to the main PDF reader pref, which will be the
real way to set this, but that option is hidden for now so that group
library items will still open with the configured reader.
2021-03-02 17:58:28 -05:00
Martynas Bagdonas
76e77d4422 Improve PDF import/export 2021-03-02 17:40:24 -05:00
Martynas Bagdonas
a89f7e8ec7 Improve PDF reader 2021-03-02 17:39:39 -05:00
Martynas Bagdonas
bce50e8e9c Add old note backup and preview 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
af57565acf Reorganize and improve notes 2021-03-02 17:36:05 -05:00
Martynas Bagdonas
2543a695e8 Introduce PDF reader and note editor 2021-03-02 17:36:05 -05:00
Dan Stillman
c3ff6eb66e Protocol handler extension to proxy PDF.js and PDFs 2021-03-02 17:36:05 -05:00
Dan Stillman
8e1a15f6d0 Restore zotero://attachment protocol handler for area annotation images 2021-03-02 17:36:05 -05:00
Dan Stillman
007bc315cc Fix deprecation warning when using AsyncChannel in protocol handler 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
9152012368 Restore DB table reconciliation during integrity check
But skip it at startup, even if flagged on, if there are schema update
steps to perform, to avoid creating tables that aren't expected to exist
yet.

Originally added in 5b9e6497a but disabled in c4cc44528 and 7a434df53
2021-01-17 03:36:38 -05:00
Dan Stillman
a051746db4 Update zotero://select comment 2020-06-10 23:56:07 -04:00
Dan Stillman
2a804d5d4a Fix zotero://open-pdf links on Windows if no handler is set in registry 2020-02-09 14:07:11 -05:00
Dan Stillman
aef198d6b5 Increase autocomplete to 50 results
Up from 25 in 53ff8eecd2 (5.0.80)
2019-12-30 02:39:10 -05:00
Dan Stillman
991e542888 Fix broken autocomplete popup when editing a saved search
https://forums.zotero.org/discussion/comment/345646/#Comment_345646

This is probably the actual fix for what I was trying to fix in
360f034b5, and I couldn't reproduce it because it was about saved
searches.
2019-12-30 02:39:10 -05:00
Dan Stillman
360f034b51 Fix a report of broken autocomplete
I can't reproduce this, but the report has "Services is not defined"
from autocomplete.xml, triggered by zotero-autocomplete.js.

https://forums.zotero.org/discussion/comment/345190/#Comment_345190
2019-12-19 01:41:10 -05:00
Dan Stillman
53ff8eecd2 Limit autocomplete to 25 results
I'm not totally sure why we didn't do this years ago, but this fixes
performances problems in the new React tags box, and should improve
autocomplete performance generally in large libraries.
2019-12-03 16:05:04 -07:00
Dan Stillman
ba15c2b53e Fx60: Mostly fix autocomplete
There's still a bug when autocompleting tags where the value remains in
the new text field.
2019-10-24 04:45:45 -04:00
Dan Stillman
b08bd6849e Fx60: Update DB query onRow() behavior
onRow() handlers now get passed a cancellation function as a second
argument
2019-08-27 06:00:35 -04:00
Dan Stillman
433794916a Fx60: Remove instances of nsILocalFile
nsILocalFile was merged into nsIFile, so either replace it with that or
switch to Zotero.File.pathToFile().
2019-08-27 00:47:39 -04:00
Dan Stillman
e50fda90ca Remove obsolete zotero://attachment and zotero://fullscreen 2019-08-27 00:47:39 -04:00
Dan Stillman
76978aa912 Fx60: Fix protocol handler
These will need to be redone for Electron, but this keeps them working
in the meantime.
2019-08-27 00:47:39 -04:00
Dan Stillman
c771d9b046 Fx60: Fix devtools initialization 2019-08-27 00:47:39 -04:00
Dan Stillman
0ad308f5f6 Fx60: Update nsIInputStreamPump init() calls 2019-08-27 00:47:39 -04:00
Dan Stillman
78e9db9523 Fx60: Fix issues with JS code modules
- The Mozilla CommonJS loader is no longer available, so bundle the
  Fx52 version of it
- Strict mode is enforced
- `this` is only defined as a global object in .jsm files, not .js files
- `this` can't be converted to a string for BackstagePass test, so check
  for presence of Components.utils.import instead
- The return value from import() is no longer available
2019-08-27 00:47:39 -04:00
Dan Stillman
d551d1901f Fix zotero://select search selection 2019-08-01 22:11:03 -04:00
Dan Stillman
66f2d177a9 Load all files xpcom/ files as UTF-8
This fixes corrupted em dashes from citeproc-js:

https://forums.zotero.org/discussion/78327/dash-in-ama-is-producing-odd-characters-a%C2%80%C2%94
2019-07-25 07:39:32 -04:00