Commit graph

11191 commits

Author SHA1 Message Date
Fletcher Hazlehurst
8c00510835 Remove XUL overlay, but keep functionality. 2021-02-24 16:11:19 -07:00
Fletcher Hazlehurst
60d8beece3 Add context menu for React textboxes to Create Parent Dialog 2021-02-22 20:14:07 -07:00
Dan Stillman
d9cf53725a Make Find PDF test timing a bit more forgiving 2021-02-09 17:12:25 -05:00
Dan Stillman
31478d1fba Use multi-line editor for all title fields (e.g., Case Name)
https://forums.zotero.org/discussion/87286/suggestion-multi-line-case-name-display-in-info-panel
2021-02-09 17:05:50 -05:00
Dan Stillman
843bcbb68a Show invalid-data warning in sync button tooltip for group libraries
Instead of showing warning button on toolbar

Otherwise if one person in a group upgrades to a beta with new fields,
everyone in the group will get a warning, even if they're already on the
latest release version. In a personal library, the user can upgrade to
the same version.
2021-02-09 16:36:06 -05:00
Dan Stillman
b919143630 Skip conflict resolution for remote objects that can't be saved
E.g., if a local item has been modified in a way that conflicts with a
remote item that also has a new, unknown field, don't show the CR
window -- just add the item to the sync queue and show the
some-data-could-not-be-downloaded error.
2021-02-07 16:49:01 -05:00
Dan Stillman
254695f4b3 Skip extra sync download after some conflicts
If an upload fails with a 412, and then we download, and then we go to
upload but there was nothing to upload (e.g., because the remote version
was chosen or there was an error saving it), there's no reason to do a
download again after that.
2021-02-07 16:38:14 -05:00
Dan Stillman
61e29aa8eb Don't set non-working 'tooltiptext' in React Button
Follow-up to ba9c7ae739
2021-02-06 23:51:28 -05:00
Dan Stillman
e9e434cd2e Fix tooltips for tags box icons
Addresses #1947

If we're going to need this regularly we should just create a React
Image element that does this automatically for 'title'.
2021-02-06 23:51:11 -05:00
Dan Stillman
01819d68d1 Show tag selector Actions menu on mousedown, not click 2021-02-06 23:37:56 -05:00
Dan Stillman
ba9c7ae739 Fix 'title' attribute on React Button component
E.g., Actions menu in tag selector

Neither 'title' (HTML) nor 'tooltiptext' (XUL) works on HTML elements in
XUL documents, so add a mechanism to fake tooltip behavior and use it in
our Button component. This can be triggered by other React components if
necessary.

This is (mostly) mirroring Firefox tooltip behavior, which is a bit less
sophisicated than macOS behavior. If we end up using this for
everything, we can improve the behavior (e.g., start the delay when
entering the element, not when the mouse stops).

