Commit graph

9629 commits

Author SHA1 Message Date
Abe Jellinek
a1134255ee Always rerender sidenav, even if item doesn't change
Feeds issue remains.
2024-01-24 23:32:23 -05:00
Abe Jellinek
2b50536775 Tweak method name 2024-01-24 23:32:23 -05:00
Dan Stillman
c2cc5e1935 Separate lines for extension-change confirmation into two strings 2024-01-24 23:32:23 -05:00
windingwind
4f73ea0cfa Fix attachment box rename 2024-01-24 23:32:23 -05:00
Abe Jellinek
3472d6cabe Prevent window overflow in Standard mode 2024-01-24 23:32:23 -05:00
Dan Stillman
613a907f3e Change pref from reader.useDarkModeForContent to reader.contentDarkMode 2024-01-24 23:32:23 -05:00
abaevbog
620b35ab78 minor focus tweaks
- after an item is added via "Add item by identifier" panel, end
focus to that item in itemTree.
- restored default behavior when the focus remains visible around an
element when all menupopups open, except for the item type menu in itemBox.
- opening item type menu will still hide the focus-ring
2024-01-24 23:32:23 -05:00
abaevbog
ed8e3f142b itempane keyboard navigation
- right/left arrows on section header expand/collapse the sections
- space/enter on section header toggle section collapsed/expanded
- tab from the header goes through the header's buttons and then
tabs into the section if that's opened
- arrow up/down on the header jumps to the previous/next header
- space/enter on clickable elements simulate a click
- if there is a pinned section, tab from the title will focus its header
2024-01-24 23:32:23 -05:00
windingwind
3bdcf34a89 Fix stacked mode layout when toggle item pane 2024-01-24 23:32:23 -05:00
windingwind
7f58873e0b Fix item pane size when switching to note in stacked mode 2024-01-24 23:32:23 -05:00
Dan Stillman
1d8baa635a New app icons 2024-01-24 23:32:22 -05:00
Tom Najdek
ccfc3127ba Tweak padding in the tag selector list 2024-01-24 23:32:22 -05:00
Dan Stillman
61cca0fc69 Use Fluent instead of DTD for "Use Dark Mode for Content" string 2024-01-24 23:32:22 -05:00
abaevbog
11fc1ebd8e remove "Go to this item online" tooltip from url field in itembox
Also:

