Commit graph

13451 commits

Author SHA1 Message Date
Tom Najdek
f5be1b26f4 Remove cell padding from the first-column 2024-01-24 04:03:13 -05:00
Tom Najdek
60dedf7d95 Fix items table header bottom border 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
d16abb1a15 Remove duplications of chevron-12.svg 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
464c37e66f Don't use color for background of emoji tags 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
Tom Najdek
54ce9e8b3c Add color-scheme mixin 2024-01-24 04:03:12 -05:00
Tom Najdek
a68424658a Fix a bug in the build process
Fixes TypeError: Cannot read properties of undefined (reading 'toFixed')
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
78d82d22cc Fix item type icons broken on 2x screens
Icons preloading introduced in 247755c5 overrides entire background
property, not just background-image. On 2x screens (and anywhere else
where svg icons need to be scaled) icons need property `background-size:
contain` to be displayed correctly. This previously came from
`.icon-css` class but have been overriden by code generated in
`svgicon`, so to fix this, these properties need to be added to the
`svgicon`.
2024-01-24 03:42:42 -05:00
Abe Jellinek
8b9d8b1be5 Add compact/comfortable utility mixins 2024-01-24 03:42:38 -05:00
Abe Jellinek
c6ad31ca0a Preload variants of item type SVG icons 2024-01-24 03:42:34 -05:00
Tom Najdek
c7286194f8 Convert theme to css variables
* Opt-in for light and dark color schemes
* Convert scss variables in _light.scss to css variables
* Add _dark.scss for dark color scheme
* Remove unused, theme-related variables
2024-01-24 03:42:29 -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
Abe Jellinek
4d7ad51593 Update reader submodule 2024-01-09 20:44:55 -05: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
80abafbe5b Update reader submodule 2024-01-02 14:31:07 -08:00
Dan Stillman
6b996d4f99 Update translators 2023-12-27 05:29:46 -05: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