Commit graph

8228 commits

Author SHA1 Message Date
Dan Stillman
bd7cdbdc81 Don't hang on invalid DOI returned from recognizer-server
THis shouldn't happen anymore, but might as well be safe.
2019-04-23 19:07:41 -04:00
Dan Stillman
a0be2da42c Automatically capitalize subtitle for APA styles
Applied to all styles with ids matching 'apa($|-)'

Currently limited to colons, but Juris-M/citeproc-js#74 may extend this
to other punctuation

Closes #1681
2019-04-21 17:05:12 -04:00
Dan Stillman
7496faa8cf Update citeproc-js to 1.2.2 2019-04-20 15:32:46 -04:00
Dan Stillman
4eec421fe4 Don't return cached internal array for child notes 2019-04-16 05:33:31 -04:00
Dan Stillman
9b7984ef26 Run JS: Fix window title and stuck result pane after error 2019-04-16 03:34:45 -04:00
Dan Stillman
679f22d089 What's all this, then? A British English locale? I say!
This adds "English (UK)" to the locale list, which allows for "tag
colours" and allows dates to be recognized in d/m/y form.

I changed "color" and "license" on Transifex, but I'll leave other words
for others to change. If we stick to Oxford spelling, there probably
won't be too much else.
2019-04-16 03:33:30 -04:00
Dan Stillman
8cadbe7eff Update locales from Transifex and submodules 2019-04-11 20:20:50 -04:00
Adomas Venčkauskas
a57d38aa29 Fix numbers in strings addition caused bug in providing citeproc citation data 2019-04-10 10:35:30 +03:00
Dan Stillman
1ca6898cb9 Fix Zutilo breakage (regression from d9cee322cd) 2019-04-10 02:13:37 -04:00
Adomas Venčkauskas
78c3d5808b Fix citeproc errors due to improper citeproc state updates
The error is triggered upon initial interaction with a doc after Zotero
restart or if new external citations (copied into the document) are
peresnt and `session.updateSession()` is called without a subsequent
`session.updateDocument()` call. `session.updateSession()` is called
without a subsequent `session.updateDocument()` call every time the
user cancels a citation insert.