- set the .tooltiptext for options button in fluent file, so that text
shows up on hover
- added tooltiptext to creator + and - buttons
2024-01-24 23:32:22 -05:00
Abe Jellinek
b8f2aaafa9 Attachment preview: Fix cut-off snapshots
Also:
- Prevent selecting any text within the snapshot
2024-01-24 23:32:22 -05:00
Abe Jellinek
832a6f3eff Fix right-click -> Merge Items... 2024-01-24 23:32:22 -05:00
windingwind
0cd7a52dc0 Fix attachment preview retry and error catch 2024-01-24 23:32:21 -05:00
windingwind
1c343ee820 Fix viewItem unnecessary scroll 2024-01-24 23:32:21 -05:00
windingwind
86947d7154 Remove attachment-preview-box 2024-01-24 23:32:21 -05:00
Abe Jellinek
3ac8f803c9 Fix duplicate creator context menus, extract utility function 2024-01-24 23:32:21 -05:00
Abe Jellinek
f468245caf Attachments box: Don't set this._item to non-regular item
Fixes occasional errors due to `getAttachments()` being called on a
non-regular item in `updateCount()`.
2024-01-24 23:32:21 -05:00
Martynas Bagdonas
c208325aeb Add menu option to toggle dark mode for reader content 2024-01-24 23:32:21 -05:00
Abe Jellinek
c549a96834 Restore notes-box add button 2024-01-24 23:32:21 -05:00
Tom Najdek
03be35426c Couple of small fixes to the tag selector
* Add bottom padding
* Increase padding for macOS 0-width scrollbars
2024-01-24 23:32:21 -05:00
Dan Stillman
f084b8c8ad Move density options to separate submenu in View 2024-01-24 23:32:20 -05:00
abaevbog
4a096665a0 refresh collectionTree rowMap after row is added
It prevents the trash row from getting wrong offset and overlapping
with the row above it
2024-01-24 23:32:20 -05:00
Abe Jellinek
be3d7c95f9 Match Reset Sync with "Sync Reset Options"
Only adding warning2 because that's really the only relevant, searchable part of the warning.
2024-01-24 23:32:20 -05:00
Abe Jellinek
05747f050a Fix undefined errors in feed settings window 2024-01-24 23:32:19 -05:00
windingwind
982289b484 Fix dialog background 2024-01-24 23:32:19 -05:00
Tom Najdek
2f9a12c2da Improve "Run JavaScript" dialog 2024-01-24 23:32:19 -05:00
Tom Najdek
a54ed665bf Improve style editor dialog 2024-01-24 23:32:19 -05:00
Tom Najdek
c514f92f9b Update csl editor theme based on system color scheme 2024-01-24 23:32:19 -05:00
Tom Najdek
d99ad84d4c Improve long tag fixer dialog 2024-01-24 23:32:19 -05:00
Tom Najdek
f0de6d0d57 Tweak spacing in select items dialog 2024-01-24 23:32:19 -05:00
Tom Najdek
701c76aa3f Redesign RTF Scan wizard 2024-01-24 23:32:19 -05:00
Tom Najdek
b30e975379 Inject custom styles into <wizard>
<wizard> is a custom element built-in in FF. This commit monkey-patches
attachShadow to inject custom styles into the shadow root of <wizard>.
2024-01-24 23:32:19 -05:00
Abe Jellinek
37d2b41778 Make clicky item icons match line height 2024-01-24 23:32:18 -05:00
Abe Jellinek
1d662b9fef Preferences: Fix and improve search 2024-01-24 23:32:18 -05:00
Abe Jellinek
fbbe9625fc Focus new tag when popup is opened 2024-01-24 23:32:18 -05:00
Abe Jellinek
6948252e32 Prevent collapsing / hide twisty in tags popup 2024-01-24 23:32:18 -05:00
Abe Jellinek
8e3abd8706 Add padding to reader tags popup
And move styles to SCSS.
2024-01-24 23:32:18 -05:00
Abe Jellinek
482e436203 Import SCSS in reader windows
Fixes unstyled tags popup.
2024-01-24 23:32:18 -05:00
Abe Jellinek
b391b6ca21 Tags box: Fix tag being saved every time autocomplete popup hides 2024-01-24 23:32:18 -05:00
Dan Stillman
f2bf40a314 Don't default existing users to Compact 2024-01-24 23:32:18 -05:00
Abe Jellinek
99b0411857 Return created collection from newCollection()
Regression from fd0664bfb06409118ecaff73e064ab9c3103d823
2024-01-24 23:32:17 -05:00
Abe Jellinek
57a1214eaa Remove reader pointerdown listener on close
Avoids a memory leak.
2024-01-24 23:32:17 -05:00
Abe Jellinek
2624770cea Remove debug from collapsible-section 2024-01-24 23:32:17 -05:00
Abe Jellinek
49fe2b98d9 Restore tag autocomplete popup
Regression from 275ea6f because of a duplicate element ID. Now we only create
one popup, even if there are multiple tags-boxes.
2024-01-24 23:32:17 -05:00
windingwind
b2ce3d4a5c Fix sidenav button default status 2024-01-24 23:32:17 -05:00
windingwind
365e97ba1e Fix quick search does not re-run when changing mode 2024-01-24 23:32:17 -05:00
Dan Stillman
0c089efd8a More attachment box fixes
- Only try to show preview or check file existence for file attachments
- Use fileExists() for file check
- Show Accessed for linked-URL attachments
2024-01-24 23:32:17 -05:00
windingwind
61a5704dd4 Fix attachment box bugs 2024-01-24 23:32:17 -05:00
Dan Stillman
b34d0d2acc Fix regression in Zotero.FullText.canReindex() 2024-01-24 23:32:16 -05:00
Dan Stillman
3b9afcc500 Add Zotero.FullText.canIndex()
Currently identical to canReindex(), but in theory attachments aren't
supposed to be reindexable if they're already fully indexed
2024-01-24 23:32:16 -05:00
Bogdan Abaev
3338b4b285 new item focus handling tweaks
- properly re-focus previously focused item type menu in itemBox
- fix strange behavior of re-emerging item type menu popup caused by
itemBox.focusFirstField
- force the focus-ring to be around the itemType menu
2024-01-24 23:32:16 -05:00
Bogdan Abaev
b6d5a52417 additional focus management for popups
When a menupopup is opened, the active element does not change, so
their focus-ring will be hidden until the menupopup closes for it to be
less distracting.

