Commit graph

13614 commits

Author SHA1 Message Date
Abe Jellinek
ecf1595998 Don't gray out collection tree row when editing name 2024-01-24 23:32:12 -05:00
abaevbog
b2e4c9bdeb include last space counting creator name width 2024-01-24 23:32:12 -05:00
abaevbog
1e793a37a8 fix collection tree test breakage
Save the child collection after removing its parent in toJSON() collectionTest.
Otherwise, getDescendents throws an error if the parent collection
tries to access the deleted child in later tests.
2024-01-24 23:32:12 -05:00
Abe Jellinek
d44b869420 Implement new New Collection dialog with parent menu 2024-01-24 23:32:12 -05:00
abaevbog
5b1fd4b628 refresh row map after collection deletion
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.
2024-01-24 23:32:12 -05:00
windingwind
cae1bf3ab0 Fix macos tab bar safe-area-start when maximized 2024-01-24 23:32:11 -05:00
windingwind
af97b3e66f Fix macos tab bar safe-area-start when fullscreen 2024-01-24 23:32:11 -05:00
Abe Jellinek
d128329cfb fixup: editable-text: Prevent a tiny vertical overflow 2024-01-24 23:32:11 -05:00
Abe Jellinek
bfec26f3cf editable-text: Correctly match ::after to text position
Fixes a rare mismatch that adds an extra line when that one pixel counts.
2024-01-24 23:32:11 -05:00
abaevbog
1f3c65a504 fix to textarea extra line at the bottom on win 2024-01-24 23:32:11 -05:00
abaevbog
741ed9b98c minor collection search improvements
- 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
2024-01-24 23:32:11 -05:00
abaevbog
7d68f75d03 improve itemBox creator names visibility
- 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.
2024-01-24 23:32:11 -05:00
Abe Jellinek
75b1747d1d Remove existing <h1>s from built-in prefpanes 2024-01-24 23:32:11 -05:00
Abe Jellinek
784f877fbd Add automatic <h1> to prefpanes 2024-01-24 23:32:11 -05:00
abaevbog
15cfdb8317 use textContent instead of innerText in table cell render 2024-01-24 23:32:11 -05:00
Tom Najdek
6a855f5c8f Fix issues with item tree row drag image
* Attachment icon being cut off due to box-sizing issue
* Twisty icon incorrect using color
* Dragged image being slightly wider than the item in the tree
2024-01-24 23:32:11 -05:00
Dan Stillman
8888fa6dcb Move Interface prefs to top of General pane
Now that light/dark mode is there, it should be prominent.
2024-01-24 23:32:11 -05:00
windingwind
318de52dc5 Fix ESLint in utilities_internal.js 2024-01-24 23:32:10 -05:00
Tom Najdek
7df21ed14c Check for scrollbar presence when calculating table widths 2024-01-24 23:32:10 -05:00
Tom Najdek
a9eb79a45b Extend hover/drag color to the edges of the items header 2024-01-24 23:32:10 -05:00
abaevbog
d8a00610da added library tab to tabs menu, minor refactoring
- 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
2024-01-24 23:32:10 -05:00
windingwind
ef062b9a8d Fix addon.id is undefined error 2024-01-24 23:32:10 -05:00
Martynas Bagdonas
8573cd785f Update note-editor submodule 2024-01-24 23:32:10 -05:00
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
Abe Jellinek
743597bc47 Let window chrome shrink
Now it's no worse than it was pre-redesign. But there's still
room for improvement, either by preventing the window from shrinking to the
point that the sidebars overflow or by making the sidebars horizontally
scrollable at very small window sizes.
2024-01-24 23:32:01 -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
Abe Jellinek
87d344e5f8 Bring back default virtualized-table background color 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
Martynas Bagdonas
7325642aa0 Update reader submodule 2024-01-24 23:32:00 -05:00
Abe Jellinek
9f8e3f1521 Use borders with color-*-on-*, not outlines
Since outlines don't take up space in the layout, but borders do.
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