This resolves a problem where, in certain scenarios,
Zotero.file.download throws an exception even though file is
successfully downloaded.
Furthermore this new download function should be more memory-efficient,
improving performance when dealing with large files.
- Make citation node a leaf node.
- Don't parse citation node inner text.
- Don't trigger citation inner text updating on citation item changes.
- Format citation text only when serializing note HTML.
- Wrap individual citation items into `<span class="citation-item"></span>`.
And also the tag selector, while we're at it. Leaving enabled for the
item pane.
(Clickthrough is responding to a click when the window doesn't have
focus, rather than having the first click just raise the window.)
Fixes#2203
Closes#2168, closes#2169.
Adds find-as-you-type to locate, preference style and export
formats managers.
To enable find as you type you need to specify the getRowString(index) prop
on the VirtualizedTable. See prop comment for more info.
- Messages are shown once a day by default (within the same session for
id-less messages)
- Messages with an `id` attribute include a checkbox to not show again
for 30 days
- If an `infoURL` attribute is provided, a "More Information" button is
shown that launches that URL
- If `title` is provided, it's used for the dialog title. Otherwise
"Warning" is shown.
- Select last reopened tab instead of opening all in background
- Rearrange Close/Close Other Tabs/Reopen Closed Tabs options
- Use proper plural for Reopen Closed Tab[s]
7ef7943a17 made "Loading items…" small again after it got big during
HTMLification but made everything else (e.g., welcome message, My
Publications intro) small as well. This adds an ugly hack to keep the
loading message small for now (without passing dedicated HTML from a
bunch of different places).
Removes `defaultRowHeight` prop added in adb8aa39f in favor of a prop
that disables font size scaling. A non-default row height can still be
specified with `rowHeight`.
Most of our existing trees need to disable font size scaling, but the
idea is that pretty much everything _should_ scale with font size for
accessibility, and it's a limitation of the current prefs and other UIs
that they don't currently, so it's better to default to scaling and
gradually remove uses of this prop.
This fixes a bug where the HTML trees other than the collection and item
trees would have larger rows but without larger text when font size was
increased.
Also:
- Fixes#2157 by fixing line height adjustment on macOS when at the
default font size, applying it to all trees, and moving the explicit
`rowHeight` override from the item tree to the collection tree, which
should have more spacing than all other trees (rather than the item tree
having less).
We can do fun things now.
Also:
- Make colored tag swatches resize with the font size
- Increase border radius for color swatches, and adjust with size
Roughly center child item icons between the parent item icon and text,
which looks a bit less awkward than the previous tree's positioning. An
alternative would be to align with the beginning of the parent item text
(a value of 21), but that's a bit spaced out, at least until we have
multiple levels with additional twisties.
- Fixes selection events always being debounced
- Fixes some failing tests
- Ensures Select All command selects search matching children of
collapsed parents. Adds tests for this case
- Just a single huge commit. This has been developed over too long a
time, required many tiny changes across too many files and has seen too
many iterations to be separated into separate commits.
The original branch with all the messy commits will be kept around for
posterity
bb220ad0f2...adomasven:feature/react-item-tree
- Replaces XUL <tree> element across the whole zotero client codebase
with a custom supermegafast virtualized-table inspired by
react-virtualized yet mimicking old XUL treeview API. The
virtualized-table sits on top on a raw-to-the-metal,
interpreted-at-runtime JS based windowing solution inspired by
react-window. React-based solutions could not be used because they were
slow and Zotero UI needs to be responsive and be able to
display thousands of rows in a treeview without any slowdowns.
- Attempts were made at making this screen-reader friendly, but yet to
be tested with something like JAWS
- RTL-friendly
- Styling and behaviour across all platforms was copied as closely as
possible to the original XUL tree
- Instead of row-based scroll snapping this has smooth-scrolling. If
you're using arrow keys to browse through the tree then it effectively
snap-scrolls. Current CSS snap scroll attributes do not seem to work in
the way we would require even on up-to-date browsers, yet alone the ESR
version of FX that Zotero is on. JS solutions are either terrible for
performance or produce inexcusable jitter.
- When dragging-and-dropping items the initial drag freezes the UI for
a fairly jarring amount of time. Does not seem to be fixable due to
the synchronous code that needs to be run in the dragstart handler.
Used to be possible to run that code async with the XUL tree.
- Item tree column picker no longer has a dedicated button. Just
right-click the columns. The column preferences (width, order, etc) are
no longer handled by XUL, which required a custom serialization and
storage solution that throws warnings in the developer console due to
the amount of data being stored. Might cause temporary freezing on HDDs
upon column resize/reorder/visibility toggling.
- Context menu handling code basically unchanged, but any UI changes
that plugins may have wanted to do (including adding new columns) will
have to be redone by them. No serious thought has gone into how plugin
developers would achieve that yet.
- Opens up the possibility for awesome alternative ways to render the
tree items, including things like multiple-row view for the item tree,
which has been requested for a long while especially by users switching
from other referencing software
During Mendeley api import all attachments are fetched into temporary
location and were previously copied to the storage folder. Only after
import completed, temporary files were deleted. Therefore a complete
import required storage equal to twice the final library size. Switching
to move avoids this problem.
Also:
- Fix _isTempDownloadedFile() check
This won't make a difference until we update Firefox and get a new
SQLite version, but at that point the existing schema update steps that
recreate tables by renaming the old table would result in broken foreign
keys.
This patch will make sure that newer SQLite versions will use the legacy
behavior for the existing steps, and going forward schema update steps
that want to recreate tables will need to create a new table, migrate
the data, delete the old table, and rename the new one into place.
- We were updating global schema before migrating userdata, but a 4 → 5
upgrade involved a system.sql version bump, which wiped out itemTypes,
causing 'annotation' to not exist after the upgrade. This moves global
schema updates after userdata migration and bumps the global schema
version to repair DBs that were already upgraded and broken.
- A system.sql bump without a global schema update would result in empty
tables. This moves the global-schema-related tables to userdata.sql.
- The DB integrity check before userdata updates added in 5b9e6497a
could fail when coming from an older DB, because the checks assume
current schema. An integrity check is now done after a userdata update.
(We were already skipping the new table/index reconciliation stuff. If
old DBs are discovered to have problems that would cause a migration
step to fail, we'll fix those explicitly in the steps.)
Also:
- Make sure `version` is `versionNumber` in the `fields` table. It was
changed with a system.sql bump in 5.0, but hard-coded fields were later
removed from system.sql in favor of schema.json, meaning that anyone who
upgraded from 4.0 after that would never have `version` removed and so
would have both fields (one from before and one from schema.json).
zotero://open-pdf/library/items/AABBCCDD?annotation=[annotation-key]
Fallback to a page if annotation is missing:
zotero://open-pdf/library/items/AABBCCDD?page=123&annotation=[annotation-key]
Fixes#2125
- Set `annotation.attachmentURI` instead of `annotation.uri` when inserting annotations
- Migrate `annotation.uri` to `annotation.attachmentURI`
- Add `annotation.annotationKey` that references to the original annotation
- Delete unused embedded images when note is closed.
- Load images as soon as they are downloaded.
- Introduce new notification for download event, and a test for it.
- Prevent simultaneous downloads of the same attachment.
Just don't consider items in the trash to be linked items in
item.getLinkedItem(). I'm not totally sure why we didn't do this many
years ago, since it's one of the biggest sources of confusion in Zotero.
This addresses #1648 and closes#1610, though not by undeleting and
overwriting the item in the trash. When deleting an item and then
re-dragging it from another library, I think most people would expect
the item in the trash to still exist (possibly with notes, etc.), rather
than having been automatically restored and overwritten with new data.