Commit graph

1656 commits

Author SHA1 Message Date
Abe Jellinek
12f344e03d Fix all cookies being lost during remote translation (#5358) 2025-06-25 23:58:15 -04:00
Tom Najdek
4cc52ec928 File renaming: Add pascal case. Fix unicode handling. (#4876) 2025-06-19 02:19:59 -04:00
Abe Jellinek
7eeb666894 Skip invalid relative path when changing LABD (#5239) 2025-06-19 02:16:36 -04:00
Dan Stillman
ec59f43a68 Mark locally missing files marked for upload for download instead
Z7 removed an `OS.File.open()` in `_checkForUpdatedFiles()` that would
throw on missing files and cause them to be marked for download in a
`catch`.

This likely caused the fix for #1753 not to work in Z7.
2025-06-19 02:13:02 -04:00
Tom Najdek
730d3b1f34 File renaming: add support for counting creators (#5175)
Also extends the templating engine to support inequality comparisons.
2025-06-19 01:34:55 -04:00
abaevbog
bb79e10851 Fix unintentional title transfer between attachments on item switch (#5245)
Also added similar test for item details table

Fixes #5244
2025-06-19 01:02:19 -04:00
Adomas Ven
cd856efef8
Connector attachment saving server changes for 7.0 (#5345) 2025-06-19 01:01:52 -04:00
Abe Jellinek
c93a0e0e80 Add tests for renderItemTitle() 2025-03-12 23:25:32 -04:00
Abe Jellinek
096cc2e27b renderItemTitle(): Create <span> when inverting style
Creating an <i> with a style attribute that *removes* italics is just
too confusing.
2025-03-12 23:25:32 -04:00
Dan Stillman
85b97f82e6 Fix /connector/saveSnapshot test for Zotero.HTTP.download() 2025-03-12 23:25:32 -04:00
Dan Stillman
64b444752a Update "Find Full Text" tests for Zotero.HTTP.download()
Downloads are now included in request() call counts
2025-03-12 23:25:32 -04:00
Dan Stillman
4b78b2c130 Replace Zotero.Utilities.Internal.saveURI() with Zotero.HTTP.download()
Adds a new function, Zotero.HTTP.download(), that uses
Zotero.HTTP.request(). This fixes downloads via authenticated proxies in
Zotero 7 and gives us other request() functionality (e.g., 5xx retrying)
for free.

The downside is that this is probably less efficient, potentially
loading large downloads in memory. We should create a replacement for
request() based on fetch() that supports getting the body as a
ReadableStream.

Fixes #5062
2025-03-12 23:09:47 -04:00
Abe Jellinek
264f55545a Fix faulty siblings-of-type check in setAutoAttachmentTitle() (#5045) 2025-02-19 02:03:26 -05:00
Abe Jellinek
569bd1ffae Item box: Fix missing Copy/Paste menuitems on URL fields (#5001) 2025-02-19 02:03:26 -05:00
Dan Stillman
62d46d337a Fix selectItems() not selecting non-top-level item in trash
https://forums.zotero.org/discussion/comment/484380/#Comment_484380

Adds `Zotero.Item#isInTrash()` that returns true if the item or any of
its ancestors is in the trash (i.e., `.deleted == true`)
2025-02-19 02:03:26 -05:00
Dan Stillman
d2c9a310a8 Tests for Item#fromJSON() changes (#3422) 2025-02-19 02:03:25 -05:00
Dan Stillman
ddb1daabbc Fix json[c.field] is undefined sync error
Fix error if local note or attachment is added to a parent item while
the remote version was added to a collection. Now, the new local parent
item will be added to any collections the remote child item was added
to.

Fixes #2934
2025-02-19 02:03:24 -05:00
abaevbog
5b427ac332 save tagsBox updates when another item is selected (#4945)
When tagsBox item is changed by clicking on an itemTree row,
the blur even never fires on the currently focused tag. So
whatever changes were made will be discarded. To avoid it,
blur any opened tag rows (which triggers a saveTx)
when an item is being set, same way it is done in itemBox.

Also, a small tweak to properly fetch the focused tag
via editable-text:focus-within selector, since editable-text:focus is
always empty because the focus is on the input inside of
editable-text.

Fixes: #4942
2025-02-19 02:03:23 -05:00
Dan Stillman
09813be7e0 Fix handling of redirecting OpenURL base URLs with url query parameter
For a URL like
`https://ezproxy.school.edu/login?url=http://resolver.ebscohost.com/openurl`,
without a trailing `?`, we were just adding a `%` to the end, making the
URL invalid after the redirection (`/openurl&url_ver=Z39.88-2004`
instead of `/openurl?url_ver=Z39.88-2004`).

(And apparently no one who sent in these URLs actually tested them
in-app?)
2025-02-19 02:03:22 -05:00
Tom Najdek
c0c00752e7 Improve importing from Mendeley
- Make the annotations importer more resilient to missing data
- Fix notebooks not being imported in some cases
- Fix an instance of a hidden browser leaked by the Mendeley Importer
2025-02-19 02:03:21 -05:00
Dan Stillman
77bdb0b4cb Shower nicer error for malformed WebDAV URL
We fix `://` or `//` automatically after #3483, but a leading ':'
character would still show an internal `NS_ERROR_MALFORMED_URI` error.
Instead, just say "[url] is not a valid WebDAV URL".
2025-02-19 02:03:20 -05:00
windingwind
cb0b2f9d58 Item pane scroll pos fix after switching from note (#4897)
Follow up to #4879
fix: #4276
2025-02-19 02:03:20 -05:00
Dan Stillman
6740115cf2 Revert "Fix Item Pane unstable rendering during scrolling (#4879)"
Regressions:

https://forums.zotero.org/discussion/120216/blinking-item-pane-when-switching-item-with-pinned-section-in-the-sidenav
https://forums.zotero.org/discussion/120217/title-field-is-not-visible-anymore-after-creating-a-new-item-if-a-section-is-pinned-in-the-sidenav

This reverts commit 4067745c7a.
2024-12-04 01:35:04 -05:00
windingwind
4067745c7a
Fix Item Pane unstable rendering during scrolling (#4879)
Fix wrong vertical position in the Item Pane after switching from a note

fix: #4276
2024-12-02 22:42:32 -05:00
windingwind
7296583f2a
Fix item pane custom info row render after item change (#4875)
Add test for info row render after item change
fix: #4874
2024-11-29 16:18:31 -05:00
abaevbog
247826194a
fix advanced search anyField condition breakage (#4873)
Process "joinMode" before other conditions that may rely on it

Fixes: #4871

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2024-11-27 23:43:09 -05:00
Abe Jellinek
bc2c7956db FeedProcessor: Handle dc:creator in Atom feeds
Fixes #4857
2024-11-20 10:05:39 -05:00
windingwind
f5b653e7fd
Add item tree and info box refresh API (#4850)
For APIs that have lifecycle control, e.g. item
pane section, the `update` is passed in the init
hook.
For APIs without lifecycle, we can't pass a value.
Instead, we provide a method to refresh in the API
instance.
2024-11-20 08:35:56 -05:00
windingwind
8e2ec86e56
Fix duplicate item pane when switching to library tab before reader is loaded (#4838)
fix: #4531
2024-11-20 08:09:42 -05:00
abaevbog
e3c18ee1c7
fix "anyField" conflicting with other conditions (#4845)
Fix the glitch where having anyField search condition
along with any other condition would return an empty
result set if joinMode="any".
This would happen due to a conflict between conditions
caused by wrapping "anyField" condition set into a quickSearch
block, which enforces "AND" operator between conditions.

Fixes: #4830
2024-11-15 02:07:11 -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
abaevbog
7fa00d1cfd
Don't clear quick search after removal from collection (#4618)
Do not try to re-select a previously selected item
if it was filtered out from itemTree, e.g. after
it was removed from currently selected collection.
Otherwise, quick search gets cleared in an attempt to
re-select the item.

Fixes: #4616
2024-11-12 00:28:08 -05:00
windingwind
c937b36e25
Fix child attachment shows up in item pane after being moved to trash (#4777)
fix: #4770
2024-11-12 00:14:15 -05:00
Tom Najdek
055fbb68fc
Import Mendeley notebooks (#4829) 2024-11-12 00:13:17 -05:00
windingwind
aec6e61cb3 Add ItemPaneManager.registerInfoRow API
Unify plugin API classes

Add info box custom row API tests

Refactor itemBox.js create element

Wrap hooks in API for safe call

Add test for item tree api and hook error handling

Remove try/catch from #4816

Move plugin API definitions to xpcom/pluginAPI
2024-11-11 11:27:47 -05:00
windingwind
347caaff4c Rename itemBox > infoBox
Following the discussion in #4114
2024-11-11 11:27:47 -05:00
Dan Stillman
4ca3843ce7 Prevent auth failures for Zotero Storage requests after relinking
If you unlinked your sync account and then relinked, the ZFS storage
controller would still have the old API key and file-sync requests would
fail. Since that was never supposed to be possible, it resulted in
"Group with libraryID 1 does not exist" errors during file syncing until
you restarted the app.
2024-11-08 03:19:41 -05:00
Dan Stillman
7c91f37348 Set new API key on each setCredentials() call in sync preferences tests 2024-11-08 03:18:44 -05:00
Abe Jellinek
9f8c5c8581
Add support for importing KOReader & Calibre annotations (#4780) 2024-11-08 01:16:10 -05:00
Tom Najdek
5bd068860c
Fix renaming behavior for attachment without extension (#4742)
Fix #4739
2024-10-15 06:48:04 -04:00
abaevbog
7cf9097467
vpat 16: context menu as a drag-drop alternative to move/copy collections (#4420)
- Added menuitems to move collections within the same
library and to copy collections
- "Move to" only displays collections within the
current library
- "Copy to" displays all libraries, if more than
one library exists. If there is only one library,
top-level collections from "My Library" are displayed.
- while copying within the same library, create copies
of all collections and add items into them, without
actually duplicating items
- while copying between different libraries, items
will be duplicated, the same way it is done when
collections are dragged and dropped in another library
2024-10-15 06:34:42 -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
abaevbog
a4225592a1
itembox: shift-enter adds new creator + bug fixes (#4567)
- shift enter on a creator row will add a new empty creator
row after focused row. If shift-Enter is on the last creator
before "More creators", all creators will be rendered.
- fixed encountered glitch where switching the mode of
creator would not always update the pref, so next time
a new creator row is added, it would not be of correct
mode.
- fixed encountered bug where a newly added creator row
could receive an index of an existing creator that is not rendered
( "More creators" label is displayed). In that case,
saving such creator would override an existing creator
and erasing that creator would remove invisible creators.
- added a few tests for these edge cases
- on shift-enter in unsaved creator row that only
has whitespace, do nothing, the focus will stay
in that row. It will be discarded if the focus leaves
it with nothing but whitespace.
- fix focus getting lost on shift-enter on an edited
creator field after adding just some whitespace.

Fixes: #4393
Fixes: #4710
2024-09-27 16:51:23 -04:00
abaevbog
82d50676d3
fix quicksearch phrase search not respecting scope (#4608)
Fixes: #4381
2024-09-12 06:27:29 -04:00
Abe Jellinek
f54becf32e
Render citeproc.js markup in tab titles (#4602) 2024-08-26 07:57:17 -04:00
windingwind
ca9508ebce
Lazy load attachment preview (#4568)
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
2024-08-15 02:22:24 -04:00
Dan Stillman
f5af1898fd Proper fix for getDirection() problems
Hopefully the last fix for my edits to 181afb9 (#4534)

Follow-up to the previous two commits
2024-08-14 04:01:26 -04:00
Dan Stillman
531e8697be Fix additional breakage when bidi.browser.ui is true
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Broken by me in an edit to 181afb9 (#4534)

Follow-up to previous commit
2024-08-14 03:42:08 -04:00
Dan Stillman
ec50539e80 Make Zotero.ItemFields.getBaseIDFromTypeAndField() more resilient
- Return base field instead of throwing if base field is passed for a
  type that has a base-mapped field
- Return false instead of throwing for invalid type-field combination
2024-08-14 03:14:29 -04:00
abaevbog
b72bcc3118
tagsbox: focus new tag row on shift-enter (#4514)
On shift-Enter from any tag, add a new empty tag at the
bottom and focus it. Alternative to tabbing to + button
and clicking it.

Fixes: #4394
2024-08-07 03:03:38 -04:00