- 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.
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
* Improve feed item pane header (fixes#4141)
* Show item pane custom head when headerMode is none (fixes#4116)
* fx115: Fix button style on windows (fixes#4120)
* Move split-menu-button styles to SCSS
- 59afef6 added a duplicate assignment to item.rights that was putting
a TextConstruct(!!!!) in the item JSON field instead of a string
- info.rights was being set to a TextConstruct (preexisting issue!)
The 'blur' event needs to be dispatched by editable-text
before its state is reset (not after) because tagsbox uses
.initialValue in the 'blur' handler.
followup to 101e6d55d5Fixes: #3575
If a parent item and its primary attachment are selected, it should
still say "Show File" rather than "Show Files". This adds the
questionably named `Zotero.Items.numDistinctFileAttachmentsForLabel()`
to try to figure out if we're operating on 0, 1, or >1 items.
Follow-up to #4124
When item is created manually, title field in itemBox
will be focused instead of the title in the itemPane as before.
If the itemBox is collapsed, it will be opened.
Added 'open' setter to item pane section for brevity
Fixes#4111
* tag selector focus edits
- no tabstop on the tag selector scrollable area
- change tag selector's role from default "grid" to "group".
"grid" is not quite correct semantically and leads to
voiceover suggesting irrelevant commands.
- move all keyboard handling logic to tagSelectorList.jsx.
Tabbing through tag selector is now handled in ZoteroPane,
so the only logic left there is arrow navigation
between tags, and there's no reason to not have it
together with the tags list.
- a workaround to deal with focused tags when windowing
kicks in. When a tag is focused, record its index.
Each time tags are re-rendered, if the saved index is not
among rendered tags, refocus it, otherwise, move focus
to the tags list.
- edits to zoteroPaneTest.js focus tests to expect the updated focus
sequence: selected tab -> tabs menu -> sync button -> collectionTree
toolbar -> collectionTree -> tags selector -> itemTree toolbar
- updated tags selector keydown handling to explicitly handle all
tab/shift-tab events using moveFocus. It is more readable and explicit
focus handling for all components is required for programmic tab/shiftTab
events dispatched in tests to actually move focus
Fixes: #3975