More specifically, `session.updateSession()` is called every time a
citation dialog is invoked. It retrieves all citations and writes them
into a local `session.citationsByIndex` object. Moreover, it marks
each citation that hasn't seen before in a `session.newIndices` object.
`session.newIndices` is there to ensure that we load every new citation
into citeproc upon document update. This object is built by marking any
citation that does not appear in the previous invocation's list of
citations as new. However, if the document is never updated (because the
user cancels the insertion) then the new indices are not loaded
into citeproc. This commit fixes that, by excluding citeproc unloaded
items from the previous invocation's citation list.
2019-04-08 17:43:52 +03:00
Dan Stillman
ff6a4400b4 Update citeproc-js to 1.1.236 2019-04-07 11:36:27 -04:00
Frank Bennett
e618410eb2 Export CSL JSON with title-short rather than shortTitle 2019-04-04 00:45:32 +09:00
Dan Stillman
9ed48f3837 Keep earliest Date Added when merging items
Closes #1669
2019-04-02 14:01:25 -04:00
Dan Stillman
197d609f8e Update locales from Transifex and merge new English strings 2019-04-01 17:41:01 -04:00
Dan Stillman
531c092800 Tweak integration error text (#1672) 2019-04-01 17:40:45 -04:00
Dan Stillman
cf3f52ef37
Merge pull request #1672 from adomasven/feature/better-integration-errors
Display a more user-friendly error for integration errors
2019-04-01 17:40:13 -04:00
Dan Stillman
2f43ea82f9 Disable logging for tag truncation issue 2019-03-31 07:39:06 -04:00
Dan Stillman
3ca5ac421c Don't truncate tags unnecessarily if width is miscalculated
https://forums.zotero.org/discussion/76665/tag-issue-display-of-some-tags-erratic
2019-03-31 07:37:24 -04:00
Dan Stillman
ecdcb65f57 Add debugging for tag selector truncation issue
https://forums.zotero.org/discussion/76665/tag-issue-display-of-some-tags-erratic
2019-03-30 12:23:20 -04:00
Dan Stillman
3829f12603 Speed up renaming of colored tags 2019-03-30 10:35:03 -04:00
Dan Stillman
6a2611c9c6 Additional logging for teleporting collections
https://forums.zotero.org/discussion/comment/328917/#Comment_328917
2019-03-30 07:58:15 -04:00
Dan Stillman
ee3955f6f7 Fix font size in search bars when set to non-small sizes
Reactification regression
2019-03-29 06:35:35 -04:00
Dan Stillman
038119c481
Merge pull request #1668 from Juris-M/zmaster
Handle handingindent return from citeproc-js as boolean
2019-03-29 02:53:06 -04:00
Dan Stillman
732cd01073 Update citeproc-js to 1.1.228 2019-03-29 02:23:51 -04:00
Dan Stillman
3126c58d30 Tag selector UI tweaks
- Don't cut off bottom of tags on Windows
- Fix appearance of search bar on Windows/Linux
- Fix cancel button on Windows/Linux
- Don't cut off right-hand pane of bottom bar when narrowing pane
2019-03-29 01:46:54 -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
Adomas Venčkauskas
0cb056c994 Display a more user-friendly error for integration errors 2019-03-27 17:34:32 +02:00
Dan Stillman
69ff8ac1b6 Search anywhere within tag for tag selector filter
Follow-up to 62ea7e970a, and I think in line with the pre-React
behavior
2019-03-27 07:49:59 -04:00
Dan Stillman
b248d28992 Revert "Update citeproc-js to 1.1.226"
This reverts commit a5c7955670.

We need to push out a release to fix some bugs, so let's leave this out
for now.
2019-03-27 07:26:15 -04:00
Dan Stillman
197397ff7a Fix error dragging items if tag selector was closed at startup 2019-03-27 07:23:41 -04:00
Dan Stillman
71f9420cff Fix linked-file rename pref when retrieving metadata
Due to a typo in d0f7fd6df7, linked files were still being renamed even
with the pref off if metadata was found for the file. The test I added
was only for adding a file to an existing item, which didn't trigger
metadata retrieval.

This also adds a hook for stubbing the actual PDF recognition process so
we can test certain behaviors without making HTTP requests.
2019-03-27 06:43:07 -04:00
Dan Stillman
a5c7955670 Update citeproc-js to 1.1.226 2019-03-27 03:45:03 -04:00
Frank Bennett
0036e0a1e1 Assume citeproc-js returns hangingindent as a boolean 2019-03-21 21:27:28 +09:00
Dan Stillman
6c86121120 Use onChange instead of onInput for Search component
React uses onChange for form elements (and complains if it's absent)
even when the underlying event is oninput.
2019-03-21 04:51:32 -04:00
Dan Stillman
09b7fa8a6d Fix time zone handling of CSL JSON export of date-only access date
Since 9c0f5998a3, depending on your timezone the day could be off by
one if the access date didn't have a timestamp (so only for manual
entries or imports).
2019-03-20 21:52:57 -04:00
Dan Stillman
62ea7e970a Don't use RegExp for tag filter (Reactification regression)
Using a regexp meant that an invalid regexp pattern would crash the tag
selector, and even if we caught that it would produce unexpected results
for some searches (e.g., anything with a period).
2019-03-20 07:15:55 -04:00
Dan Stillman
42667e7090 Switch to Search component in tag selector and support X/Esc to clear
This moves debouncing into the search component and adds cancel behavior
from the XUL search textbox. For now, this uses the X button from
Firefox.
2019-03-20 07:15:55 -04:00
Dan Stillman
bf4deeff8f Map podcast to CSL broadcast
Closes citation-style-language/zotero-bits#83
2019-03-19 20:08:17 -04:00
Dan Stillman
67febb2f45 Clarify debug lines for tag selector updating 2019-03-18 04:52:48 -04:00
Dan Stillman
b2d5b9a2f3 Fix incorrect call in 3463e3b5ab 2019-03-17 19:15:34 -04:00
Dan Stillman
3463e3b5ab Don't initialize tag selector if closed at startup (React regression)
Even after cdf9d7ff32, the tag selector was still being initialized if
it was closed at startup, which meant that keeping it closed didn't fix
performance problems in large libraries. This hopefully finally brings
the tag selector in line with pre-Reactification behavior.

This also moves initIntlStrings() logic to Zotero.Intl so that strings
are accessible from React components in separate windows, and it moves
container initialization to ZoteroPane since most of what it does will
need to interact with ZoteroPane anyway.
2019-03-17 05:11:07 -04:00
Dan Stillman
c44b864923 Fix error switching creator field mode if a creator is open 2019-03-16 03:21:10 -04:00
Dan Stillman
9d564f022d Fix creator overwrite using move option on open field
https://forums.zotero.org/discussion/76423/bug-when-moving-authors-to-top-in-beta
2019-03-16 01:53:35 -04:00
Dan Stillman
cdf9d7ff32 Unregister tag selector when closed
This restores the pre-Reactification behavior.
2019-03-15 15:42:22 -04:00
Dan Stillman
94ccba45b9 Avoid unnecessary tag queries (regression from React tag selector) 2019-03-15 12:46:27 -04:00
Dan Stillman
cd55aebbc0 Fix detection of WebDAV settings on Windows and Linux
Fixes #1291, hopefully for real this time
2019-03-13 02:45:31 -04:00
Dan Stillman
435e628973 Fix high CPU during file syncing (regression from React tag selector) 2019-03-12 06:45:25 -04:00
Dan Stillman
99cfddaf18 Add separator above "Delete All Automatic Tags in This Library…" 2019-03-09 16:28:20 -05:00
Dan Stillman
c735423996 Don't show PDF icon for linked-URL PDFs (regression from 8cd5b09053) 2019-03-08 20:23:00 -05:00
Dan Stillman
c7698a2324 Restore disabling of automatic tag deletion option when no such tags 2019-03-07 04:08:45 -05:00
Dan Stillman
85c6ec0ca4 Actually change code that deletes automatic tags
Follow-up to d7dc5670d5
2019-03-07 03:35:37 -05:00
Adomas Venčkauskas
72fb67d15b Restore "Delete All Automatic Tags" menu option for tag selector. Closes #1660 2019-03-06 16:22:05 +02:00
Adomas Venčkauskas
d01038b13b Fix missing react localization in tests. Closes #1661 2019-03-06 14:35:38 +02:00
Adomas Venčkauskas
e8f186479f Address tag selector tests race conditions. Addresses #1659 2019-03-06 13:13:40 +02:00
Dan Stillman
9cdfe8e01c Update submodules 2019-03-05 21:17:14 -05:00
Dan Stillman
123f82571e Update locales from Transifex 2019-03-05 21:15:27 -05:00
Dan Stillman
ae9c54b76d Fix "Move to Top" logic for creators 2019-03-05 19:15:50 -05:00
Dan Stillman
d7dc5670d5 When clearing automatic tags, don't delete manual tags with same name 2019-03-05 07:55:00 -05:00
Dan Stillman
fc43514ff0 Deselect tags when deleted (regression from Reactification) 2019-03-05 07:55:00 -05:00
Dan Stillman
3c6ab77e44 Update locales from Transifex 2019-03-04 07:31:36 -05:00
Dan Stillman
8cd5b09053 Add icon for linked PDF files 2019-03-04 03:20:37 -05:00
Dan Stillman
e2c4e3e86a Use "PDF" attachment title for all individual PDFs from Mendeley import
https://forums.zotero.org/discussion/comment/327390/#Comment_327390
2019-03-03 04:52:39 -05:00
Dan Stillman
88f39cba80 Merge new English strings 2019-03-02 06:24:33 -05:00
Dan Stillman
04779d8d1c Add import option for storing or linking files
This allows files in Mendeley imports to be stored and files in
RIS/BibTeX/etc. to be linked.

Closes #329
2019-03-02 06:24:33 -05:00
Martynas Bagdonas
ca859e7aa4 Fix unescapeHTML on node.js 2019-03-01 09:59:21 +02:00
Dan Stillman
ad27e0c5fa Update locales from Transifex and merge new English strings 2019-02-26 22:30:29 -05:00
Dan Stillman
d0f7fd6df7 Add separate "Rename linked files" pref for auto-renaming
Defaulting to false

People who've been relying on auto-renaming of linked files for the last
year will have to turn this back on.
2019-02-26 22:23:43 -05:00
Adomas Venčkauskas
caac984345 Fix this.collectionTreeRow undefined errors in tag selector 2019-02-25 12:21:26 +02:00
Adomas Venčkauskas
891524b4ed Fix selected tags not clearing when switching collections. Closes #1646 2019-02-25 12:20:35 +02:00
Adomas Venčkauskas
6d82ac3970 Fix window.name being unset when loading include.js. Closes #1645 2019-02-25 11:45:42 +02:00
Dan Stillman
6929125708 Updates locales from Transifex and merge new English strings 2019-02-24 00:11:27 -05:00
Dan Stillman
df494415d7 Add "Move to Top" option in creator type menu
Drag-and-drop will be a better solution, but this should be useful in
some situations (and, unlike drag-and-drop, can be accessible).
2019-02-24 00:01:58 -05:00
Dan Stillman
945c413c42 Closes #1644, Allow selecting multiple items with zotero://select
This adds selectItems() to ZoteroPane and collectionTreeView and removes
the ancient, unused 'expand' argument to selectItem(), which didn't
really make sense there. It also includes a new
itemTreeView::ensureRowsAreVisible() that tries to scroll to an
appropriate place (or, better yet, not scroll at all) given the
specified rows and page size.
2019-02-23 17:35:09 -05:00
Dan Stillman
663acccbc2 Tweak debugging for missing-key sync error 2019-02-19 04:10:25 -05:00
Dan Stillman
1061893998 "Attachment Content" search improvements
- Fix incorrect results for ANY search with multiple "Attachment
  Content" conditions and no other conditions
- Dramatically speed up single-word searches by avoiding unnecessary
  text scans (which probably addresses #1595)
- Clean up code
2019-02-19 04:10:25 -05:00
Dan Stillman
977eb8d965 Fix "Show Automatic Tags" in tag selector 2019-02-18 15:00:18 -05:00
Dan Stillman
950e9de80f Make starting from Mac disk image fatal 2019-02-18 14:36:53 -05:00
Dan Stillman
0ea03ce72c Switch to services domain for recognizer requests
The recognizer endpoint can be customized by setting either
recognize.url (used directly) or services.url (used with a 'recognizer/'
suffix).
2019-02-18 14:30:54 -05:00
Frank Bennett
30b6bf6da7 Set processIndices for each processor return 2019-02-13 08:40:50 +02:00
Adomas Venčkauskas
6672efef0a Revert "Revert "Update citeproc-js to 1.1.215""
This reverts commit db56f002a5.
2019-02-12 10:30:33 +02:00
Adomas Venčkauskas
9410094ad8 Update citeproc usage logic. See #1638 2019-02-12 10:30:24 +02:00
Adomas Venčkauskas
a931c2ba51 Tidy up Integration.Session.addCitation() 2019-02-11 11:01:53 +02:00
Adomas Venčkauskas
0539deb58b Make sure citation edits are not treated as citation duplication 2019-02-11 11:01:01 +02:00
Adomas Venčkauskas
6ee87056b1 Fix integration previewFn providing wrong citationsPost data
See #1638
2019-02-11 10:45:07 +02:00
Adomas Venčkauskas
de4ce57768 Fix wrong httpIntegrationClient #convert call signature 2019-02-08 13:03:27 +02:00
Dan Stillman
db56f002a5 Revert "Update citeproc-js to 1.1.215"
This reverts commit d301fb6e43.
2019-02-06 14:59:27 -05:00
Dan Stillman
ff008d4bc1 Update locales from Transifex 2019-02-05 21:36:51 -05:00
Dan Stillman
d301fb6e43 Update citeproc-js to 1.1.215 2019-02-03 05:08:13 -05:00
Dan Stillman
98aa71655b RunJS tweaks
- Display result string directly instead of running through varDump()
- Better detect use of `await`
- Fix ESLint error
2019-02-02 14:17:14 -05:00
Dan Stillman
b1fad505d7 Fix sorting of colored tags after Reactification
Regressed to alphabetic sorting instead of number-key sorting
2019-01-29 22:18:49 -05:00
Dan Stillman
c2a637472e Fix foreign key constraint error for collections with all-numeric keys
This was like a lottery where instead of winning something your library
stopped syncing.
2019-01-29 05:09:00 -05:00
Adomas Venčkauskas
8bd35ee0d4 Fixes tag selector toggling via hotkey leaving gray area. Closes #1629 2019-01-28 16:35:20 +02:00
Dan Stillman
8b4bb62efc Don't load linked URLs during import
Regression from 5a6a772ca2, I think
2019-01-26 00:20:26 -05:00
Adomas Venčkauskas
a532af6114 Fix sync client tests that depend on stubbing concurrentCaller Promise.
Regression since f5c4fb06
2019-01-22 13:49:00 +02:00
Dan Stillman
8f58560751 Run JavaScript: Automatically switch to async mode if await is used
This will allow examples from the documentation to work without the
async option being explicitly chosen.
2019-01-22 04:44:32 -05:00
Dan Stillman
39eb2962a6 Run JavaScript: Support await and show errors
Adds a "Run as async function" checkbox that wraps the code in an async
function and displays the value returned by a `return` statement.

This also properly catches errors and displays them in the results pane.
2019-01-22 01:29:05 -05:00
Dan Stillman
f918e27e46 Add window for running arbitrary privileged JavaScript
This is a replacement for the Execute JS extension that could be used
with Zotero for Firefox.

To enable, go to the Config Editor in the Advanced pane of the
preferences and set devtools.chrome.enabled to true, and then restart
Zotero. A "Run JavaScript" option will appear in the Tools menu.
2019-01-22 00:12:34 -05:00
Dan Stillman
eb5d28b626
Merge pull request #1606 from adomasven/feature/reactify
Reactified Tag Selector
2019-01-21 04:07:28 -05:00
Adomas Venčkauskas
0e8788aca1 Update tag selector styling for Windows 2019-01-21 11:01:33 +02:00
Adomas Venčkauskas
fc41326319 Update tag selector styling for macOS 2019-01-21 11:01:33 +02:00