Commit graph

15351 commits

Author SHA1 Message Date
windingwind
a4db5c9bd2
Fix can't move second-to-last item pane section down (#5187) 2025-04-09 00:34:05 -04:00
abaevbog
4fc7730181
Citation dialog: stricter cleanup of search value (#5185)
* citation dlg: cleaner search value

Additional cleanup of the search value to not include
some punctuation ("(),.;:"), localized "and",
ampersand, and localized "et al". That way, if one
copies a citation like "(Smith et al., 2020)" and pastes it into the
citation dialog, it is more likely that appropriate search
results will appear.

Fixes: #1864

* handle citations with locators

Clean the input before fetching the locator so that
if one copies and pastes (Smith et al., 2025, p. 15),
the locator is still correctly extracted.
2025-04-08 23:56:20 -04:00
abaevbog
b0b9442c95
load all tabs items' data when restoring tab state (#5193)
This fixes the breakage in tabs menu on initial load
if one of the tab is for an item from not-loaded group.
Now, every component relying on tab items (e.g. tabs menu)
can just assume that items are all loaded.

Fixes: #5192
2025-04-08 22:42:56 -04:00
Abe Jellinek
f279e9f33b
Use normal text color for selected context row (#5197) 2025-04-08 22:41:16 -04:00
abaevbog
c6688ba9d4
include mru types in main list of "New Item" menu (#5195)
Per https://forums.zotero.org/discussion/123269/bad-practice-in-new-item-drop-down-menu
2025-04-08 22:40:07 -04:00
Tom Najdek
db90eb9103
Fix misaligned attachment row delete button #5189 2025-04-07 13:03:00 +02:00
Abe Jellinek
c400d11c5c Remove dragstart listener from attachment row on destroy
Follow-up to e6f1983073
2025-04-04 12:36:53 -04:00
Abe Jellinek
e6f1983073
Make item pane attachments/notes/related item rows draggable (#5184) 2025-04-04 12:27:02 -04:00
abaevbog
3d538d71ca
citation dlg: search by identifier (#5182)
- if the search string looks like a DOI or ISBN, use
it as a search condition. https://forums.zotero.org/discussion/comment/489309/#Comment_489309
- have library use "All Fields & Tags" search mode.
Followup to zotero@b78bf8e
2025-04-04 00:27:46 -04:00
windingwind
0b8b4c0ff6
Draggable item pane sections (#5094) 2025-04-03 21:32:37 -04:00
Tom Najdek
fcfb6e16d0
Reword the confusing example in the #generateHTMLFromTemplate() test 2025-04-02 14:01:52 +02:00
Abe Jellinek
c59c1f7e7c
Windows: Reduce input style specificity to fix directory fields (#5112) 2025-04-02 05:33:26 -04:00
Tom Najdek
4f03c5d360
File renaming: add support for counting creators (#5175)
Also extends the templating engine to support inequality comparisons.
2025-04-02 05:31:50 -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
abaevbog
f1244d824c
Remove old citation dialogs (#5177)
- removed quickFormat, insertNoteDialog, and addCitationDialog
.xhtml and .js files, since all of them are now replaced
with new citationDialog
- removed quickFormat and insertNote strings from
en-US localization files
- replaced all mentions of quickFormat in comments and
variables of integration.js and editorInstance.js with
citationDialog
- removed big-sur-specific styling for quickFormat

Closes #5046
2025-04-02 05:26:06 -04:00
abaevbog
b8ec6eb75e
transform menu: preserve cases in capitalize title (#5174)
Do not lowercase the entire title before capitalizing
the first letter of each word to preserve abbreviations
or spelling of unusual words (e.g. 3D or iPhone).

Fixes: #5165
2025-04-01 01:25:34 -04:00
Dan Stillman
2bff0ea93f Update reader submodule 2025-03-27 23:27:09 -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
Dan Stillman
d5d24f5d9d Update utilities submodule 2025-03-27 23:10:05 -04:00
Abe Jellinek
8eda90cdc0
Scaffold: Add item pane-like preview of translated items (#5079) 2025-03-27 23:02:31 -04:00
Abe Jellinek
5a5f2c2e59 FileHandlers: Fix unintended fallthrough in switch
May have been responsible for this:
https://forums.zotero.org/discussion/comment/483004#Comment_483004
2025-03-27 10:32:12 -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
Abe Jellinek
d9e8ea8ff7
Let creator autocomplete popup fill row width (#5141) 2025-03-27 03:11:00 -04:00
abaevbog
4421de63de
citation dlg: fix unloaded items errors (#5163)
- get opened items asynchronously and load their data
in case if there are items opened across multiple
libraries, and some of them are unloaded.
This fixes #5161, which makes the dialog unresponsive
upon initial load.
- enfore io.filterLibraryIDs in library mode, the same
way it already is being applies in list mode. This
is currently used to only show items from the current
library when adding citations in a note.
- account for the change above in collectionTree to
by focusing the first library from io.filterLibraryIDs,
if those are present, and only default to userLibraryID
if io.filterLibraryIDs is empty.
2025-03-27 03:05:46 -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
abaevbog
b3a3757716
Citation dialog: fixed errors thrown if you type in itemTree (#5143)
- pass ref to itemsView.changeCollectionTreeRow
to avoid errors thrown when typing numbers (related to
tags shortcuts)
- return string equivalents of true/false in getExtraField.
virtualized-table expects a string in its typing handler.
Previously returned boolean was causing an error.
2025-03-26 01:56:42 -04:00
abaevbog
314bd08c03
citation dlg: localized "Add to Citation" label (#5150)
Fixes: #5146
2025-03-26 01:35:37 -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
951ed4fa4b
citation dlg: fix menubar missing on first open (#5154)
Do not wait for the itemTree to add the menubar but
create it immediately and just initialize it when
itemTree is ready.

Fixes: #5153
2025-03-25 00:06:49 -04:00
abaevbog
cf37bf5ce1
citation dlg: no input refocus on Enter from popup (#5159)
Remove refocusing of the input on Enter from item details
popup - just let focus go back to the bubble.
Input refocusing was initially added with the idea that once
you make some edits and confirm them with Enter,
you are ready to go back to typing in the search input.
But then, Enter on Done or Cancel is treated as equivalent
to click, so the focus goes back to the bubble. When
the dialog is cancelled via Escape, focus lands
on the bubble as well, in case you need to keep going to
locate the another item to customize.

This different focus behavior on Enter is indeed a bit
inconsistent and likely no longer needed, now that
you can always refocus input with Cmd/Ctrl+F.

https://forums.zotero.org/discussion/122823/some-advice-for-citation-dialog-in-beta
2025-03-25 00:04:13 -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
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
93b677aaf4
Fix HiddenBrowser test failures (#5134)
Wait for 'complete', not 'interactive', so we know the image has been
loaded.

And use single documentIsReady() implementation instead of copy-pasting.
2025-03-20 23:32:02 -04:00
abaevbog
eb54cd82f6
citation dlg: refocus input on cmd/ctrl-f (#5136)
Fixes: #5100
2025-03-20 22:32:09 -04:00
Tom Najdek
9a58be243e
Improve layout of the buttons in the locate manager (#5139) 2025-03-20 17:22:07 -04:00
abaevbog
753032a001
citation dlg: highlight bubble when table focused (#5142)
In library mode, apply highlighting to bubbles that
correspond to selected items in itemTree only when
the items table is focused. When the focus leaves,
highlighting is removed from bubbles.

Fixes: #5138
2025-03-20 17:20:22 -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
Abe Jellinek
01db0bfe86 Fix occasional error when reader is closed immediately 2025-03-19 13:09:31 -04:00
Abe Jellinek
2a31c1977e Include item tree SCSS in preferences to restore tick icon
Fixes #5131
2025-03-19 10:09:33 -04:00
Dan Stillman
ab2880471e Add Troubleshooting Mode checkbox to "Restart with Logging Enabled…"
Add "Restart in Troubleshooting Mode" checkbox, checked by default, and
remove "Restart Later" option, since it's not possible to restart later
in Troubleshooting Mode. I doubt anyone used that, and if they really
need it, they can use -ZoteroDebug at the command line or toggle the
`debug.store` pref manually.

Closes #4580
2025-03-19 01:10:52 -04:00
Dan Stillman
35659b599e Indicate Troubleshooting Mode in error reports
And show plugins as disabled

Closes #4345
2025-03-19 00:19:54 -04:00
Dan Stillman
ebc670bb56 Update translators, styles, and CSL locales 2025-03-18 23:46:45 -04:00
windingwind
ccf4fd20cc
Fix plugin scope not loaded if plugin is disabled when starting Zotero (#5129) 2025-03-18 14:36:53 -04:00
Dan Stillman
d92ddd18b7 Fix WebDAV progress updates for Zotero.HTTP.download() 2025-03-18 14:10:24 -04:00
Tom Najdek
087df1f0c1 Restore attachment download progress spinner in item row (#5124) 2025-03-18 14:10:24 -04:00
Dan Stillman
80f9622c65 Change setItemDownloadPercentage() throttle from 100 ms to 25 ms
https://github.com/zotero/zotero/pull/5124#issuecomment-2731535371
2025-03-18 10:39:14 -04:00
Dan Stillman
c9f43bcdb8 Update locales from Transifex 2025-03-18 03:11:47 -04:00
Dan Stillman
91546e2e20 Remove hack for Issue search condition in French locale
https://forums.zotero.org/discussion/comment/473643/#Comment_473643
2025-03-18 02:24:01 -04:00
abaevbog
d780eed06f
citation dialog: restore arrowDown on bubbles opening details popup (#5123)
- restore earlier behavior of arrowDown on a bubble
opening itemDetails popup
- remove arrowUp closing the popup
- remove arrow navigation between rows of bubbles on arrowUp/down
- remove no longer needed edge case of arrowDown
handling on the last row of bubbles

Fixes: #5118
2025-03-17 23:27:27 -04:00
Tom Najdek
fef389290a
Fix unable to select a custom theme. Close #5070 (#5125)
This resolves an issue where, after the selected theme was deleted, it was impossible to select a newly added custom theme. This happened because the preference key for the selected theme uses consecutive IDs and wasn't cleared when the theme was deleted. As a result, the newly created theme would receive exactly the same ID. When the newly created theme was selected, the preference observer did not trigger (because the ID did not change), leading to this bug.

The fix here is to clear the theme preference when it is deleted. The added benefit is that when this happens in dark mode, the dark theme is auto-picked instead of falling back to "Original".
2025-03-17 21:07:10 -04:00