Commit graph

11 commits

Author SHA1 Message Date
Dan Stillman
abadbb2d77 Add fileInterface test for importing into selected collection
And update importFile() calls in tests to use current signature
2020-07-12 04:53:29 -04:00
Dan Stillman
8b0dbc7708 Update fileInterface test after 0f212bdd76 2020-03-24 17:53:13 -04:00
Dan Stillman
b3277de5ae Update tests after citeproc-js upgrade to match output 2017-04-15 04:35:16 -04:00
Dan Stillman
b7507b03a8 Generate citation cluster via Create Bibliography dialog
Instead of generating individual citations

This matches Quick Copy behavior and is almost certainly what people
want.
2016-08-26 02:42:56 -04:00
Dan Stillman
bdec4b119f Fix error handling during local file import translation
A failure during detect (which is normal during file import attempts)
would cause later translator detection to fail.
2016-08-22 21:41:10 -04:00
Dan Stillman
15a9fd5494 Make various collection methods synchronous
- Collection::getDescendents()
- Collections.getByLibrary()
- Collections.getByParent()

And various things that depend on those. (View with -w.)
2016-03-25 18:44:24 -04:00
Dan Stillman
74cf2a3c22 Fix hang on import that includes an HTML attachment
Closes #734, for the moment
2016-03-22 01:31:20 -04:00
Dan Stillman
daf4a8fe4d Deasyncification 🔙 😢
While trying to get translation and citing working with asynchronously
generated data, we realized that drag-and-drop support was going to
be...problematic. Firefox only supports synchronous methods for
providing drag data (unlike, it seems, the DataTransferItem interface
supported by Chrome), which means that we'd need to preload all relevant
data on item selection (bounded by export.quickCopy.dragLimit) and keep
the translate/cite methods synchronous (or maintain two separate
versions).

What we're trying instead is doing what I said in #518 we weren't going
to do: loading most object data on startup and leaving many more
functions synchronous. Essentially, this takes the various load*()
methods described in #518, moves them to startup, and makes them operate
on entire libraries rather than individual objects.

The obvious downside here (other than undoing much of the work of the
last many months) is that it increases startup time, potentially quite a
lot for larger libraries. On my laptop, with a 3,000-item library, this
adds about 3 seconds to startup time. I haven't yet tested with larger
libraries. But I'm hoping that we can optimize this further to reduce
that delay. Among other things, this is loading data for all libraries,
when it should be able to load data only for the library being viewed.
But this is also fundamentally just doing some SELECT queries and
storing the results, so it really shouldn't need to be that slow (though
performance may be bounded a bit here by XPCOM overhead).

If we can make this fast enough, it means that third-party plugins
should be able to remain much closer to their current designs. (Some
things, including saving, will still need to be made asynchronous.)
2016-03-07 17:03:58 -05:00
Simon Kornblith
2f7d2c09f0 Extend timeout for import test 2015-06-12 17:08:30 -04:00
Simon Kornblith
5cbb8de96b Re-enable import progress indicator 2015-06-12 17:06:07 -04:00
Simon Kornblith
6db380b132 Fix importing files and add a basic test
Still need to make the progress indicator work again. Also there may be
some performance to be gained by pooling item saves into a transaction
if one is already open.
2015-06-12 16:58:57 -04:00