Toolhub/Progress reports/2021-01-29

Report on activities in the Toolhub project for the week ending 2021-01-29.

Direct tool registration edit

Tracked in Phabricator:
Task T195682

Allowing folks to create their toolinfo.json style tool descriptions directly in Toolhub rather than requiring an externally hosted json file for the crawler to harvest is a named goal for the January-March quarter.

Bryan has built out the initial API to allow this in gerrit:657932. These new API endpoints are included:

  • POST /api/tools - Create a new toolinfo record
  • PUT /api/tools/{name}/ - Update info for a specific tool
  • DELETE /api/tools/{name}/ - Delete a tool

Improved API description edit

Tracked in Phabricator:
Task T272719 resolved

While working towards the tool write API, Bryan took some time to find a way to better document some data fields in the OpenAPI spec.

Prior to the introduction of JSONSchemaField, values stored in the database as JSON blobs had an OpenAPI description without any details:

url_alternates : {
  <any-key>: {missing-type-info}
}

These fields now have descriptions taken directly from the toolinfo schema:

url_alternates : [{
  language: string
  url: uri
}]

Initial RTL review complete edit

Eran completed an initial review of RTL support using the https://toolhub-demo.wmcloud.org demo server. He has also graciously supplied a gerrit patch to improve one aspect of the display by explicitly setting dir=auto for content from toolinfo files which may be written in an LTR language even when viewed with an RTL locale selected.

Miscellaneous fixes edit

Wrap up edit

Having the core toolinfo write API merged unblocks a large amount of UI work to add screens for creating and editing tools. While that work starts we will be making additional enhancements to the backend storage and API to track version history for tools and allow wiki-like views of past revisions and diffs between revisions. We expect the work needed to implement these features to be greatly accelerated by copying implementation details from the Striker project which has this functionality for it's toolinfo.json objects.