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.
Previously, when you clicked the Add button, typed a tag, and pressed Enter, the
new tag would be added *after* the now-empty editor field, putting the editor at
the top rather than the bottom.
We previously switched to just Add File and New Note buttons, but people
are going to want to create child attachments/notes via the toolbar.
This adds menus for those two buttons with clearer wording.
Also:
- Update the File menu with options that correspond to each of the four
items pane toolbar buttons (including a new menu option for Add by
Identifier)
- Update the order and wording of the Add Attachment submenu in the
items list context menu
- Remove File menu options from the reader view that were added
accidentally during the toolbar redesign
We were originally going to put it in the File menu, and its disabled
state was only being updated when the File menu was opened after
selecting an item instead of the Tools menu. But we shouldn't actually
disable it anyway, only its contents (which we're doing elsewhere), so
just take this out.
Regression from new item pane, since we were using the tab labels for
the column labels. The real fix here is to support Fluent strings for
tree columns, but that's more complicated.