Rendering rich descriptions
Be able to include rich rendering of user-defined object properties or link/embed externally-derived content on the Project and Collection pages.
In Workbench 2, add a "description" panel to the collection and project pages that renders the "description" field of the object.
Also add a "banner" configuration value in config file, this is also displayed either as part of the description panel or in its own panel, but is rendered for every project or collection object on the cluster.
Introduce a simple template language (suggested: Go templates )
The "description" field contains HTML with an additional template language. For display, the template is rendered then the HTML is sanitized to remove scripts and limited to a whitelist of tags. Then the HTML is embedded in the panel.
Templates have access to the fields of the current object (e.g. uuid, user-defined properties, etc). Templates should be able to create links or image URLs to things hosted by keep-web. Templates should also automatically turn UUIDs and PDHs into links.
Support server-side rendering (maybe an additional "render_description=true" parameter on GET request). Include read-only "description_html" field.
Use case: User wants to assign a "FAIR data" score to projects.¶
External service exists that takes an Arvados UUID and produces a report.
Implementation: the "banner" has a template which checks if the current object is a project, if so, it embeds an image badge that links to the external scoring service by using the template to construct a URL containing the project UUID. The service returns a badge with the score (1-5). Clicking on the badge goes to the report.
So when a user goes to a project page, it renders banner that displays the badge with the project score.
Alternate implementation: the service goes through all projects and assigns "score" and "report" metadata fields. The banner or the description field include a template which looks at the "score" and "report" fields to display the score and link to the report.