Fixes #1947
2021-02-06 23:37:32 -05:00
Dan Stillman
cf132fdd29 Log POST request body for server requests 2021-02-05 17:51:59 -05:00
fletcherhaz
55acf9a0c0
Do not send back saveSingleFile: true if saving a PDF snapshot. (#1950) 2021-02-05 15:31:34 -05:00
Dan Stillman
293bf07c03 Temporarily increase sync upload timeout from 60 to 120 seconds
This shouldn't be necessary, but currently items with thousands of
creators can be very slow to save.
2021-02-03 16:18:30 -05:00
Dan Stillman
fd94d731d4 Update locales from Transifex and merge new English strings 2021-01-27 10:10:43 -05:00
Dan Stillman
ff9471fe2c Add English strings for Word for Mac ARM-is-supported warning 2021-01-27 00:59:18 -05:00
Dan Stillman
b3220e83b1 Don't pass nested collections to translators as top-level collections
While we need to pass all items from descendant collections to
translators, only the immediate child collections of the selected
library or collection should be returned from Zotero.nextCollection().

I'm not sure how long we've been doing this wrong, but it resulted in
duplicated subcollections when round-tripping Zotero RDF. (TEI is the
only other translator that uses nextCollection(), so its exports were
probably similarly incorrect.)

https://forums.zotero.org/discussion/87135/export-import-creates-numerous-duplicate-subcollections
2021-01-25 03:58:04 -05:00
Dan Stillman
10ca05e22e Return array instead of iterator for Collection.getChildCollections(true) 2021-01-25 03:58:04 -05:00
Dan Stillman
9e6a2d2e50 Fix title mismatch for ISBN lookup tests
Not sure what this was using before (LOC isn't currently returning a
result), but GBV doesn't currently have a serial comma in the title.
2021-01-25 03:58:04 -05:00
Diego de la Hera
05e56acf77
Fix Input component doesn't work if autoComplete=false (#1939)
The Input component doesn't work if its autoComplete prop is set to false, as described here: https://groups.google.com/g/zotero-dev/c/vKdxvZJL8UQ
2021-01-20 20:58:09 -05:00
Dan Stillman
cd63f96eee Increase DOI Content Negotiation timeout during lookup tests
Probably a temporary problem, but it's timing out on some runs at 10
seconds
2021-01-18 23:06:13 -05:00
Dan Stillman
4c048f6fd2 Relax HTML checking in SingleFile tests
Somehow the saved page starts with "<html style>" instead of "<html>" on
GitHub Actions
2021-01-18 23:06:13 -05:00
Dan Stillman
649d70eeda Remove \r characters in test output
Not sure what this does to Windows terminal output, but it causes double
linebreaks on GitHub Actions
2021-01-18 23:06:13 -05:00
Dan Stillman
46bde4c5a2 Add GitHub Actions CI workflow and remove Travis config 2021-01-18 23:06:13 -05:00
Dan Stillman
2adf0e6d3c Encourage reporting of startup errors in the forums
We're now flagging the DB for repair on startup errors, so if that fixes
the problem (e.g., because of our undiagnosed skipped-schema-update-step
problem), we'd still like to know about it.
2021-01-17 04:19:33 -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
a2dc7f23cd Switch to HTML progress element for main window progress bar
In an unsuccessful attempt to get an animation on macOS in indeterminate
mode, but might as well switch it anyway
2021-01-17 01:52:22 -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
5a4d78578b Zotero.DataObject updates for changedData fields
changedData is the new approach to updating DataObject data, storing the
new values in a separate object until save so that they don't actually
change the object unless the save goes through.

- Add DataObject._getLatestField() to return either the changed value or
  the last-saved value
- Clarify that _markFieldChange() takes different values depending on
  whether the field uses 'changed' or 'changedData'
- Fix bug calculating hasChanged() when a 'changedData' value is a
  boolean
2021-01-12 04:38:25 -05:00
Dan Stillman
22addb3afd Create logs/upgrade.log in data directory after schema updates
For debugging future problems with schema updates
2021-01-11 23:48:11 -05:00
Dan Stillman
f9c03058f1 Add Zotero.Debug.addListener() and .removeListener()
For getting all log lines during a particular period
2021-01-11 23:48:11 -05:00
Dan Stillman
5edad5f70a Update citeproc-js to 1.4.61 2021-01-11 23:48:11 -05:00
Dan Stillman
1339d4a0f1 Update version 2021-01-11 23:48:11 -05:00
Dan Stillman
2094a6023c Restore fallback DB creation in retractions.js
Removed in 5b9e6497af, but then we reverted missing-table creation via
schema integrity check
2021-01-11 13:29:03 -05:00
Dan Stillman
4003c3d1fc Update locales from Transifex 2021-01-10 14:58:37 -05:00
Dan Stillman
80b8280e9d Update submodules 2021-01-10 14:58:37 -05:00
Dan Stillman
7b9bad1d52 Don't sync group on push notification if not selected for syncing
If a group library was deselected in the "Choose Libraries…" window, a
remote change would still trigger a sync if auto-sync was enabled. (My
Library was not affected.)
2021-01-09 14:58:51 -05:00
Dan Stillman
a1267bc68e Fix rerendering of React-based icons in HiDPI mode
With the variable in the outer scope, "@2x" keeps getting added to the
URL.
2021-01-07 04:11:15 -05:00
Fletcher Hazlehurst
4db61b8dc7 Do not modify saveOptions argument since it may be used again
If we add the notifier queue, another save function will use that queue
but not necessarily know that it needs to commit. Instead, we only use
the notifier queue for this function.
2020-12-30 11:33:07 -07:00
fletcherhaz
98a75931b0
Fix double saving snapshots (#1937)
* Fix double saving snapshots

https://forums.zotero.org/discussion/86796/duplicated-snapshots

I was able to replicate it by adding a 5 second delay here:
a72ae14816/chrome/content/zotero/xpcom/translation/translate_item.js (L196)

This was caused from a race condition and (a72ae14) did not fully
solve the problem. Now this is tested and fixed.
2020-12-27 03:31:30 -05:00
Dan Stillman
460be2a8c3 Update version 2020-12-24 04:00:06 -05:00
Dan Stillman
dfb32fd098 Update to 1.0.6 of the ESLint config 2020-12-24 02:57:57 -05:00
Dan Stillman
591ffcc83e
Merge pull request #1930 from fletcherhaz/ace-editor
Use Ace editor for Run JavaScript
2020-12-24 02:57:01 -05:00
Dan Stillman
c1976098e9 Run JavaScript: Hide spurious linting error 2020-12-24 02:55:33 -05: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
1040ba0b5e Run JavaScript: Detect await at the beginning of a line 2020-12-24 02:46:55 -05:00
Dan Stillman
018f04f369 Scaffold: Focus code editor when selecting tab 2020-12-24 02:46:19 -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
Dan Stillman
e095dbb031 Ace: Fix path to ace.html (#1930) 2020-12-24 02:41:51 -05:00
Dan Stillman
8b9d32c65b Update locales from Transifex and merge new English strings 2020-12-23 23:29:00 -05:00