Commit graph

327 commits

Author SHA1 Message Date
windingwind
5d3bcefd70 Fix titlebar and window control icons 2025-07-02 16:05:26 +02:00
Tom Najdek
57bc913304
Fix tag swatches regressions. Resolve #5322
Fixes missing tag swatches borders, a regression due to a change of the
default values for the `focus-states` mixin in #4961 (61b62d0).

Also introduces opaque tag colors so that tag swatches are not
semi-transparent.
2025-06-17 15:09:55 +02:00
Abe Jellinek
3102b6b67a
Always show item/context pane toggle (#5263) 2025-05-09 01:27:20 -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
de0907c8f7 Fix issues with flexbox width calculations (#5254)
Issues caused by differing padding values between the header cell and the table body cell
2025-05-05 23:39:53 -04:00
abaevbog
4521f750a4
ItemTree annotations: miscellaneous fixes (#5232)
- disable context menu on collapsible-sections of annotations in `itemPane`
- fix `arrowRight`/`arrowLeft` being able to expand/collapse annotation sections when they are focused
- set proper aria-label and aria-description on annotation cards
- fix misaligned annotation icons

Fixes: #5231
Fixes: #5234
Fixes: #5240
2025-04-30 00:54:45 -04: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
Abe Jellinek
d74db17cf1
Select Items dialog: Fix scrollbars and padding, add title (#5213) 2025-04-22 23:37:38 -04:00
abaevbog
e690b0b18e
Expand collectionTree containers on dragover (#5024)
- when something is dragged over a collapsed collection
or group, it will be expanded to reveal children
so one could drop the dragged item/collection/ into them
- when drag is over, the expanded collections will
collapse, except for the ancestors of the newly selected
collection
- trigger collapse of expanded collections on dragend
on the entire document (in case dragend happens not over
the collection tree), or from onDrop handler, from where
we will wait for selection to change before collapsing
rows

Fixes: #4952
2025-04-22 00:17:56 -04:00
abaevbog
3d1cf90934
runJS: better message if nothing is returned (#5181)
Display "===>undefined<=== (completed successfully)" instead
of current "===>undefined<=== (undefined)", which is a bit misleading.

Fixes: #5180
2025-04-09 01:31:22 -04:00
Abe Jellinek
f279e9f33b
Use normal text color for selected context row (#5197) 2025-04-08 22:41:16 -04:00
windingwind
0b8b4c0ff6
Draggable item pane sections (#5094) 2025-04-03 21:32:37 -04:00
abaevbog
a366f16346
citation dialog: remove cited item placeholder in library mode (#5152)
Keep the placeholder node to retain the positioning
of the text consistent but remove the border
so the item card is invisible.

Also: remove spinner

Fixes: #5151
2025-03-27 03:03:03 -04:00
Tom Najdek
8ec81da1d9
Improve attachment column progress meter (#5156)
* Better styling for file download progress meter #5144

* Fix download progress meters not removed on completion #5145
2025-03-25 00:10:35 -04:00
abaevbog
6787dcd596
Citation dialog: do not wait for cited items to load (#5127)
Before making the dialog interactable.

Initialize loading cited items via io.getItems when the dialog appears.
Once they are loaded, itemsList is refreshed to include
cited matching items and all subsequent searches will include
them too. During the refresh immediately after cited items load,
try to preserve focused/selected state of items.

Added IOManager.preInit that is ran as soon as the dialog
is loaded. Move accept/cancel initialization there.
IOManager.init runs at the very end of onLoad because
it relies on most data and layouts being loaded,
It means if there is some delay or error during loading,
the dialog cannot be closed. To avoid it, setup
cancel/accept buttons separately in the beginning.

Also, minor refactoring of SearchHandler to handle
refreshing of cited items separately from selected and
open items.

Fixes: #5121
2025-03-20 23:42:00 -04:00
Tom Najdek
9a58be243e
Improve layout of the buttons in the locate manager (#5139) 2025-03-20 17:22:07 -04:00
Abe Jellinek
d79baf8251 Prevent stacked context pane from expanding over toolbar/titlebar
Regression in b649a1a953

Fixes #5135
2025-03-19 15:20:25 -04:00
Tom Najdek
087df1f0c1 Restore attachment download progress spinner in item row (#5124) 2025-03-18 14:10:24 -04:00
abaevbog
bbf91d65f9
Citation dialog: move locator label lower (#5096)
So it aligns with inputs a bit better. Positioning
is tricky with native select elements but with a bit extra
margins, it looks better.

Fixes: #5091
2025-03-13 23:48:10 -04:00
Tom Najdek
38188ff7d0
Fix huge buttons in banner on Linux 2025-03-12 13:45:00 +01: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
Adomas Ven
8dbc6177ce
Macos integration progress bar (#5016)
* Display the progress bar on macOS integration commands more

Avoid displaying before Add/Edit Citations, Add Note and Doc Prefs
since that brings Zotero window to the foreground along with the
relevant dialog, but display the progress bar after confirming those
dialogs, which will bring Zotero to the front, but is still better than
no progress indication.

Display the progress bar for Refresh, Doc Prefs, Unlink and Add/Edit
Bibliography

* Fix progress bar indeterminate state not being visible and not working.

- Update _progressMeter.scss for fx115+
- Some adjustments/resizing to progress bar display in quick format
2025-02-12 08:43:11 +02:00
Dan Stillman
71d697801e Fix banner style issues
- Fix background color on post-upgrade banner
- Add drop shadow between stacked banners (e.g., post-upgrade banner and
  Mac Word banner, which will generally appear together on an upgrade
  and have the same background color)
- Align right edge of buttons in post-upgrade and Mac Word
- Unify other spacing and font sizes
2025-01-27 07:34:31 -05:00
Dan Stillman
aaf7984a8e Fix alignment of tag rows in long tag fixer
Rows were center-aligned
2025-01-22 03:09:31 -05:00
Dan Stillman
39b92d6cdb Fix incorrect spacing around link in Z7 post-upgrade banner
Regression from 564b1766aa

Fixes #4926
2025-01-22 03:07:36 -05:00
Dan Stillman
d2952d3e71 Remove duplicate padding rule 2025-01-22 03:07:19 -05:00
Dan Stillman
9e569c33f8 Adjust nesting of #post-upgrade-banner SCSS 2025-01-22 03:06:40 -05:00
Tom Najdek
a4414cc2f0
Remove last few legacy icons #3691 (#4996) 2025-01-21 05:37:56 -05:00
windingwind
42b97d8fcd fx128: dialog window background (#4921)
fix: #4917
2024-12-14 01:16:06 -05:00
Abe Jellinek
b858645957 fx128: -moz-nativehyperlinktext -> LinkText (#4902) 2024-12-14 01:16:03 -05:00
Dan Stillman
884a62d526 Fix swapped creator-field-mode icons 2024-10-30 21:42:28 -04:00
windingwind
c75119324c
Fix item pane width jumping in stacked mode (#4757)
fix: #4755
2024-10-16 00:34:12 -04:00
abaevbog
15ccf28fb4
vpat 16: context menu as a drag-drop alternative to change parent item of attachment/note (#4423)
- added "Change Parent Item…" context menu option to
itemTree as a non-drag-drop alternative to changing the
parent of attachments or notes
- context menu option appears only when all selected
items are notes or attachments
- upon activation, a dialog to select the new parent
will appear. Added a tweak to the dialog to disable
the "accept" button if a selected item is not top level
- minor edit to itemTree to set the multiselect property
based on a prop, since we do not want to have multiselect
enabled in this instance
- hide all virtual collections in selectItemsDialog via new
io.hideCollections parameter
- "Convert to Standalone Attachment" button in dialog if
child attachment is selected
2024-10-10 16:56:34 -04:00
Dan Stillman
fc7307fd84 Unify banner padding 2024-10-05 02:01:48 -04:00
Dan Stillman
2ca1389b43 Adjustments to Mac Word installation banner (#4660)
- Use real buttons and other tweaks from design
- Use existing .properties string for "Don't Ask Again" for now
- Remove close button
- Update submodule for reminder after 24 hours instead of 7
2024-09-15 23:20:01 +02:00
Adomas Venčkauskas
564b1766aa Add a Mac Word plugin Sequoia permissions warning banner (#4660)
Also refactor some banner rules.
2024-09-15 23:19:47 +02: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
Tom Najdek
6b7834876f
Fix a couple of issues related to dark mode icons (#4655)
- Fixed missing dark mode icons in the advanced search dialog.
- Corrected inconsistent icon shading in some menus.
2024-09-01 15:48:36 -04:00
windingwind
a0a8cceda4
Checkbox-and-radio-redesign-on-Windows (#4609) 2024-08-30 07:20:52 -04:00
Abe Jellinek
cb6e1e3e59 Lookup Engine Manager: Contain richlistbox
Fixes #4635
2024-08-27 11:20:33 -04:00
Tom Najdek
b350613770
Fix progress bar ignores color scheme. Resolve #4589 (#4599) 2024-08-26 08:00:18 -04:00
Abe Jellinek
1f26b64519
RTL: Small item tree tag display fixes (#4576) 2024-08-16 02:10:52 -04:00
Tom Najdek
596703b21b
Fix inverted tag colors order. Resolve #4569 2024-08-15 11:15:51 +02: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
Abe Jellinek
2d32efbccd
Apply tag text color to ellipsis (#4536) 2024-08-08 22:54:10 -04: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
Tom Najdek
083ad9ee05
Fix missing margin between colored and emoji tags
In the item tree, emojis are spaced 4px apart, but there was no space
between the colored circles and the first emoji, making it look crowded.
2024-08-08 18:09:19 +02:00