When a panel popup is opened, the focus will be moved inside
of the panel, so we keep track of whichever element was previously
focused, and re-focus it when the panel goes away.

Minor reorganization of focus-ring mixin to use variables instead
of parameters to make hiding of focus-ring easier.
2024-01-24 23:32:16 -05:00
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
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
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
windingwind
1b9f7424eb Fix itemPane.js eslint errors 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
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
Abe Jellinek
632870683b Fix regression that broke section opening animation 2024-01-24 04:03:36 -05:00
Abe Jellinek
e04ef87929 Scaffold: Initial redesign changes
- Space between Min. Version and Priority
- Fix white-on-white tabs
2024-01-24 04:03:35 -05:00
Abe Jellinek
c78739bf2f Update and improve attachment-row initialization
- Actually show un-deleted rows as context rows within trash
- Add all rows, hide ones that shouldn't be shown
- Check whether attachment is file before calling getAnnotations()
  - Fixes errors on update and new link attachments being shown as empty rows
2024-01-24 04:03:35 -05:00
Abe Jellinek
e4b329bffc Only scroll/pin section on left-click
To prevent a right-click on the Info section (which has no context menu) from
scrolling to it, along with other weirdness.
2024-01-24 04:03:35 -05:00
Abe Jellinek
c16a2d4b05 Resize editable-text after Esc pressed 2024-01-24 04:03:35 -05:00
Abe Jellinek
c50a3a8615 Use system color for Debug Output background 2024-01-24 04:03:28 -05:00
Abe Jellinek
dacfe68a28 Fix overscroll growing the item pane on Windows 11 2024-01-24 04:03:26 -05:00
Abe Jellinek
ef608c094a Remove Windows .zotero-view-item style overrides 2024-01-24 04:03:23 -05:00
Abe Jellinek
4a15b2633a Remove section title highlight on sidenav click 2024-01-24 04:03:18 -05:00
Tom Najdek
a8a1b8fe06 Reduce gap between tags in the tag selector 2024-01-24 04:03:17 -05:00
Abe Jellinek
19b78e2b20 Implement new pane selection algorithm, remove bottom padding 2024-01-24 04:03:17 -05:00
abaevbog
cc9d58e6be adjust spacing within tag selector
1. Decrease the gap after colored tags.
2. In compact mode, decrease the splitter height.
2024-01-24 04:03:17 -05:00
windingwind
97996310ea Show accessKey when press alt 2024-01-24 04:03:14 -05:00
Tom Najdek
f67efc90f1 Fix: Tags now have a proper drop target size 2024-01-24 04:03:13 -05:00
Tom Najdek
8627e92cb4 Fix items table potentially not rendering after merge
In d4f8c7c an entry has been removed from zotero.properties that is still being
used in items table. If `numNotes` column is visible, items table would not
render.

