Prevent trash/duplicated/unfiled/etc. rows from getting focused on Enter
if it is the currently selected collection row that technically
passes the filter and Enter is pressed.
Make sure that on escape, the focus is moved to collectionTree strictly
once all filtered rows are rendered. Minor refactoring to achieve
it, since setFilter is async.
Before filtering starts, save the selected row, scroll position, and
which rows were collapsed before filering, and restore them once the
filtering is over if a row was focused during filtering.
Ideally we should cache these/not recreate the menuitems every time, or
something like that, so that localization pop-in doesn't happen at all. But a
brief flash of an empty menuitem is better than a brief flash of placeholder
text.
To preserve the proper scroll behavior to top pane/pinned pane on item
change, remember which pane needs to be scrolled to when itemPane is
collapsed, and scroll to it when the itemPane is expanded.
It refreshes customRowHeights which is used by windowed list to
calculate the right offsets.
Without this, customRowHeights remains same as before deletion, so windowed
list picks the offset based on stale data, which makes it use smaller
offset that makes headers overlap with other rows.
- always scroll to selected row on empty filter
- fixed a bug that would interfere with focusing on the selected collection
on Enter if there are capital letters in the filter field
- do not display creator buttons until hovered
- make last name have flex-grow priority over first name
- removed inline margins of rows
- removed extra padding from icons
This makes it more likely that the creator name will be displayed
fully without ellipsis until it is hovered. When the buttons are
displayed on focus or hover, the last name tries to remain
unellipsized as long as the first name is still visible after buttons
appear. If the first name is too short, both names will be ellipsized.
- library tab appears in the tabs menu without the close button
and no drag functionality
- minor refactoring to simplify how the tabs icons are fetched for
items with item.getItemTypeIconName()
- added focus-ring to tabs and filter field via @focus-ring mixin
so that the focus outline looks the same for the input field and buttons
- removed default margin from the <description> component of the tab
titles that moved titles up by a bit
- make sure the visible zotero-pane tab is selected to focus on
- make sure lastFocusedElement is not set to be another tab or
<window> to not move focus on them when Enter is pressed on zotero-pane
tab
- refocus the lastFocusedElement from zoteroPane after a timeout
to make sure focus does not stay on the actual tab after mouse click
- save lastFocusedElement before closing and reopening and unloaded reader
tab so that if we move from zoteroPane to a reader tab that will be loaded
and then go back, the orignially focused element is refocused
- fixed creator names text selection glitch (hide the comma instead
of not displaying it + removed redundant value update that's no longer
needed)
- set selection direction in editableText on tab to not scroll to the
end of input
- added autocomplete to observedAttributes of editable-text to
properly add autocomplete even if autocomplete params are set after
the element has been rendered (which is needed for creator names). This
fixes wrong Esc behavior that erases autocomplete fields instead of
resetting to previous value.
- fixed creator names autocomplete and type switch regression after
the comma was removed
- tabs menu button is disabled when no reader tabs are opened
- tabs menu popup will be hidden if all tabs are closed
- keypress event handling moved from tabBar.jsx to zoteroPane.js
because all other keyboard navigation events are handled there
and it already has the functionality to skip disabled or hidden components
(e.g. tabs menu button, sync error)
- minor tweaks to tests to wait for collection search bar to hide
to get keyboard navigation tests passing
The previous workaround to ensure the twisty animation plays caused an issue
where, in some cases, tree item entries became unselectable.
Instead of skipping the rendering of the entire row (when it has been marked as
just toggled), we are now forcing the toggle animation to play after the row has
been re-rendered.
Additionally, one case where the just-toggled state wasn't cleared was fixed.