Commit graph

149 commits

Author SHA1 Message Date
windingwind
8ff5d9e3e1 fx140: Fix tabs menu panel style 2025-07-30 22:30:49 -04:00
Tom Najdek
c32e050c6e Unify styles for headers of similar custom elements 2025-07-10 23:40:22 +02:00
Abe Jellinek
3102b6b67a
Always show item/context pane toggle (#5263) 2025-05-09 01:27:20 -04:00
windingwind
32009ccdb6
Fix annotation item pane title word cutoff (#5271) 2025-05-08 16:36:38 -04:00
windingwind
61b62d0a02 Improve tabs menu (#4961) 2025-05-07 01:52:54 -04:00
Abe Jellinek
c6e5e6c1e6 Revert "Show item pane toggle everywhere"
Mistaken push.

This reverts commit 4b5bee37b1.
2025-05-06 12:15:19 -04:00
Abe Jellinek
4b5bee37b1 Show item pane toggle everywhere 2025-05-06 12:05:31 -04:00
Tom Najdek
31845457a2
Fix creator type dropmarker color in dark mode 2025-05-04 15:51:28 +02:00
abaevbog
48fd23ccec
annotations showing in itemTree (#3416)
- Annotations are displayed in itemTree under their file attachments
  on a third level. The annotation spans the entire row.
- The title is constructed on the go. When possible, it
  includes annotation quote and comment as pseudo-columns
  of the row. The comment occupies about twice as much space as
  the quote. Otherwise, (if there is no quote) only the annotation
  comment
  is included as the "title" part of the row
- Non-CJK segments of the quote part of the annotation row are
  italicized. CJK segments are left as is. If CJK segments are present,
  there is more padding between quote and comment parts.
- Search matches the actual attachment instead of its parent file.
- Can create child notes from annotations of the same item or
  standalone notes from annotations across different items from
  the context menu or the header button.
- When an annotation (or multiple annotations) are selected, the
  annotationItemPane component is displayed where annotations are
  grouped by their top-level item. Annotations are displayed fully,
  without having their content cut off.
- Special treatment for annotations to always prompt
  to erase the item regardless of what collectionTree row
  is selected (e.g., if a collection is selected, we
  still want one to be able to delete the annotation).
  This only applies if all selected items are annotations.
  If multiple items are selected, some annotations and
  some not, do nothing. This is until the trash is
  ready. In the future, we may send annotations to trash
- strip all HTML tags from annotation for now, until the logic to
  properly render annotation markup is copied over from the reader
  (applies to both annotation-row component and the annotation
  item rendered in the itemTree)
- Added a generalized "expandToItem" function to itemTree to
  expand all ancestors of a given item, similar to "expandToCollection"
  from collectionTree
- add annotation conditions to advanced search
- show [Image not available] if no annotation file for ink or image
  annotations
- only keep annotation-specific context menu options when some
  annotations are selected in itemTree
- enable Quick Copy of annotations from itemTree via drag-drop,
  shortcut key, or Edit → Copy Annotation
- Minor refactoring of Zotero.Annotation.toJSON() to pull out async code
  that handles ink and image annotations, so that
  Zotero.Annotation.toJSONsync() for highlight, underline, and note
  annotations does not have to be awaited. Since ink and image
  annotation don't seem to work for drag-drop Quick Copy, they are just
  skipped for now.
2025-04-28 04:10:28 -04:00
Tom Najdek
db90eb9103
Fix misaligned attachment row delete button #5189 2025-04-07 13:03:00 +02:00
windingwind
0b8b4c0ff6
Draggable item pane sections (#5094) 2025-04-03 21:32:37 -04:00
abaevbog
a8d32291a4
itemBox: fix overlapping rows on initial load (#5176)
On initial load, the grippy does not immediately
appear because it needs to be loaded. This means that
when itemBox is rendered for the first time, the grippy
has a width of 0, which later becomes 18px. If the
itemPane is narrow, it may push the columns out
and lead to text of value components wrapping
without the rows getting stretched.

This sets explicit width to the grippy to avoid such behavior.

Fixes: zotero#5166
2025-04-02 05:27:47 -04:00
Tom Najdek
3a536c647b
Add ability to delete attachment from item pane (#5133)
Also:

- Introduce a mixin for a toolbar button that appears on hover or focus
- Unifies the border radius of such buttons, which was previously different for the "Libraries and Collections" toolbar button.
2025-03-27 23:25:52 -04:00
Abe Jellinek
8eda90cdc0
Scaffold: Add item pane-like preview of translated items (#5079) 2025-03-27 23:02:31 -04:00
abaevbog
41bb2784b5
Citation dialog: add a dropmarker to bubbles (#5130)
- add dropmarker to bubbles after the text to indicate
that bubbles are clickable
- remove X remove button that was there before
- no more mask over the bubble on hover, since dropmarker
is just always visible
- 4px distance between the dropmarker and bubble text

Fixes: #2712
2025-03-20 23:32:39 -04:00
Abe Jellinek
de0f5693e8
Make the info box ellipsis behave (#5103) 2025-03-13 23:47:40 -04:00
Abe Jellinek
9cdfadbbae
Fix space before ellipsis in editable-text (#5087) 2025-03-10 22:47:38 -04:00
Bogdan Abaev
4a00304925 Redesigned citation dialog (#4872)
Implemented redesigned citation dialog with library
and list modes one can switch between. This dialog is
a direct replacement of quickFormat and classic citation
dialogs.

In Library Mode:
- items table has a new + button column to add items from the
citation and rows of selected items are highlighted
- open, cited and selected items appear in a section
between the items table and bubbleInput. When there are no
matches, a message is shown.
- only top-level items are shown when citing
items and only notes/notes' parents - when adding a note
- selected items are gathered in a collapsible deck to save space.
Click on the deck will expand it. All selected items can be
added via "Add all" button.
- when an item is added, bubble-input may increase in height and
push itemTree lower. To try to preserve relative positioning
of the mouse, itemTree will scroll to be over the row that was just clicked

In List mode:
- arrow up/down from the input will change the selected item
with the focus remaining in the input
- selected items are a collapsible list section

Other behaviors and fixes:
- one can add any locator (not just pages) by typing its full or short name
in an input and pressing Enter (e.g. line 10, or l. 10, or chap. "test chapter")
- Added a new preference to select if the citation dialog
should always open in list mode, library mode or in the last
mode that was used
- bubbles whose items are selected in library or list mode
are highlighted
- arrow up/down from a bubble will focus the bubble
above/below it for easier navigation across bubble-input
- multi-select is supported on items in list mode or item cards in
library mode via Shift-arrow or Cmd+click to select multiple items
- Cmd/Ctrl + Enter will always accept the dialog no matter what
is focused
- when there are no bubbles, accept button is disabled
- after an item is added, bubble-input is always refocused
- added suppressed property to itemTreeMenubar to be able to
hide if in list mode, where it is not relevant. Fixed menubar
getting stuck or re-appearing on Alt keypress on Linux by setting
height: 0 vs hiding it via hidden.
- added initialFolder and onActivate prop to collectionTree to set which collection
should be reopened when dialog opens and to be able to set a custom
onActivate handler.
- added getExtraField prop to itemTree to get data on if
an item is in a citation or not

Implementation details:
- citationDialog.js is the main file. It relies on a number of
helper files in citationDialog/* directory to keep the main
file less cluttered. popupHandler.js contains the logic of
opening/closing the item details popup to add locator/prefix/suffix/etc.
keyboardHandler.js is responsible for overall keyboard navigation
throughout the dialog. searchHandler.js contains the logic
for running the search based on user's query. Finally, Helpers.js
has general helper functions that don't handle any actual logic.
- SearchHandler is set to run search in two ways: for cited/selected/open
items (which are cached and do not involve any actual SQL query) and
general search for items across all libraries. When layout.search
runs, firstly cited/selected/open items are updated after which the
SQL search runs.
- bubbleInput.js is a customElement responsible for bubbles interface.
bubbleInput.refresh takes a list of items and handles adding/removing/reordering
of bubbles as needed. It always has two inputs on each side of
a bubble, as opposed to having inputs inserted dynamically. It
allows keyboardHandler.js to handle navigation with arrows within
bubbleInput.
- when user interacts with bubbleInput, it emits custom events that are
handled by IOManager singleton in citationDialog.js, which
may update the items information and pass them back to bubbleInput.refresh
to have the list of bubbles updated
- CitationDataManager singleton is responsible for storing
items added into the citation in CitationDataManager.items
in an object with both Zotero.Item and the actual citation item.
It is easier to pass both items to other components
and helpers, as opposed to sharing functions to convert
items back and forth.
2025-03-10 22:40:43 -04:00
Adomas Venčkauskas
a3654652b2 Adds a Citation Explorer dialog for document integration (#3468) 2025-03-10 22:40:43 -04:00
Abe Jellinek
6f8da4825e Advanced Search: Remove red background from condition tooltips
Fixes #5066
2025-02-26 16:41:07 -05:00
Abe Jellinek
854f2188c2 Duplicates: Fix hidden elements remaining visible
And update comment.

Fixes #5056
2025-02-24 11:18:48 -05:00
Martynas Bagdonas
553f0f3994 Implement reader appearance popup with custom themes support
Implements #4949, #5005
2025-02-04 13:43:50 +02:00
Martynas Bagdonas
6582f7ffda Fix tags overflowing in attachment annotation preview
Fixes https://forums.zotero.org/discussion/comment/477579/#Comment_477579
2025-01-30 17:49:29 +02:00
Abe Jellinek
e11d93f0bc
Restore whitespace in search Collection condition menu (#4990) 2025-01-16 23:13:06 -05:00
Abe Jellinek
b858645957 fx128: -moz-nativehyperlinktext -> LinkText (#4902) 2024-12-14 01:16:03 -05:00
windingwind
6270311b24 Fix attachment preview button background color 2024-11-15 00:19:00 -05:00
abaevbog
e94789c8db
Make sidenav buttons keyboard accessible (#4235)
- Section buttons, Locate, and Notes in the sidenav are focusable
- itemPane section buttons are combined into one focusable
group. Those buttons by themselves don't mean anything in
the context of keyboard navigation as they just scroll
to the section in the itemPane. In fact, having info,
abstract, attachments, etc. focusable and announceable by
screen readers is just confusing. However, we do want the group
of those buttons to be focusable to switch back to
zotero-context-pane-item-deck from zotero-context-pane-notes-deck
if the notes button in the sidenav is pressed.
- sidenav can be reached by tabbing into it from the end of itemPane
or via shift-tab from the focused tab
- sidenav buttons can be navigated with up/down arrows
- notes list in the context pane can be activated via the button in the
sidenav and navigated via up/down arrows
- use command vs onclick listener for notes list context menus to work
with keyboard-triggered clicks as well
- focus itemPane when tabs are switched in sidenav
2024-11-13 00:20:21 -05:00
windingwind
347caaff4c Rename itemBox > infoBox
Following the discussion in #4114
2024-11-11 11:27:47 -05:00
abaevbog
d3456b050a
Allow quicksearch to stretch when there is space in the middle pane (#4828)
Per https://forums.zotero.org/discussion/119312/search-window-in-zotero-7-is-too-small

Also, have spinner always occupy space, so that it does not
push quickSearch out of the bounds of the middle pane
when it is very narrow. Respectively,
make min-width of quicksearch a bit smaller.
2024-11-08 00:56:16 -05:00
abaevbog
10ed78212b
no background for readonly focused editable-text (#4792)
Fixes: #4789
2024-10-29 06:45:23 -04:00
windingwind
78077fab9d
Fix main window layout and window resizing (#4676)
- Replace flex attribute with flex-shrink and flex-grow style
  to allow elements to be resized by splitter and window resizing.
- Set the max-width on collections pane to prevent it from pushing
  other panes outside window border
- Set the min-width on window according to the size of both library
   and reader tabs
- Use stacked layout when window width is small

fix: #4669
2024-09-12 06:26:31 -04:00
windingwind
181196149a
Use dynamic max height for attachment preview (#4651) 2024-08-31 02:10:23 -04:00
Dan Stillman
d6c78336da Use line-height: 1.5 for abstracts
Addresses #4581, but need to do feed items separately, since that's in a
browser
2024-08-17 03:15:07 -04:00
Abe Jellinek
181afb92ac Bidi improvements and fixes (#4534) 2024-08-12 15:09:10 -04:00
windingwind
69b4789c17
Unify richlistitem styling rules (#4511)
Unify richlistitem styling rules

- Fix richlistitem unwanted focus ring on Linux
fix: #4510
- Simplify richlistbox styling rules and do not follow Mozilla code
- Use --default-focusring-width for v-table
2024-08-09 15:57:56 +03:00
Bogdan Abaev
7450622047 itembox: switch creator mode button (#4535)
- added button to switch mode to creator rows
- removed that option from options menu
- extra tweak to avoid cursor flickering during re-render after
clicking on the button
- increased itemPane min-width to 320px

Fixes: #3959
2024-08-08 22:50:26 -04:00
windingwind
129938c8fe
Fix quick search styling (#4501)
fix: #4497
fix: #4498
2024-08-05 05:01:59 -04:00
abaevbog
c0f6671542
fixes to saved search dialog layout (#4378)
- remove padding between the <dialog> and the window edges
- explicit width for all zoterosearch fields because otherwise
a menulist with a long content (e.g. longer collection name) name
can push the + and - buttons outside of the window

Fixes: #4374
2024-07-12 00:55:49 -04:00
Abe Jellinek
13496afeb3
Use SelectedItemText color on SelectedItem backgrounds (#4350) 2024-07-10 01:20:47 -04:00
Abe Jellinek
0f5fc2962a RTL: Reverse collapsible-section animation 2024-07-10 00:43:59 -04:00
Abe Jellinek
ddfe376900 RTL: Flip attachment preview arrows 2024-07-10 00:43:59 -04:00
Abe Jellinek
5444e4ec4d RTL: Flip sidenav Locate icon
Fixes #4353
2024-07-08 15:44:59 -04:00
windingwind
19d4c8e038 Fix RTL: Wrong direction of PDF page preview next/forward buttons
fix: #4333
2024-07-08 09:34:09 +08:00
windingwind
c270069639
Redesign Document Preferences and Create Bibliography dialogs (#4265) 2024-07-01 00:24:35 -04:00
Dan Stillman
fe47cbe805 Adjust menu widths in advanced search
Addresses #4190
2024-06-12 00:37:49 -04:00
Tom Najdek
88743682c3 Improve Advanced Search Dialog #4190 (#4225)
- Set the window minimum size to 700px x 500px.
- Fix a regression where non-applicable operators remain visible.
- Fix the "✔️" appearing next to multiple operators in the operator popup menu.
- Include the "Year" and "Attachments" columns by default in the results table.
2024-06-12 00:37:22 -04:00
windingwind
5cc6631fd3
Improve merge pane (#4200)
resolve: #4142
2024-06-07 00:37:54 -04:00
Abe Jellinek
c826805bca
editable-text CE: Don't modify the DOM in sizeToContent() (#4214) 2024-06-06 23:35:53 -04:00
Abe Jellinek
88221d5fc7 Fix long unbroken word in annotation row causing overflow
Fixes #4212
2024-06-06 10:02:52 -04:00
abaevbog
5a45717270
vpat 3: make "-"" btn focusable even if hidden (#4053)
In libraries, notes and tags boxes, do not hide the actual
"-" toolbarbutton, hide the <image> inside of it. Visually,
it looks the same but the button can be focused via tab
without having to expicitly make it visible. It means that
shift-tab from the section header will not skip the "-" button.

Also, make "remove" toolbarbutton from tagsbox focusable like all
others for consistency.
2024-06-06 00:13:26 -04:00