In particular, remove code related to opening/closing the Zotero pane,
which affects tests. The pane is now opened by default in Firefox, which
brings its behavior closer to the main version.
As of Fx60, XPathResult is no longer available as nsIDOMXPathResult in
XPCOM, so just shim its constants, which are all we need, when adding it
to the sandbox.
`nsIFilePicker::show()` is removed in Firefox 60 in favor of `open()`,
which takes a callback (and apparently has been preferred for a long
time).
There's no point switching to that, so this module is a version of
nsIFilePicker with an async `show()` that returns a promise and some
XPCOM-isms replaced (e.g., string paths instead of nsIFile).
Legacy/unsigned add-on warnings are now hidden via CSS in the Firefox
build, so remove the code that tries to do that, and instead add a class
to any other warnings so they can be selectively shown.
StopIteration is no longer supported in Firefox 60, so instead of taking
a generator function that might throw StopIteration for the second
parameter, take a function that is passed to iterator.forEach() that
receives an OS.File.DirectoryIterator.Entry for each directory entry. If
the function returns a promise, it's waited for.
Also update other direct uses of OS.File.DirectoryIterator to remove
StopIteration use.
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.
fetch_xulrunner.sh updates the built-in path to point to this file, but
it's not currently being read properly for some reason (and I'm not sure
it does anything we need).
- getStringPref/setStringPref are now used for strings instead of
getComplexValue/setComplexValue
- Remove nsIPrefBranch2 reference
- If there was a pref failure during initialization, nothing was logged
to the terminal
- 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
The menu includes all user interface options from the General
preferences (now removed from the preferences), toggles for the
collections pane, item pane, and tag selector, and, at long last, a
toggle for recursive collections ("Display Items from Subcollections").
The collections pane and item pane no longer reopen automatically when
restarting Zotero. People might still close them by mistake and not find
this menu, but we'll see how it goes.
Closes#1372
When the filename limit isn't 255 on Linux, it's probably because of
eCryptfs, but we were checking the character length instead of the byte
length before shortening the filename to 143 bytes.
If a parent item was expanded and all items in the tree, including the
item's child items, were selected, Cmd + Left Arrow would break the
items tree until restart.
This will cause a conflict and need to be applied to the new tree.
(Worth noting that collapseSelectedRows() is currently only called on
Cmd-left-arrow because the XUL tree seemingly swallows a regular
left-arrow (and only applies the collapse to the last-selected row). The
comment in the keypress listener where collapseSelectedRows() is called
suggests that that was meant to be used for all left-arrow keypresses,
but either that stopped working at some point or it only ever worked for
Cmd + Left Arrow because it bypasses the normal tree handling of left-
arrow. In any case, it would be better if left-arrow always collapsed
selected rows, with or without Cmd.)
https://forums.zotero.org/discussion/78515/bug-collapsing-all-items-in-a-collection-breaks-display-of-items-in-all-collections