Skip to content

Commit

Permalink
fix: job result (output) descriptions are displayed
Browse files Browse the repository at this point in the history
fixes #108
  • Loading branch information
marisademeglio committed Sep 18, 2023
1 parent 9da817c commit 8006f57
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/renderer/components/JobDetailsPane/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ export function Results({ job }: { job: Job }) {
<ul>
{job.jobData.results?.namedResults.map(
(item, itemIndex) => (
<li key={`result-${itemIndex}`}>
<li
key={`result-${itemIndex}`}
className="named-result"
>
<FileLink fileHref={item.href}>
{item.nicename}
<span className="nicename">
{item.nicename}
</span>
</FileLink>
<span className="description">{item.desc}</span>
</li>
)
)}
Expand Down
23 changes: 23 additions & 0 deletions src/renderer/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,29 @@ select {
.job-results {
width: min-content;
white-space: nowrap;

/* the outer list item, e.g. "Results folder" */
.file-list > li {
display: flex;
flex-direction: column;
gap: var(--pad);
}

/* the inner list e.g. .filelist > ul > li.named-result */
li.named-result {
display: flex;
flex-direction: row;
gap: var(--pad);

.nicename {
font-weight: bold;
}
.description {
font-style: italic;
font-size: medium;

}
}
}
.form-buttons {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/shared/parser/pipelineXmlConverter/jobToJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function jobElementToJson(jobElm: Element): JobData {
mimeType: resultElm.getAttribute('mime-type'),
name: resultElm.getAttribute('name'),
nicename: resultElm.getAttribute('nicename'),
desc: resultElm.getAttribute('desc'),
files: [],
}
// the results are structured so that a "result" element is nested inside another "result" element
Expand Down
1 change: 1 addition & 0 deletions src/shared/types/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export type NamedResult = {
mimeType: string
name: string
nicename: string
desc: string
files: Array<ResultFile>
}

Expand Down

0 comments on commit 8006f57

Please sign in to comment.