Commit graph

10678 commits

Author SHA1 Message Date
abaevbog
7d1f58ce5e fixed to keyboard tab navigation regressions
- 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
2024-01-24 23:32:10 -05:00
abaevbog
32bfc267a7 itembox value fields and editable-text tweaks
- 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
2024-01-24 23:32:10 -05:00
windingwind
56cef1d504 Fix advancedSearch menu 2024-01-24 23:32:10 -05:00
Abe Jellinek
90b3c2206b Animate Abstract open completely, simplify
(And remove the unused 'toggle' event.)
2024-01-24 23:32:10 -05:00
Abe Jellinek
a9d30b7e8a Fix static height remaining after _runWithTransitionsDisabled() 2024-01-24 23:32:10 -05:00
abaevbog
8c0116d1db tabs menu update and minor refactoring
- 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
2024-01-24 23:32:01 -05:00
Abe Jellinek
a2e8294389 Add highlight to show whether notes or item pane is active 2024-01-24 23:32:00 -05:00
Tom Najdek
bdc5f71990 Fix unselectable tree item elements
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.
2024-01-24 23:32:00 -05:00
Martynas Bagdonas
7507e24998 Add "Eraser" string 2024-01-24 23:32:00 -05:00
Abe Jellinek
691e5d8cc1 Tags box: Fix multiline editing after editable-text changes 2024-01-24 23:32:00 -05:00
Abe Jellinek
fca87eff9c Tags box: Add new tag before editor when Enter is pressed
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.
2024-01-24 23:32:00 -05:00
Abe Jellinek
ccdd6c08ba Libraries & Collections: Add sibling after *all* children
Not only direct children
2024-01-24 23:31:53 -05:00
Abe Jellinek
f0c9e42a8e Show menu when adding from attachments-box 2024-01-24 23:31:53 -05:00
Abe Jellinek
9a07c8cb2e Prevent error when switching from reader to library 2024-01-24 23:31:52 -05:00
Abe Jellinek
9892601153 Update tags-box count when empty row is removed 2024-01-24 23:31:52 -05:00
Abe Jellinek
d62c9e217b Don't show sidenav Expand/Collapse button in library view 2024-01-24 23:31:52 -05:00
Dan Stillman
0facc521b2 Restore menus for attachment/note toolbar buttons and update File menu
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
2024-01-24 23:31:52 -05:00
Dan Stillman
b15313fc3e Fix "Manage Attachments" menu being disabled incorrectly
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.
2024-01-24 23:31:52 -05:00
Dan Stillman
0f60207287 Fix "Attachments" and "Notes" labels in columnpicker
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.
2024-01-24 23:31:52 -05:00
windingwind
1b9f7424eb Fix itemPane.js eslint errors 2024-01-24 23:31:52 -05:00
Dan Stillman
d85f04a408 Migrate creator-move strings to Fluent
(Extracted from itemBox redesign commit)
2024-01-24 23:31:52 -05:00
Bogdan Abaev
13de06cd52 itemBox redesign
- Table structure rewrite to use grid layout instead
of the <table> component so that screen readers can see the content
- Added icons to mirror right-click actions
- Moved creator actions to the options menu
- Drag-drop to reorder creators
- Using editable-text instead of clicky component
- Consolidated autocomplete logic in one function
- Added @focus-ring to all components of the itemBox
- Fields are focusable and navigatable via keyboard in non-edit modes
- General refactoring to consolidate stylesheets across platforms
and remove code that's not more used (mainly related to handling old
clicky text component).
- Retractions panel background set for --material-background instead
of light pink in dark mode.
2024-01-24 23:31:52 -05:00
Bogdan Abaev
553d1f6b3c editable-text updates
- Added nowrap attribute to not add the stretching aspect
of the editable-text and to not have any text wrapping. To be used in cases when
the input is a single line and it's width is stretched with flexbox, for
example tags or itemBox value fields.
- Added 'tight' attribute to set lower padding values on editable-text.
To be applied on fields that are not as prominent as abstract or header
as it makes the actual editable-text component smaller.
- Minor style changes to not shift layout on focus on windows (using
transparent border instead of 0 margin).
- No overflow of textarea to avoid longer-than-needed textareas on
windows.
- Keep track if the component was focused on via mouse click or not.
If the focus happened without prior mouse click, select all text.
- Reset cursor and selection on blur.
- Make sure the .input is always re-added if it disappears after drag-drop.
- Added sizeToContent function to set max-width based on the width
of the input.
- Allow the browser to break up words more freely with overflow-wrap: anywhere
to avoid stretching the itemBox with extra long header without spaces.

