Commit graph

11271 commits

Author SHA1 Message Date
windingwind
24b5f2efb4
Assign ItemPane#_itemDetails default tabType (#4261)
Fix pinnedPane set to ItemDetails before tabType is assigned not stored to pref
fix: #4260
2024-06-19 02:26:08 -04:00
Abe Jellinek
310e741a01
Fix duplicate attachment row from attachments-box notify() (#4250) 2024-06-19 02:23:46 -04:00
Dan Stillman
fad3e25278 Local API: Return 404 for unknown group library 2024-06-19 00:40:13 -04:00
Dan Stillman
ecfc217ce9 Local API: Load library items if not yet loaded
Fixes #4244
2024-06-19 00:28:25 -04:00
Dan Stillman
e00b754fce Use Type instead of Genre for column in items list
https://forums.zotero.org/discussion/comment/465996/#Comment_465996
2024-06-18 13:52:45 -04:00
Dan Stillman
f8a8f694b4 Use sentence case for tooltip 2024-06-18 06:29:12 -04:00
Dan Stillman
30890b322a Remove obsolete strings
Calling code removed in 9eabc169c4
2024-06-18 06:28:21 -04:00
Dan Stillman
8d8ffd52b5 Add colons after labels in Locate settings
We left these out on purpose, but we've decided to keep colons in
non-phrase labels for now.
2024-06-18 06:20:35 -04:00
Martynas Bagdonas
06127d84da Update reader submodule and add missing strings 2024-06-18 09:49:54 +03:00
abaevbog
4d3b36efd3
new aria strings for the reader (#4239)
Aria labels and descriptions used by zotero/reader@e0e595a
to add a number of accessibility improvements to the reader
2024-06-17 23:19:24 -04:00
Dan Stillman
e7e7e4d230 Tweaks to trash functionality for collections and searches (#3307)
- Use SVG icons
- Show "[x] collection selected" or "[x] searches selected" in the item pane
- Show "[x] objects selected" if multiple types are selected, which I
  don't love, but I don't have a better idea
- Use existing strings for ARIA labels
2024-06-17 23:14:48 -04:00
Bogdan Abaev
a532cfb475 trash functionality for collections and searches (#3307)
When a collection or a saved search is deleted, it appears in
trash among other trashed items. From there, it can be restored
or permanently deleted.

Items of trashed collections are not affected my the trashing/permanent
deletion of a collection and need to be deleted separately like before.

Subcollections of a trashed collection do not appear in the trash and
are restored or permanently deleted with the top-most trashed parent.
2024-06-17 23:14:21 -04:00
Bogdan Abaev
f4d428cb16 vpat 37: run JS aria edits + localization (#4021) 2024-06-17 06:17:39 -04:00
Dan Stillman
f829d7c43e Explicitly close file input stream at end of md5Async()
Fixes "Could not remove the non-empty directory at…" file-sync error on
Windows

Fixes #4246
2024-06-17 01:24:15 -04:00
Dan Stillman
f7d7625c1c Redownload file marked as a forced download when opening file
Previously we were redownloading only `SYNC_STATE_TO_DOWNLOAD` files,
not `SYNC_STATE_FORCE_DOWNLOAD`, because the latter gets downloaded even
when using on-demand file syncing, but if the download fails for some
reason, it should be retried on a manual open.
2024-06-16 16:31:04 -04:00
Dan Stillman
e7ddf810c0 Fix error reporting for download failure on attachment open 2024-06-16 16:31:03 -04:00
Dan Stillman
49d3bae256 Fix Mac Word breakage after 44d9530ec
(Which predated HTTP Mac Word integration, so didn't include a change
for server_integration.js)
2024-06-16 16:31:03 -04:00
Abe Jellinek
dab423e857
Preferences: Replace legacy options with single scrollTo option (#4242) 2024-06-15 00:24:11 -04:00
abaevbog
2c74b0279d
fix focus not moving from reader into contextPane (#4238)
If the header is in bibliography entry mode.

Instead of trying to focus editable-text of the header (which
may not be possible), just focus the next node after the header.
2024-06-15 00:19:48 -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
Dan Stillman
3aaf3432da Local API: Add note to switch to getLibraryWebURL() (#4270)
Once #2893 is merged
2024-06-12 05:50:21 -04:00
Dan Stillman
9f4b15bbb7 Local API: Better handle users who have never logged in (#4270)
- Don't include `alternate` links
- Replace `users/local/:localKey` with `users/:userID` in `self` links
- Use `0` for id in `library` block
2024-06-12 05:48:34 -04:00
Dan Stillman
d33a904207 Local API: Use libraryTypeID rather than libraryID for library (#4270) 2024-06-12 05:48:29 -04:00
Dan Stillman
6b79b5849e Local API: numChildren=0, not false (#4270) 2024-06-12 05:45:54 -04:00
Dan Stillman
3363cb448a Local API: Attachment size fixes (#4270)
- Don't fail on missing attachment
- Get size of main file only
- Include best-attachment `attachmentSize` for parent items
2024-06-12 05:45:51 -04:00
Abe Jellinek
5d197e4b12 Mostly complete (read-only) compatibility with web library (#4270)
- Add pagination, limits, and Link header
- Add schema endpoints and dummy /settings endpoint
- Add /file endpoints
  - Browser security restrictions prevent the web library from actually loading
    the file: URIs that the local API returns, but out-of-browser use will work
    fine
- Add toResponseJSONAsync() DataObject function: delegates to toResponseJSON()
  by default, adds information that requires awaiting promises
  - Best attachment (links.attachment) and file size (links.enclosure.length)
    for items, meta.numItems for groups
  - Separate function for compatibility with the existing test code that uses
    toResponseJSON(), but we could consider unifying

This commit does not add the Access-Control headers that allow webpages to make
requests to the local API, since I don't think we actually want that.
2024-06-12 05:45:48 -04:00
Abe Jellinek
44d9530ecf Add local implementation of Zotero web API (#4270)
This required some tweaks to other parts of Zotero infrastructure:
- Search:
  - Add 'includeDeleted' condition to match behavior of 'includeTrashed' API
    parameter in a single search
- Data objects:
  - Improve toResponseJSON() implementations so output better matches the web
    API
    - Add toResponseJSON() to Zotero.Tags - has to be async so it can query the
      database and generally works differently from other toResponseJSON()
      functions, but accomplishes the same task
  - Remove unused getAPIData() and apiDataGenerator() DataObject functions. They
    aren't functional and wouldn't really make implementing the local server
    easier, so now seemed like a decent time to remove them
- Server:
  - Support resolving routes using pathparser.jsm
    - Add allowMissingParams option to PathParser#add(): prevents /route from
      matching /route/:param
  - Replace the query property of the data object sent to endpoint init()s with
    searchParams, an instance of URLSearchParams - supports #getAll() for
    repeatable parameters
- URIs:
  - Make getObjectURI() public, add utilities for converting URIs to API
    endpoints and web library URLs
2024-06-12 05:45:38 -04:00
Tom Najdek
88743682c3 Improve Advanced Search Dialog #4190 (#4225)
- Set the window minimum size to 700px x 500px.
- Fix a regression where non-applicable operators remain visible.
- Fix the "✔️" appearing next to multiple operators in the operator popup menu.
- Include the "Year" and "Attachments" columns by default in the results table.
2024-06-12 00:37:22 -04:00
Martynas Bagdonas
1d33b68761 Fix exported PDF annotation date and update reader/pdf-worker submodules 2024-06-11 21:13:17 +03:00
Martynas Bagdonas
50a037ecdc Add item pane preview mode support to reader and update its submodule 2024-06-10 16:35:46 +03:00
Dan Stillman
e3a831a68b Show dependent styles in CSL Preview
Addresses #4219
2024-06-10 05:52:29 -04:00
abaevbog
98066b1bc5
qf: improved multiselect (#4217)
- richlistbox shift-click selects a range starting with
_selectionStart. After a few cmd/ctrl clicks, _selectionStart
ends up not being correct - it can even point at an unselected item.
To help richlistbox properly select a range, before each click is
processed, reset _selectionStart to be either the first
or last selected item, depending on where shift-click landed.
- also, fixed a small glitch where inputs would be created if
you click on the red border outside of the actual editor.

Fixes: #4206
2024-06-08 04:55:24 -04:00
Dan Stillman
85a15175ae Fix sizing problems in Create Parent dialog
Use a regular paragraph for the intro text rather than an input
placeholder, which gets cut off it's too long, and allow the window to
be sized dynamically based on the title and localized strings.

Fixes #4109
2024-06-08 04:42:14 -04:00
abaevbog
249c5b8d12
vpat 49: refactor note format preference section (#4027)
"Note format" section in "Export" tab is technically a table and is
announced as such by screen readers, which is misleading.
It also opens a menulist when a checkbox is clicked, which is
not an expected behavior and can shift focus.

This refactors the "Note format" section to be a vbox container
with <checkbox>es and labels, which is more correct semantically and
does not confuse screen readers. In addition, when a chekbox is
clicked, dispatch a "change" event instead of unnecessarily open
up a menu.
2024-06-07 05:25:37 -04:00
Dan Stillman
7f84716c7e Update OpenURL setup prompt and add intro text to prefs
Closes #3788
2024-06-07 05:07:20 -04:00
Dan Stillman
4af4212360 Reorder preferences strings 2024-06-07 00:54:32 -04:00
Dan Stillman
be2ae2c1d7 Fix missing labels on -/+ buttons in style manager after #4006 2024-06-07 00:54:32 -04:00
Dan Stillman
e86458f11b Remove redundant zotero.ftl line after #4006 2024-06-07 00:54:32 -04:00
windingwind
5cc6631fd3
Improve merge pane (#4200)
resolve: #4142
2024-06-07 00:37:54 -04:00
Abe Jellinek
c826805bca
editable-text CE: Don't modify the DOM in sizeToContent() (#4214) 2024-06-06 23:35:53 -04:00
Dan Stillman
4522704a77 Fix Zotero.FileTypes.getIDFromMIMEType() (unused) 2024-06-06 08:09:34 -04:00
Adomas Venčkauskas
d306fa9142 Sort translators before calculating the translator hash 2024-06-06 10:08:27 +03:00
abaevbog
4f7b43747a
vpat 27/28: rtfScan aria edits (#4020)
- linked input/output file labels to the input fields so
they have descriptive names
- added more detailed button labels
- fixed "No file selected" not appearing if no file is selected
2024-06-06 01:03:58 -04:00
Abe Jellinek
f30d8f07d5 Correct field/getter names in collapsible-section CE 2024-06-06 00:58:11 -04:00
Abe Jellinek
0f0fec0c64 Persist pinned item pane section across restarts 2024-06-06 00:58:11 -04:00
abaevbog
a81701d7e7
vpat 51: add aria labels to advanced search (#3987)
In addition, make toolbarbuttons explicitly focusable
and make them clickable on space/Enter.
2024-06-06 00:54:54 -04:00
abaevbog
5a45717270
vpat 3: make "-"" btn focusable even if hidden (#4053)
In libraries, notes and tags boxes, do not hide the actual
"-" toolbarbutton, hide the <image> inside of it. Visually,
it looks the same but the button can be focused via tab
without having to expicitly make it visible. It means that
shift-tab from the section header will not skip the "-" button.

Also, make "remove" toolbarbutton from tagsbox focusable like all
others for consistency.
2024-06-06 00:13:26 -04:00
abaevbog
70d52277b1
vpat 11: do not skip over disabled tags during arrow navigation (#4051) 2024-06-06 00:11:52 -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
094b8157af Libraries & Collections pane: Use properties instead of global state 2024-06-05 14:33:51 -04:00