Commit graph

213 commits

Author SHA1 Message Date
Bogdan Abaev
6bec3c817e Citation dialog: allow to insert annotations (#5356) 2026-03-23 15:00:22 -04:00
Abe Jellinek
0abf2b455f
Add Read Aloud first-run guidance panel (#5818)
Plus guidance-panel changes:

- Fix description not updating when multiple panels exist
  in the document
- Fix nonfunctional noautohide attribute
- Show "Got It" button for noautohide with no navigation

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-03-05 20:07:06 -05:00
abaevbog
bd8d56e384
Preference to hide context annotation rows (#5315)
hideContextAnnotationRows pref, accessible via View > Hide Non-Matching Annotations,
will hide non-matching context annotation rows.
Enabled by default.

Fixes zotero#5264
2026-02-06 00:51:01 -05:00
windingwind
e522f6185e
Add note as tab (#5528) 2025-12-18 23:49:42 -05:00
Dan Stillman
0cb8116bed Add default pref for showAttachmentFilenames
Missing from #4601
2025-12-18 23:06:33 -05:00
Dan Stillman
4ca9bbdae5 Automatically show post-upgrade banner for each new major version
And remove the density switcher
2025-12-16 13:50:27 -05:00
Tom Najdek
aec7b6a1ea
Persist the state of the Reader sidebar #5489 (#5593) 2025-11-13 10:32:34 -05:00
Tom Najdek
e896fd0137
Add continuous-renaming functionality for attachment files (#3860)
Resolves #1685
2025-09-11 04:54:03 -04:00
Abe Jellinek
d854058be6 Don't reopen collection/item pane on restart (#5495) 2025-08-20 02:00:31 -04:00
Dan Stillman
845361bdbc Update default Chicago style after upstream id changes 2025-07-15 00:46:10 -04:00
windingwind
61b62d0a02 Improve tabs menu (#4961) 2025-05-07 01:52:54 -04:00
abaevbog
929147b33a
citation dlg: miscellaneous followup fixes (#5095)
- last-closed -> last-used for citationDialogMode pref value
- pref label citationDialogLastClosedMode -> citationDialogLastUsedMode
- update Zotero.Prefs version. While migrating, if
integration.useClassicAddCitationDialog is true, set
integration.citationDialogLastUsedMode to 'library'
so the citation dialog opens in library mode on the first run.
If citationDialogLastClosedMode pref exists, it is
migrated to citationDialogLastUsedMode and cleared
- redone logic of extracting the locator to allow for better
detection of locators and to not rely on long regular
expressions that are hard to troubleshoot. Added tests for it.

These are the new rules for extracting locators:
- locator value can be either a set of numbers potentially
with some punctuation in between OR text surrounded with
single or double quotes
- locator labels can be typed in any of 3 formats:
full (chapter), short (chap.), or short with no
punctuation (chap)
- locator labels go before the locator values and there
may or may not be a space in between. For example,
chap.10 is the same as chap. 10.

Fixes: #5092
Fixes: #5093
2025-03-27 03:45:31 -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
PChemGuy
8a06edab49
Sort strings naturally or alphabetically (#5075)
Hidden setting. If true, use natural collection sorting matching the current behavior. If false, use conventional alphabetic sorting.
2025-03-07 02:08:11 -05:00
Tom Najdek
6add721e68
Convert customThemes from a pref to a synced setting (#5071) 2025-03-05 06:43:52 -05:00
Martynas Bagdonas
553f0f3994 Implement reader appearance popup with custom themes support
Implements #4949, #5005
2025-02-04 13:43:50 +02:00
windingwind
c1c2bc76b7 fx128: Enable -moz-context-properties for SVG context properties 2025-01-07 23:50:46 -05:00
Martynas Bagdonas
75fb301f0a
Add pref to control auto-turnoff of note, text, image annotation tools (#4851) 2024-11-19 05:47:43 -05:00
Abe Jellinek
5f717d3bde Show first-run banner on upgrade (#3807) 2024-07-28 03:26:12 -04:00
Martynas Bagdonas
abad33116b Add reader text selection popup annotation mode toggle pref
Fixes #3352
2024-07-15 15:43:53 +03:00
Abe Jellinek
5a6b1a9f76
Add hyphenation and text appearance options for EPUBs (#4256)
And remove duplicate string
2024-06-27 06:02:47 -04:00
Abe Jellinek
50e2250fe0
Add pref to enable local API (#4236)
And keep enabled in tests
2024-06-14 06:25:39 -04:00
abaevbog
c07a13fcfe
vpat 46: remaining aria-labels in preferences (#4006)
- Linked remaining found inputs/menulists to their labels.
- Made the "Choose resolver" a proper visible
label, so that it does not oddly disappear if you click
on the dropdown with "Custom" showing after even if the
selection did not change. For the purpose of VPAT, a
visible label is always good for success criteria 3.3.2
https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions
- Added explicit names to +/- buttons
- aria-labelledBy for inputs surrounded by text
- fluent strings for resolver preferences
- remove openURL.version preference, hardcode "1.0"
2024-06-06 00:00:33 -04:00
Abe Jellinek
59b1d75b98
Item pane header customization (#3791) 2024-05-10 08:23:26 -04:00
Dan Stillman
613a907f3e Change pref from reader.useDarkModeForContent to reader.contentDarkMode 2024-01-24 23:32:23 -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
6e651271e8 Use two decimal points in default fontSize pref 2024-01-24 23:32:18 -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
Abe Jellinek
d6e5da403c Add uiDensity pref and menu controls 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
Abe Jellinek
deb6acaab1 Add preferences for ebook & snapshot file handling 2023-08-07 16:07:55 -04:00
Abe Jellinek
cab0fa93e7 Extend Retrieve Metadata to support EPUBs (#57) 2023-08-07 16:07:55 -04:00
Abe Jellinek
f5381403c0 Add ebook font to preferences
Choose from a list of preset font stacks, or any font on your system.
2023-08-07 16:07:51 -04:00
Dan Stillman
9b0ce9558c
attachmentRenameFormatStringattachmentRenameTemplate (#3249) 2023-08-04 05:58:15 -04:00
Dan Stillman
f4f9712bc9 Increase default title length limit to 100 in attachment filenames 2023-07-21 06:33:01 -04:00
Tom Najdek
0ba766f2e0
Customizable renaming rules #1413 (#2297) 2023-07-20 06:50:34 -04:00
Adomas Venčkauskas
e10fc538d0
Add a prompt to import Mendeley DB if mendeley citation found in doc 2023-04-06 17:10:13 +02:00
Dan Stillman
382bde0fc2 Rename PDF tab title pref to include reader
In case we have a separate pref for notes or something else

(cherry picked from commit 6d0e5959e6)
2023-02-09 17:21:21 +00:00
Martynas Bagdonas
c0c1d011fa Add a hidden pref for tab title with support for Creator-Year-Title option (#2985)
(cherry picked from commit a5fb64f295)
2023-02-09 17:21:21 +00:00
Abe Jellinek
a7b605f0cc
Add "Open PDF reader in new window" preference (#2868)
When enabled:
- Double-clicking a PDF or choosing "Open PDF" opens a new window
- Shift-double-clicking opens a new tab
- "Open in New Window" locate option becomes "Open in New Tab" and has the
  reverse behavior
2022-11-14 17:12:48 -05:00
Martynas Bagdonas
da7c73b662 Add "Include Zotero Links" option for note export and QuickCopy
Fixes #2349
2022-10-27 04:49:11 -04:00
Dan Stillman
47c939561c Remove default OpenURL gateway
https://www.worldcat.org/registry/gateway is no longer supported -- see
https://forums.zotero.org/discussion/comment/418373/#Comment_418373 for
details

If no resolver is selected, show an error on "Library Lookup" with a
button to open the prefs.
2022-10-03 06:47:17 -04:00
Martynas Bagdonas
fcb63465ac Include quotation marks for highlights by default, but allow to disable
Fixes #2697
2022-08-11 02:48:44 -04:00
Dan Stillman
cba70856b7 Increase downloadPDFViaBrowser.onLoadTimeout to 3000
Apparently necessary for some people to get PDFs on ScienceDirect. We
should come up with a better way of detecting the page load if we can,
so that we can avoid this long of a timeout for people who just will
never have access to ScienceDirect PDFs.

https://forums.zotero.org/discussion/comment/411056/#Comment_411056

Addresses #2698
2022-08-11 02:48:11 -04:00
Dan Stillman
5eecc3fc54 Add prefs for timeouts for downloading PDF via browser
1 second isn't enough for some users, so try 1.5, and allow for easier
debugging via a pref.

https://forums.zotero.org/discussion/96431/i-have-access-to-pdf-but-zotero-cannot-automatically-add-it
https://forums.zotero.org/discussion/97277/unable-to-download-papers-using-zotero-chrome-extension
2022-08-11 02:28:16 -04:00
Abe Jellinek
8d75f37548
fx-compat: Add preferences with full-text/keyword search (#2659) 2022-08-10 18:26:23 -04:00
Dan Stillman
78b0055206 Change app id to zotero@zotero.org
And remove all references to old id

We can do this because plugins will use new mechanisms for install and
update manifests that don't use the id (which also means it's now only
used internally).
2022-08-08 05:11:21 -04:00
Martynas Bagdonas
8dae561557 fx-compat: Remove ';' because style.setProperty fails in note-editor 2022-05-17 14:40:04 +03:00
Dan Stillman
d797734b38 Don't use Lucida for default note font 2022-05-13 04:28:57 -04:00
Dan Stillman
5d72d896b8 Enable the connector server by default in prefs file
It was already enabled in zotero-standalone-build, but since there's no
Firefox version there's no reason to leave it off in the client code.
2022-05-12 05:18:47 -04:00