-  Apply 'nowrap' and 'tight' to tags so that a long tag does not stretch
the itemBox or make the editable-text extra tall.
2024-01-24 23:31:52 -05:00
Abe Jellinek
527c30b8c1 Initial implementation of Libraries and Collections box 2024-01-24 23:31:51 -05:00
windingwind
a3dec4be45 Fix Scaffold for redesign 2024-01-24 23:31:51 -05:00
windingwind
b649a1a953 Fix context pane return button and background
* Fix context pane return button and background
* Remove unused code
* Fix tab notes container background
* Fix context pane sections background
2024-01-24 23:31:51 -05:00
abaevbog
133fb3ad23 improve collection search filter expansion
- Speed up transition to 0.2s
- Focus once the transition is fully done
- The actual input field is hidden and the button is displayed 50 milliseconds
after the field starts shrinking to not have the magnifying glass
appear to the right of the input field right before the input is
hidden.
2024-01-24 23:31:51 -05:00
Abe Jellinek
583c6328a0 Unify context pane into new item pane/sidenav design 2024-01-24 23:31:51 -05:00
windingwind
f9a2f2f3e0 Fix Linux UI bugs 2024-01-24 23:31:51 -05:00
abaevbog
fb26921e11 Opened tabs menu with a search bar
- Matching substrings from tab's title are bolded.
- Drag-and-drop functionality to reorder tabs.
- ArrowUp/ArrowDown navigate the tab's titles. Tab/Shift-Tab move
across both titles and close buttons. Enter from filter field focuses
the first tab's title. Home/PageUp focuses the filter field. End/PageDown
focuses the last tab's title. ArrowUp/ArrowDown from the filter focus
the last/first tab's title respectively. ArrowUp from the first tab or
ArrowDown from the last tab focus the filter.
2024-01-24 23:31:51 -05:00
windingwind
843d23bbd2 Preferences redesign 2024-01-24 23:31:51 -05:00
windingwind
c6505d3e39 Fix submenu animation 2024-01-24 23:31:51 -05:00
Abe Jellinek
0b81fef457 Show sidenav in feeds 2024-01-24 23:31:51 -05:00
windingwind
e7e477fcdb About window redesign 2024-01-24 23:31:50 -05:00
windingwind
1ce70262e1 Fix splitter theme 2024-01-24 23:31:50 -05:00
windingwind
91ec79401d Add window inactive opacity to toolbar and tabs 2024-01-24 23:31:50 -05:00
Dan Stillman
16f66227bd Tweak padding for test-build warning 2024-01-24 23:31:50 -05:00
windingwind
b18a47b0d2 Remove stop sync button 2024-01-24 23:31:50 -05:00
Tom Najdek
df80c7573a Animate chevron when opening collection/item 2024-01-24 23:31:50 -05:00
windingwind
db5863fa0a Use redesign loading icon for sync spinner 2024-01-24 23:31:50 -05:00
Dan Stillman
c8c3856214 Adjust font-size increments
- Align with integer px values
- Add more granular resizing for common sizes
- Allow sizes smaller than the default (now 13px)
2024-01-24 23:31:49 -05:00
windingwind
a8016b1b2f Fix MacOS non-native checkbox menu options should be indented even if no checkbox 2024-01-24 23:31:46 -05:00
windingwind
687a6c5091 Fix exiting a submenu flashes the entire menu closed 2024-01-24 04:03:40 -05:00
windingwind
f5f475f738 Fix closing and reopening a *native* menu too quickly causes it to be closed again 2024-01-24 04:03:40 -05:00
windingwind
2a16c3c161 Fix library lookup icon 2024-01-24 04:03:40 -05:00
Abe Jellinek
16cadf1de7 Prevent dragging library tab 2024-01-24 04:03:36 -05:00
Abe Jellinek
ba0475810c Scaffold: Implement new toolbar
New icons and new scaffold.scss go into chrome://zotero/skin. The separate root
for Scaffold is mostly a historical relic, and adding special cases to build
scripts, SCSS mixins, and so on would just make things complicated.
2024-01-24 04:03:36 -05:00
windingwind
df0c2e2fd2 Toolbar redesign 2024-01-24 04:03:36 -05:00
Tom Najdek
bd067df4f6 Tabs redesign 2024-01-24 04:03:36 -05:00
abaevbog
a2e034c921 collection search not focusing group on Enter fix
While looking for the first matching row to select, stop looking
and move focus to the tree only after the selection succeeded.
Some matching rows, like groups header, are not selectable. If it's the
first matching row, it will now be skipped.
2024-01-24 04:03:36 -05:00