Commit graph

10634 commits

Author SHA1 Message Date
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
Tom Najdek
f454e110ec Fix missing icon regression
* After 02b864d icon next to the filter icon in the tab selector has
gone missing. This is because the chevron-6 has been moved to a new
location
* Tweaked CSS for this and other universal icons to use new location
* Removed duplicate icons in the old location
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
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
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
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