Repository navigation
Description
Why?
#571 shows the outputs of a WES run with the hints of the workflow's I/O Schema (https://github.com/elixir-cloud-aai/ga4gh-io-schema). It needs an element that shows a single output as its viewer hint (x-ga4gh-ui-widget) says, under the profile's security rules. Version 0.3.0 of the profile has only two viewers, table-viewer and html-viewer, and offers every other output for download (see UI widgets and Rendering schemas and outputs). That is all the demo workflows need, so a small element covers it, without a widget library.
What to do
- Add an element that renders one output of a normalised outputs object, given the output's schema and value, e.g., in
@elixir-cloud/wesor a shared package (the component owner decides where, and the names):table-viewer: CSV or TSV as a table, every cell escaped (set as text), with a row limit;html-viewer: aniframewith an emptysandboxattribute and a Content Security Policy that blocks external loads (e.g.,srcdocwith a CSP<meta>element before the markup), else a download;- anything else, including unknown and
custom:viewers: a download link, never a direct link to active content; - title and description as text; lists of files and files keyed by name, one entry per file;
- URLs checked against an allow-list of schemes (a property of the element) before anything is fetched or linked.
- Fetching goes through the provider pattern of the package, so that the app adds credentials and decides how storage URLs (e.g.,
s3://) become fetchable ones; the element doesn't resolve them itself. - Tests (escaping, sandbox attributes, fallbacks, allow-list), a docs-app demo with the profile's example outputs, docs.
- Pin the profile by commit SHA, not by a tag: it has no releases yet.
A library of widgets for inputs and outputs is expected later (an existing JSON Schema form or viewer library, an own one, or an extension of the Cloud Components). This element is deliberately minimal, so that it can be replaced by or wrapped in that library; the component owner decides the technical choices.
Done when
- The element shows
table-viewerandhtml-vieweroutputs as the profile requires, and offers everything else for download. - URLs are checked against the allow-list; tests cover escaping, sandboxing and fallbacks.
- A docs-app demo and docs exist.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNice to have
Activity