Instead of re-adding to zotero.properties, I've migrated this string to
zotero.ftl to fix this problem.
2024-01-24 04:03:13 -05:00
Abe Jellinek
bf72c9d828 Notes/Tags/Related redesign 2024-01-24 04:03:13 -05:00
Tom Najdek
374b5337d8 Items table redesign 2024-01-24 04:03:13 -05:00
windingwind
077214a327 Add menu icons and unify Open PDF/EPUB/Snapshot options 2024-01-24 04:03:13 -05:00
Bogdan Abaev
a7fe2130ce no override of arrow up/down actions in toolbar search fields 2024-01-24 04:03:12 -05:00
Bogdan Abaev
f8a6b82c63 collection search 2024-01-24 04:03:12 -05:00
windingwind
7da00957ef Unify tab bar on Windows/Linux 2024-01-24 04:03:12 -05:00
Tom Najdek
7fe5f0145d Restyle tags splitter 2024-01-24 04:03:12 -05:00
Tom Najdek
9ff76d2dd9 Restyle Tag Selector
* Render a colored dot for colored tags
* Improve spacing and positioning, especially on 2x screens
* Add scss map for tag colors in light/dark scheme
* Add support for compact/comfortable in tag selector
* Restyle filter box, add a placeholder and a new icon
2024-01-24 04:03:12 -05:00
Tom Najdek
ff115b0873 Tweak search component to accept data-/aria- props 2024-01-24 04:03:12 -05:00
Tom Najdek
ce64147aa8 Add "pick" and "omit" utils
Helpful when dealing with props in react components
2024-01-24 04:03:12 -05:00
Abe Jellinek
fe6fdd3ff6 Ensure require() is available to CEs 2024-01-24 04:03:08 -05:00
abaevbog
71af85adb3 minor fixes to keyboard navigation
1. Swap focus direction for ArrowUp and ArrowDown events when applicable.
ArrowUp = Shift-Tab, ArrowDown - Tab.
2. Remove ArrowLeft, ArrowRight event listeners from quicksearch menus
to not prevent cursor navigation within the actual text field.
3. Tweaks to fix advanced search mode from quicksearch when " is typed.
2024-01-24 04:03:02 -05:00
Abe Jellinek
6bc97a6af6 Extract field transform menu and use for title header
And extract edit context menu building code into a separate function in
`editMenuOverlay.js` so we can build menus on top of it.
2024-01-24 03:42:43 -05:00
Abe Jellinek
17f758d0cf Use Zotero.isMac in customElements CE patch
AppConstants is occasionally undefined - not sure why.
2024-01-24 03:42:43 -05:00
Abe Jellinek
810402c9c7 Implement pane header, non-tabbed layout, collapsible sections, and new abstract box 2024-01-24 03:42:43 -05:00
Abe Jellinek
d2694bfba7 Add attachmentEPUB[Link] to getImageSrc() 2024-01-24 03:42:43 -05:00
Abe Jellinek
a2f259d14c Use item type CSS icons in more places
.icon-item-type is now global, with extra styling to handle row selection when
it's inside the item tree.

getImageSrc() is still used for progress windows, which is probably OK for now
because those don't stay on screen for very long. I've updated it to return SVGs
based on the current UI color scheme.

Other code uses treeitem-* images directly; getting rid of those references will
cause a lot of conflicts and be a bit more involved than this initial pass, so
I'll put that in a separate PR.
2024-01-24 03:42:43 -05:00
abaevbog
200e1d7564 toolbar and keyboard navigation updates
1. Toolbarbuttons changes:
	1. “New Library” moved from toolbar to File menu
	2. “New note” on click makes a standalone note
	3. “New attachment” on click adds stored copy of a file
	4. Menuitems from old note or attachment menus moved to the File menu
	5. “Advanced search” removed. Sync and Locate buttons moved to the top-right corner (Locate - temporarily)
	6. Added “Opened tabs” toolbarbutton
	7. Updated tooltips
