Idea #18846
Updated by Peter Amstutz over 2 years ago
h2. Goal Be able to include rich rendering of user-defined object properties or link/embed externally-derived content on Where is the Project and Collection pages. data stored? h2. Proposal In Workbench 2, add a "description" panel to the collection and * Arvados project pages properties ** Searchable ** report generator must have write access * Arvados link objects ** Can describe things that renders the "description" user account doesn't have write access to * Description field of the object. Also add a "banner" configuration value ** Report generator adds link to badge in config file, this is description ** Not searchable (unless it also displayed either as part of the description panel or fills in its own panel, but metadata) ** report generator must have write access * External service h2. How is rendered for every project or collection object on the cluster. data rendered? Introduce a simple template language (suggested: "Go templates":https://pkg.go.dev/text/template ) The "description" field contains HTML * Plugin (written in javascript / typescript) ** Read properties or link metadata, render arbitrary presentation ** cons: More complex implementation, need to build custom workbench with an additional template language. For display, the template is rendered then the plugin enabled * Badge ** fetch image by URL and render it as clickable link ** cons: Rendering issues * Fetch HTML is sanitized to remove scripts by URL and limited to a whitelist of tags. Then inject it into the HTML page ** Can render anything ** Requires external service ** cons: Rendering issues ** cons: Security issues h2. How is embedded it configured? * Plugin ** Requires compiling custom workbench package * Config file ** Would be part of public global config * Filling in the panel. description field ** no global configuration required Templates have idea: lightweight parameter substitution system for description field, which gives 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. record. Support server-side rendering (maybe an additional "render_description=true" parameter on GET request). Include read-only "description_html" field. h2. Use case: User wants need to assign a "FAIR data" score to projects. External service exists that takes an Arvados UUID and produces a report. Implementation: make 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 description field 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. projects more visible