Commit graph

62 commits

Author SHA1 Message Date
Dan Stillman
257a2280c1 Use repo root in update-citeproc.sh 2023-04-26 04:40:22 -04:00
Dan Stillman
7ae79bbb98 egh's translator framework no longer needs to be unminified
Translators haven't been bundled with a Firefox extension since 2017, so
no need to unminify for review.
2023-04-26 04:40:22 -04:00
Dan Stillman
fb2b874614 Add zotero-build repo as scripts folder
Minus obsolete 4.0 files
2023-04-26 04:40:22 -04:00
Dan Stillman
ae0091fbae Rename scripts folder to js-build 2023-04-26 04:40:22 -04:00
Martynas Bagdonas
e6e424836d Update PDF.js in PDF reader 2023-04-12 11:15:46 +03:00
Martynas Bagdonas
bd9a40562f Replace pdftotext and pdfinfo with pdf-worker 2023-03-31 12:48:05 +01:00
Tom Najdek
d0e177055d
Remove multimatch from the build process #2862 (#3047) 2023-03-27 16:22:44 -04:00
Tom Najdek
2820add3d1
Add bulk folder import #2252 2023-03-21 20:38:39 +01:00
Abe Jellinek
52e8fa8995 Prune Monaco distribution, fix JS acting like TS in Scaffold
We don't need most of the bundled languages or localizations, so they were just
taking up disk space pointlessly.
2022-09-12 14:06:17 -07:00
Adomas Venčkauskas
3ba78dec78 Changes for updated SingleFile submodule 2022-08-11 03:49:52 -04:00
Martynas Bagdonas
4de31ebb85 Update pdf-reader and note-editor, use specific prebuilds, tweak code 2022-08-11 02:35:36 -04:00
Tom Najdek
1fbed10375
Report correct path for outFiles in symlink task (#2639) 2022-05-26 05:48:27 -04:00
Tom Najdek
89dd6faa2b
Run add_omni_files for changes to symlinked files (#2638) 2022-05-26 05:14:16 -04:00
Tom Najdek
8b76bf6e65
Run add_omni_file script when file change detected 2022-05-25 19:56:23 +02:00
Tom Najdek
7aa3bde170
On error, ring the bell
Should help with noticing syntax errors etc.
2022-05-25 19:37:20 +02:00
Tom Najdek
eb5f2978cc
Fix a problem with build when switching branch
When switching between master and fx102 bogus files were created outside
of the build/ directory. That's because previously we had a symlinked
file itembox.css and now we compile a file itemBox.css into the same
directory. However when running `npm start`, after switching branch, the
symlink still existed and thus when writing a new file, symlink was
followed and output has been written inside a source file instead.

Build system will now run cleanup step first (where it checks if files
frim `.signatures.json` still exist in src), then proceed with build,
so old symlinks will be removed thus producing a valid build.

This problem probably only happened on case-insensitive file-systems
(like default config on macOS HFS+).
2022-05-25 16:38:16 +02:00
Tom Najdek
32c0d228cc
Fix all scss files rebuild on every non-js change
multimatch test was incorrect triggering scss rebuild on every change
that reached that logic.

Also fixed weird (legacy?) use of path.join()
2022-05-25 16:10:15 +02:00
Abe Jellinek
9829ea7009
Update utilities, move tests, add to CI (#2584) 2022-04-30 04:55:11 -04:00
Tom Najdek
e156a46833
Fix build on win 2022-03-17 13:17:28 +01:00
Abe Jellinek
5409ae3313 Overhaul Scaffold (#2293) 2022-03-02 22:36:04 -05:00
Adomas Ven
44b6cd0525
citeproc-rs support (#2220)
Disabled under zotero.cite.useCiteprocRs by default
2021-12-15 17:28:41 -05:00
Adomas Venčkauskas
d03c495563 Update SingleFile to the latest version 2021-11-19 14:22:45 +02:00
Martynas Bagdonas
e09f1ba5d2 Fix pdf-worker build script 2021-09-27 14:39:53 +03:00
Adomas Venčkauskas
7814efcfe2 Use zotero/translate and zotero/utilities for shared code 2021-07-28 15:46:07 +03:00
Dan Stillman
24d45f6953 Omit additional files in global schema directory from build 2021-07-20 23:45:40 -04:00
J. Ryan Stinnett
75eb8c51d4 Ignore feed processor *.idl files 2021-06-16 20:59:57 +01:00
Dan Stillman
65369ebb47
Merge pull request #1964 from tnajdek/1944-skip-scss-files-build-if-not-changed
Skip .scss files if build not required #1944
2021-05-03 12:11:41 -04:00
Dan Stillman
e1c0f6c1a0 Rename zotero-note-editor submodule to note-editor 2021-03-02 18:10:42 -05:00
Martynas Bagdonas
4c11d45679 Use pre-built submodules to speed up building 2021-03-02 17:58:29 -05:00
Martynas Bagdonas
a89f7e8ec7 Improve PDF reader 2021-03-02 17:39:39 -05:00
Martynas Bagdonas
2543a695e8 Introduce PDF reader and note editor 2021-03-02 17:36:05 -05:00
Tom Najdek
294d5679d3
Skip .scss files if build not required #1944 2021-02-24 16:36:27 +01:00
Dan Stillman
874c4044e5 Ace: Add commented-out language_tools lines in case we want them later
We may want this if we enable code completion, though it's a little
dumb. (It seems to show suggestions regardless of context.)
2020-12-24 02:55:00 -05:00
Dan Stillman
2ed4bb1c8f Ace: Config adjustments in Run JavaScript window
- Use the "Chrome" theme
- Hide the gutter
- Don't highlight the active line
- Remove default iframe borders
- Focus the editor on window open

Ace instances (e.g., Scaffold) are now responsible for setting their own
theme (to avoid a flash of Monokai before a lighter theme appears).
2020-12-24 02:45:37 -05:00
Fletcher Hazlehurst
36d81e839c Use ace-builds NPM package 2020-12-18 10:45:38 -07:00
Dan Stillman
f393a233e9
Merge pull request #1912 from tnajdek/js-sass-compiler
Switch to pure js sass compiler
2020-11-18 15:23:38 -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
Tom Najdek
67f4b5254c
Switch to pure js sass compiler 2020-10-30 13:15:30 +01: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
Fletcher Hazlehurst
ed304b56e0 Remove crossorigin attributes in snapshots.
When loading a snapshot locally, same-origin of null will not load them
2020-10-11 18:19:41 -06: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
Tom Najdek
64234d2bb4
Fix babel worker special cases check on windows 2020-07-29 12:59:33 +02:00
Tom Najdek
e5984b0297
Ensure symlinks are dereferenced prior to copy
Only applies to the build on Windows
2020-07-27 23:48:24 +02:00
Dan Stillman
5791ffeb16 Reactify item tags box
Improvements:

- Fixes autocomplete text remaining in field after selection in Fx60
- No more text or icon shifting on select (tested on macOS)

Changes:

- Tags are now selected on mousedown with no active state, as in web
  library

Regressions:

- Tooltip with tag type doesn't appear when hovering over icon
- Pressing Tab after modifying a tag loses focus
- Right-click in textbox shows custom menu instead of default text
  editing context menu (Cut/Copy/Paste)

To-do:

- Switch to this version for note tags box
- Style colored tags in autocomplete drop-down? Sort to top?
- Only show delete button on row hover, as in web library?
2019-11-08 06:41:06 -05:00
Dan Stillman
963329df28 Set 'react' and 'react-dom' as externals for browserify
When browserifying anything that depends on React, don't bundle another
copy of React in the file. There might be some other common dependencies
that we should include here.
2019-11-08 06:41:06 -05:00
Dan Stillman
4b60c6ca27 Type/field handling overhaul
This changes the way item types, item fields, creator types, and CSL
mappings are defined and handled, in preparation for updated types and
fields.

Instead of being predefined in SQL files or code, type/field info is
read from a bundled JSON file shared with other parts of the Zotero
ecosystem [1], referred to as the "global schema". Updates to the
bundled schema file are automatically applied to the database at first
run, allowing changes to be made consistently across apps.

When syncing, invalid JSON properties are now rejected instead of being
ignored and processed later, which will allow for schema changes to be
made without causing problems in existing clients. We considered many
alternative approaches, but this approach is by far the simplest,
safest, and most transparent to the user.

For now, there are no actual changes to types and fields, since we'll
first need to do a sync cut-off for earlier versions that don't reject
invalid properties.

For third-party code, the main change is that type and field IDs should
no longer be hard-coded, since they may not be consistent in new
installs. For example, code should use `Zotero.ItemTypes.getID('note')`
instead of hard-coding `1`.

[1] https://github.com/zotero/zotero-schema
2019-09-16 02:27:22 -04:00
Dan Stillman
8c59df435f Fx60: Fix snapshot filenames
nsIURL doesn't seem to work anymore, so add Zotero.Utilities.parseURL(),
which uses the `url` package from NPM and adds fileName, fileExtension,
and fileBaseName.
2019-08-27 00:47:39 -04:00
Dan Stillman
d9cee322cd Tag selector performance overhaul
- Use react-virtualized to render tags on demand, reducing the number
  of DOM elements from potentially tens of thousands to <100. This
  requires tags to be absolutely positioned, so sizing and
  positioning need to be precomputed rather than relying on CSS.
- Avoid unnecessary refreshes, speed up tag retrieval, and optimize
  sorting
- Debounce reflowing when resizing tag selector

Also:

- Scroll to top when changing collections
- Allow tags to take up full width of tag selector without truncation

Closes #1649
Closes #281
2019-03-28 06:28:34 -04:00
Dan Stillman
c52589f96b Upgrade to Babel 7 2019-03-28 04:57:31 -04:00