2. Added a toolbarbutton that reveals collection search field on click. Search field is hidden on blur if empty. Keyboard accessibility via tab/shift-tab.
3. Tab based navigation restructuring. For each component, create a mapping of target ids with desired focus destination for each relevant keyboard event and use that to determine where to move focus next. Fixed bugs with focus wraparound not working when a note or attachment is opened in contextMenu.
4. Make quick-search dropmarker a sibling of the textfield. QuickSearchTextbox does not extend search-textfield anymore. It serves as a container to house dropmarker and textfield as siblings. This is needed to remove focus ring from quick search textbook when focus moves onto the dropmarker.
5. Separate toolbars for item and collection trees. Removed unused code manually setting the width of toolbar section
6. Focusable tabs + keyboard navigation:
	1. Shift-tab from opened tabs menu moves focus to the currently opened tab
	2. When a tab has focus, use left/right arrows to select tabs, or CMD/Ctrl + arrows to move focus between tabs
	3. Enter or Space on a focused tab will select it if needed and move focus to the contentPane of the reader of this tab
	4. Shift-tab from tabs wraps focus around to itemTree or itemPane
7. “New collection” creates collection contextually within currently selected library or collection.
8. Items pane minimum width increase to avoid quicksearch from being squashed
9. Do not move focus to title field of itemBox after itemTypeMenu is closed with ESC.
10. Display all itemTypes without "Show more" submenu in "New Item" meunu. Removed "Store Copy of File" and "Link to File" from "New Item" menu.
2024-01-24 03:42:42 -05:00
Tom Najdek
3f91729141 collections tree redesign
- new icons
- new twisty (also for items tree)
- new mixin focus-states that can be re-used for less boilerplate
- dark/white compatible with tweaks for when tree is focused (these changes also affect items tree)
- removed macOS specific behaviour (blue-ish background, gradient for selected row)
- border-radius on highlight + spacing tweaks
- tweaked colors and fonts
- Support for "compact"/"comfortable"
2024-01-24 03:42:42 -05:00
Tom Najdek
03d10f7de7 Switch to new svg icons for item types 2024-01-24 03:39:09 -05:00
Tom Najdek
61f9d65552 Add utils for css-based icons 2024-01-24 03:39:09 -05:00
Abe Jellinek
1dd3812e00 Deprecate setFontSize(), replace with new Zotero.UIProperties
This new XPCOM module handles font size and UI density and automatically keeps
registered roots up to date when prefs change. Roots receive a
UIPropertiesChanged event after their properties are updated.
2024-01-24 03:39:09 -05:00
Abe Jellinek
d6e5da403c Add uiDensity pref and menu controls 2024-01-24 03:39:08 -05:00
abaevbog
be4ecb31bc separator after colored tags 2024-01-24 03:39:08 -05:00
Abe Jellinek
c3d45a8a29 Set auto dark mode by default, add pref control 2024-01-24 03:39:08 -05:00
abaevbog
5c337808ab show advanced search menuitem in quicksearch menu
In quicksearch menu, display a menuitem after a separator that
opens the advanced search window.
2024-01-24 03:39:08 -05:00
Abe Jellinek
a37dd2462a Disable error reporting in Scaffold 2024-01-23 12:06:40 -05:00
Adomas Ven
ac7eb87632
Add an "Open Documents" section to the citation dialog. Closes #3332 (#3544)
- Sort the Open Documents section by reverse-open order and further by
  reverse tab order (if unopened in this session).
- If Library is selected in the Zotero window, automatically show and
  filter at the top selected items
