Closed chrisvanrun closed 3 weeks ago
A possibly important change I forgot to mention is the following:
CIVs' rendering on a detail page was selective: some types would show, but some would not. With this PR that changes and they are all shown. For instance, output images will have a download button. This did mean that the BOOL/STRING/FLOAT/INT(?) types used to be gathered in a single table:
Whereas they are now shown as individual items:
IMHO this is fine as not many algorithms output multiple bool/strings.
Currently, we have several slightly different not-so-nice, representations of component interface values (CIVs).
This PR contains a rework of these representations in the job detail pages for evaluation and algorithms. The ultimate goal is to extend its usage to the ArchiveItem detail page and ArchiveItem/DisplaySet list pages.
Current 'inline' view
New 'inline' view
Template tags
~Two template tags are introduced:
civ
andciv_inline
. Each tag takes a component interface value as the only argument and renders an HTML representation of the CIV. The inline variant is meant for list-like representations where horizontal space is limited and relies on a modal—the regular one where there is plenty of horizontal space to render the CIV proper.~A new template civ.html is introduced that accepts the arguments
civ
anddisplay_inline
. Thedisplay_inline
is a switch that can be set to True and is meant for list-like representations where horizontal space is limited and relies on a modal—the regular one where there is plenty of horizontal space to render the CIV properVega Lazy loading
In addition, this PR adds lazy loading for vega charts which is very much needed if viewing a list of CIVSets that output charts.
New Fixtures
CIVs are a crucial part of development now, and I think adding a bunch of test CIVs by hand is a lot of hassle. This, I think, plays a part in these representations flying under the radar. As such, this PR also introduces the
scripts/component_interface_value_fixtures.py
. This repeatable script creates an algorithm job that has an overabundance of different CIVs for quick development.The screenshots are made based on this fixture.