Commit graph

15332 commits

Author SHA1 Message Date
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
Dan Stillman
0d934c846f Fix file downloads timing out after 30 seconds
We switched file downloads to use XHR to fix downloads failing via
authenticated proxies in fx115+, but that made them subject to our
default 30-second timeout in `Zotero.HTTP.request()`. That timeout uses
the XHR `timeout` property, which applies to the whole request, even if
data is actively being downloaded. As a result, file downloads would
fail for people downloading large files or on very slow connections.

This implements manual connect and inactivity timeouts when using
`Zotero.HTTP.download()`. Currently, these both use `options.timeout`,
or the default 30 seconds, but we could probably take separate options
and have lower defaults now that they no longer apply to the whole
request.
2025-03-15 22:50:49 -04:00
abaevbog
99b4171500
citation dlg: persist screen position (#5122)
Do not explicitly move the window to the center of the screen.

Fixes: #5119
2025-03-14 23:04:31 -04:00
abaevbog
4915f1fadf
citation dialog: fix unhandled click on accept button of unfocused dialog (#5113)
Fix issue where clicking accept button would not work
when the dialog itself is unfocused. Add a small delay in the
focus handler of the dialog to allow accept button clicks
to be handled before rerunning the search.

Fixes: #5110
2025-03-14 07:49:57 -04:00
abaevbog
583fbf4e95
citation dialog: stricter non-sql item search (#5109)
While filtering selected/open/cited items, include
items that match EVERY word from the search string,
as opposed to items that match ANY of the searched words.

Fixes: #5099
2025-03-14 07:33:08 -04:00
abaevbog
a49e4e5449
citation dlg: only do not hide X when search runs (#5116)
Instead, when the search runs, replace just the accept
button with the spinner.

Fixes: #5115
2025-03-14 07:31:58 -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
Abe Jellinek
de0f5693e8
Make the info box ellipsis behave (#5103) 2025-03-13 23:47:40 -04:00
abaevbog
ebdeab4b3e
citation dialog: deduplicate open items (#5105)
So that if there are multiple tabs opened for the
same top level item, it appears only once in search
results.
2025-03-13 23:35:09 -04:00
abaevbog
92d6e69b6e
citation dlg: fix collectionTree rendering (#5114)
After switching from list mode to library mode if
the selected collection row is close to the bottom.

Fixes: #5104
2025-03-13 23:33:12 -04:00
Abe Jellinek
a98d172cd7 Restore icon to Find Full Text
Regression in 7020d60351
2025-03-13 15:39:50 -04:00
Abe Jellinek
bbfede2b55 Merge window: Fix error & blank context menu on right-click
Fixes #5077
2025-03-13 12:21:03 -04:00
Adomas Venčkauskas
bcb7e08f2f Fix citation dialog item tree refreshing on feed notifications
Closes #5107
2025-03-13 11:45:25 +02:00
abaevbog
ea71725e7f
citation dialog: Enter adds row when only 1 match (#5106)
In library mode when there are no selected/open/cited items,
Enter keypress from input will add the first row of itemTree
into the citation only if it is the only row.

Fixes: #5098
2025-03-12 21:25:41 -04:00
Tom Najdek
38188ff7d0
Fix huge buttons in banner on Linux 2025-03-12 13:45:00 +01:00
Tom Najdek
e9c0e47a17
Suggest running git lfs install in check_requirements instructions (#5102) 2025-03-12 06:54:05 -04:00
Northword
2d95cad479
Fix update checker _checker.stopCurrentCheck is not function (#5089) 2025-03-12 06:18:59 -04:00
Dan Stillman
de24306c90 Revert "Info box: Capitalize "Open Context Menu""
This is done on purpose. We distinguish between tooltips that are
command/feature titles and those that are action descriptions. So we
have "New Note" but "List all tabs". Apple does the same -- e.g., "Edit
Tags" and "Perform tasks with the selected items" next to each other in
Finder.

This reverts commit 011c5bd6c0.
2025-03-12 05:36:11 -04:00
abaevbog
cb53c6eb2e
citation dialog: fix IO race condition on load (#5097)
IOManager relies on everything being loaded, so it
should be initialized last. Otherwise, any IO handler
trying to access currentLayout would throw an error.

Also, swap the order of operations in bubble-input to
set input width only after the first input is added.
Otherwise, first input will have an arbitrary width
during initial load.

https://forums.zotero.org/discussion/122554/beta-new-insertion-bar-problem-with-citations-but-not-notes
2025-03-12 00:48:40 -04:00
Abe Jellinek
011c5bd6c0 Info box: Capitalize "Open Context Menu"
Like other button tooltips.
2025-03-11 16:36:43 -04:00