2024-01-21 01:34:09 -05:00
Abe Jellinek
21e50add60
Rename Safe Mode to Troubleshooting Mode (#3563) 2024-01-13 04:33:19 -05:00
Adomas Venčkauskas
7811d78cb0 Fix quick search item tree issues when moving attachments into/out of parents
Closes #3561
2024-01-12 10:31:00 +02:00
Adomas Venčkauskas
9a6b35b962 Ensure the captcha clearing window is activated upon open on macOS 2024-01-08 12:27:20 +02:00
Adomas Venčkauskas
b03dbee3e8 Fix Hidden Browser logged error when debugging is enabled
Regression 8b77c96
2024-01-08 12:19:14 +02:00
Abe Jellinek
8b7c0433e8 Preferences: Fix missing LABD icon when path contains a space 2024-01-04 13:46:04 -08:00
Abe Jellinek
071bf06995
Scaffold: Use standard ESLint options (#3498) 2023-12-27 05:29:12 -05:00
Dan Stillman
03432718e3 Update translate submodule 2023-12-27 04:44:47 -05:00
Adomas Ven
8b77c96e97
Displays a browser window to clear captcha when saving attachments. (#3526)
- Currently enabled only for ScienceDirect. Can be enabled via a whitelist
- Matches the HiddenBrowser loaded HTML page for a captcha element. If
  the captcha element class changes, this will break (but the
  alternative is potentially displaying a captcha clearing window when
  something else that is not a captcha guard is loaded).
- Captcha clear timeout for 60s.
- Doesn't automatically switch focus back to the browser which intiated
  the item save via the Connector.
- Stores the cookies used to clear the captcha for future saves from the
  same domain. Discards Connector supplied User Agent, since CF bot
  detector checks UA header against actual UA behavior like TLS handshake
  and if the UA acts different to what it's supposed to, the bot
  challenge is not cleared.

Other changes:
- Adjusted the cookie sandbox to allow multiple cookie sandboxes to be
  active (and simplified some legacy code that was meant to cover a bug
  in old FX codebase).
- HiddenBrowser API changed to be Object oriented, translator tester
  in the translate repo will need to be updated after a merge (have the
  change ready).
- Improved Connector Server attachment progress handling
2023-12-27 04:43:50 -05:00
Abe Jellinek
c9b4daf152
Add Help -> Restart in Safe Mode... and a toolbar indicator (#3209) 2023-12-23 00:05:36 -05:00
Adomas Venčkauskas
5536f8d2bd Citation dialog: match year-ranges (e.g. 1992-2002) for search
Instead of as page locators
2023-12-20 12:52:21 +02:00
Martynas Bagdonas
b31f66ddbd Fix related-box error in not yet connected element 2023-12-14 18:22:30 +02:00
Martynas Bagdonas
3cb12a2ad3 Avoid content loss when immediately leaving item note in context pane
Fixes #3532
2023-12-14 17:59:28 +02:00
Adomas Venčkauskas
32ba987c28 Fix failing Advanced Search test (regression 172fe371) 2023-12-12 18:14:19 +02:00
Adomas Venčkauskas
8243553260 Remove old xul tree column prefs 2023-12-12 08:36:38 +02:00
Adomas Venčkauskas
172fe371dd Allow a column picker and persist columns in advanced search. Closes #1118 2023-12-12 08:35:19 +02:00
Adomas Venčkauskas
f4284a3579 Returns the translators hash on Connector ping.
Part of zotero/zotero-connectors#452
2023-12-11 13:44:26 +02:00
Adomas Venčkauskas
9971f15e61 Use url of the page if no title available in /connector/saveSnapshot 2023-12-07 13:38:56 +02:00
Adomas Venčkauskas
5a0f369f0b Do not activate item on twisty dblclick. Closes #3507 2023-12-07 11:15:08 +02:00
Dan Stillman
8a66fc02fe Add cloud-storage warning for "BaiduSyncdisk"
https://forums.zotero.org/discussion/109845/
2023-12-01 02:34:35 -05:00
Abe Jellinek
0f447c87dc Fix ZP View -> Reset Zoom
Fixes #3510
2023-11-30 15:58:52 -05:00
Dan Stillman
8a620c3a7c Remove "Create Timeline" from Tools menu
Addresses #3463 and, well, fixes #3462
2023-11-30 06:52:18 -05:00
Dan Stillman
04b87e4db7 Fix NS_ERROR_MALFORMED_URI if WebDAV URL has leading or trailing space 2023-11-30 02:47:36 -05:00
Martynas Bagdonas
52c219c8b9 Switch to Library tab when dragging over EPUB or HTML files as well 2023-11-28 11:05:13 +00:00
Martynas Bagdonas
3eb1c3fb4f Fix reader PDF view iframes not receiving mouseup event 2023-11-28 08:44:25 +00:00
abaevbog
436b19d64c
Fix inconsistent ESC behavior on text edit when reader is opened (#3417)
This is needed to let itemBox, tagBox, etc. to handle ESC
events to revent any edits made to textfields. Only applied
if the currently focused element is input or textarea.

Fixes: #3246
2023-11-21 07:42:33 -05:00
Adomas Venčkauskas
9d710ea135 Be less aggressive about sending Zotero to back after http integration commands
Report https://forums.zotero.org/discussion/109479/bug-after-adding-citation-main-window-is-hidden-76
2023-11-21 10:34:36 +02:00
Dan Stillman
2c50749ab3 Add "GoogleDrive" as cloud storage path 2023-11-18 01:34:41 -05:00
Martynas Bagdonas
94070e1b7c Fix navigation to specific annotation when using zotero://open-pdf
Fixes #3487
2023-11-15 21:54:59 +00:00
abaevbog
7c5600913b
fix to collections highlight bugs (#3412)
1. Trigger ZoteroPane.handleBlur on focusout instead of blur
to remove highlight when itemTree entries loose focus
even if ctrl/alt is still being held.
2. Prevent default event on Alt click on linux to avoid moving
focus to menubar
3. Avoid re-triggering focus multiple times
when ctrl is being held on windows to prevent highlight from becoming
stuck and not going away.

Fixes: zotero#3410
2023-11-10 19:17:01 -05:00
Abe Jellinek
cdc59e6a29 Remove debug logging from search routine
Way too slow and noisy.
2023-11-10 16:40:12 -05:00
Abe Jellinek
835542bb6f Preferences search: Match Fluent strings 2023-11-10 16:40:12 -05:00
Dan Stillman
b6d8571860 Update Z.File.getSample() signature to match getBinaryContentsAsync()
Not updated with 2b41b0127c
2023-11-10 16:30:10 -05:00
Dan Stillman
f1373652e6 Fix file:// URI handling in getBinaryContentsAsync() 2023-11-10 15:58:53 -05:00
Adomas Venčkauskas
5efd181e5b Fix Zotero 2.1 and earlier citation upgrade code 2023-11-08 09:53:39 +02:00
Dan Stillman
bf478392ce Block most resource loading in reports 2023-11-02 17:50:16 -04:00
Dan Stillman
47e55286f7 Add Baidu Netdisk and MEGA to cloud-storage-folder checks
Closes #3465
2023-10-31 05:31:06 -04:00
Martynas Bagdonas
4266df4d3a Propagate annotation deletion between reader instances of the same file
Fixes #3375
Fixes #3241
2023-10-27 18:28:43 +01:00
Adomas Venčkauskas
b71012689f Updates translate submodule. Fixes #3182 2023-10-26 13:03:00 +03:00
Adomas Venčkauskas
011dabd372 Fix corner case after #3460. Closes #3461 2023-10-24 14:24:38 +03:00
Adomas Ven
3b9d0ac1bb
Allow the collection tree rows to have custom row heights (#3460)
- The underlying changes are in windowed-list, which the item tree and
  all virtualized tables are based on, so if there are bugs they might
  show up outside of the collection tree.
- The expensive operation is adding/removing rows, since row offsets
  have to be recalculated (this includes collapsing/expanding rows).
- The cost on further drawing while scrolling is constant and shouldn't
  affect performance much.
2023-10-24 03:56:07 -04:00
Martynas Bagdonas
7e82cc5ffd Fix recursion error when toggling/resizing sidebar in reader window
Fixes #3379
2023-10-19 18:15:51 +01:00
Dan Stillman
fc088bc1f3 Update utilities submodule
Includes https://github.com/zotero/utilities/pull/30
2023-10-06 06:58:50 -04:00
Dan Stillman
a1f6821fe1 Fix attachment-title renaming bug on Windows
https://forums.zotero.org/discussion/comment/444399/#Comment_444399
2023-10-06 04:56:19 -04:00
Adomas Venčkauskas
195ea69b19 Fix tiny Quick Format dialog before text entry. Closes #3443 2023-10-03 10:24:20 +03:00
Dan Stillman
e3c64fb047 Don't migrate prefs in new profile 2023-09-29 04:06:04 -04:00
Adomas Venčkauskas
2db19ad4ca Fix http word integration word path unicode issues. 2023-09-27 12:19:38 +03:00
Dan Stillman
aef49da233 Fix nsIZipReader.close error after invalid ZIP file download 2023-09-26 05:09:40 -04:00
abaevbog
bbfc6ed817
activate collection tree row only if it's focused (#3431)
Fixes: #3426
2023-09-24 05:34:00 -04:00
Abe Jellinek
79ef266f2f
Detect more EPUBs in viewAttachment() content type fixer (#3433) 2023-09-23 03:09:23 -04:00
Abe Jellinek
c45405190a importFromFile: Remove duplicate and unused declarations
Apparently a var doesn't shadow a parameter with the same name, but that wasn't
obvious.
2023-09-22 12:20:12 -04:00
abaevbog
399baf0d73
disable "Find available PDF" if files not editable (#3430)
For example, in a public group files are not editable,
so this menu item is disabled.

Fixes: #3428
2023-09-22 09:13:36 -04:00
Abe Jellinek
f28873382d Preferences: Highlight parent of selected pane in navigation
Also, fix help and back buttons not hiding when starting a search.

Closes #3425
2023-09-21 13:39:06 -04:00
Abe Jellinek
9779c70915 Reports: Don't strip valid surrogate pairs
Without the /u (Unicode) flag, [\ud800-\udfff] matches *all* surrogate pair code
points, even when they're in a valid position in the string.

Fixes #3421
2023-09-21 13:19:22 -04:00
Adomas Venčkauskas
220eba8c63 Fix bibliography editor dialog (regression c89590c7) 2023-09-21 10:34:11 +03:00
Adomas Venčkauskas
a8ccab78f5 Fix classic citation and bibliography dialogs not persisting dimensions
The persisting logic doesn't work without an id on the root element
2023-09-21 10:34:11 +03:00
Adomas Venčkauskas
f8c3a3a31e Fix citation dialog being moved to the wrong location sometimes 2023-09-21 10:34:11 +03:00
Dan Stillman
98c1a6ca1b Fix "Export PDFs…" stopping if attachment file isn't found 2023-09-21 02:47:48 -04:00
Abe Jellinek
540a174dab TranslationChild: Make "interactive" count as readyEnough
Some pages (notably the first DOI.js test case) never get to "complete". I don't
know why! But for practically all translators that don't use defer: true,
"interactive" is ready enough.
2023-09-20 12:56:02 -04:00
Abe Jellinek
6740b2644d Make relevant prefs available in RemoteTranslate 2023-09-20 12:09:37 -04:00
Abe Jellinek
667f940a6c Reader: Use url (was baseURI) for all reader types 2023-09-15 12:33:53 -04:00
Martynas Bagdonas
1b23838d37 Load PDF file from URI to avoid keeping extra file copy in memory 2023-09-15 11:05:31 +02:00
windingwind
78fe68164f Remove reader events when plugin is disabled 2023-09-14 07:54:29 +02:00
Martynas Bagdonas
96652ea9e8 Enable plugins adding custom content to reader UI and context menus
#3373
2023-09-13 14:16:28 +02:00
Abe Jellinek
87286ca776 Remove tab content immediately
Amends 30c70a6ecd.
On some machines, the callback added in that change would never actually run, so
memory usage would grow quickly when switching between tabs. By wrapping in
setTimeout() instead of requestIdleCallback(), we keep the performance gains
from removing once the element is no longer visible (so we can avoid repaints,
rebuilding the layout tree, etc.), but we make sure that the callback gets
called nearly immediately.

#3321
2023-09-07 13:38:55 -04:00
Dan Stillman
8d93fd4c8c Fix test breakage after f68818387 2023-09-06 07:38:14 -04:00