Commit graph

10720 commits

Author SHA1 Message Date
Dan Stillman
1427e3e324 Open item pane if closed on New Item 2024-01-24 23:32:16 -05:00
Bogdan Abaev
8e4fd75f1d passing newItem tests 2024-01-24 23:32:16 -05:00
Bogdan Abaev
99ab42a674 Prevent trash row from receiving focus on Enter in filter box
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.
2024-01-24 23:32:16 -05:00
Bogdan Abaev
2c97a7a03e avoid blinking of focused collection row on escape
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.
2024-01-24 23:32:16 -05:00
Bogdan Abaev
0f0badea27 restore collection scroll position after filter
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.
2024-01-24 23:32:16 -05:00
yexingsha
6e7c80d97b changed all font-weight: bold/590 to 600 2024-01-24 23:32:15 -05:00
Abe Jellinek
ee5106939c Potentially fix Linux popup positioning issue 2024-01-24 23:32:15 -05:00
windingwind
f039124312 Use html label in info table 2024-01-24 23:32:15 -05:00
windingwind
d00fc7ca22 Fix attachment box info table layout 2024-01-24 23:32:15 -05:00
windingwind
3603254d35 Fix attachment row rendering bug with web attachment 2024-01-24 23:32:15 -05:00
windingwind
607f9814a0 Fix uncaught errors on item.save() coming from attachmentBox 2024-01-24 23:32:15 -05:00
windingwind
6af4605bd0 Implement attachment preview
- Implement attachment preview
- Implement attachment-box redesign
- Make filename editable
- Use new reindex icon
- Update attachment note layout
- Fix reader.js eslint errors
- Add fallback attachment icon and use redesign
- Use attachment preview for regular items
- Fix pinned pane not exists error
- Double click preview to open to page
- Fix itemPane pin bug
- Preload preview iframe
- Fix item pane scroll
- Add media preview support
- Fix item pane scroll bar on macos
- Fix reader sidebar with standalone attachment
- Fix attributeChangedCallback
- Add attachmentBox _updateAttachmentIDs
- Make attachment notes readonly and simplify note window script
- Implement convert attachment note to new note
- Support preview dragging
- Annotations box redesign
- Support custom buttons in the collapsible-section
- Add preview toggle button
- Fix collapsible section attribute listener
- Make attachment box notify sync to fix errors in test
2024-01-24 23:32:15 -05:00
windingwind
2a5d713f98 Move drag handler into utilities_internal 2024-01-24 23:32:14 -05:00
Abe Jellinek
9a0a15abbe Don't show string "PLACEHOLDER" in menu while localization runs
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.
2024-01-24 23:32:14 -05:00
Abe Jellinek
f44cc548f9 Locate menu: Get selected item(s) from current tab 2024-01-24 23:32:14 -05:00
windingwind
424afb9af6 Fix splitter style 2024-01-24 23:32:14 -05:00
yexingsha
cf241447ab fixed some spacing in collectionTree and itemTree 2024-01-24 23:32:14 -05:00
yexingsha
fc7f8b199e update some item-type icons 2024-01-24 23:32:14 -05:00
yexingsha
d06ad5c14a update toolbar, tabbar, and paneheader 2024-01-24 23:32:14 -05:00
Bogdan Abaev
30b4577283 pinned panes for reader contextPane
When tab selection changes, scroll to the pinned pane if there is one.
2024-01-24 23:32:14 -05:00
Bogdan Abaev
6ac6c2582d do not reopen collapsed itemPane on item change
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.
2024-01-24 23:32:14 -05:00
Abe Jellinek
2963b86176 Bidi: Allow switching text direction & add control for bidi pref 2024-01-24 23:32:14 -05:00
Abe Jellinek
6836bde339 Fix RTL layout issues in item tree 2024-01-24 23:32:13 -05:00
Abe Jellinek
f4d3ef94e7 New Collection dialog: Apply macOS non-native menu fixes 2024-01-24 23:32:13 -05:00
Abe Jellinek
2ab1bf6e11 RTL: Put creator commas on left, use locale character 2024-01-24 23:32:13 -05:00
Abe Jellinek
4490da93ca RTL: Flip Locate icon (by making it a zotero-tb-button) 2024-01-24 23:32:13 -05:00
Abe Jellinek
f938445271 Prevent error when itemsView hasn't been initialized 2024-01-24 23:32:12 -05:00
Abe Jellinek
64b8068504 Focus item tree on Escape in empty Quick Search textbox 2024-01-24 23:32:12 -05:00
Dan Stillman
5167ac2d6f Restore Dev/Troubleshooting Mode warning after redesign
Show label after tabs menu, and adjust Troubleshooting Mode color for
dark mode
2024-01-24 23:32:12 -05:00
Abe Jellinek
0f4a9e1482 Prevent dblclick inside collection name input from reactivating row 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
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
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
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