Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(explorer): wider experiment result view modal + more download types #318

Merged
merged 14 commits into from
Oct 30, 2023
Merged
26 changes: 24 additions & 2 deletions src/components/explorer/IndividualExperiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const ExperimentResultActions = ({ result }) => {

return <>
{resultViewable ? <>
<Modal title={<span>View: {result.filename}</span>} visible={viewModalVisible} onCancel={onViewCancel}>
<Modal
title={<span>View: {result.filename}</span>}
visible={viewModalVisible}
onCancel={onViewCancel}
width={695}>
noctillion marked this conversation as resolved.
Show resolved Hide resolved
{hasTriggeredViewModal && (
<FileDisplay uri={url} fileName={result.filename} />
)}
Expand Down Expand Up @@ -353,7 +357,25 @@ const IndividualExperiments = ({ individual }) => {

// expand here accordingly
const isDownloadable = (result) =>
noctillion marked this conversation as resolved.
Show resolved Hide resolved
["vcf", "cram", "bw", "bigwig"].includes(result.file_format?.toLowerCase());
[
"vcf",
"cram",
"bw",
"bigwig",
"pdf",
"csv",
"tsv",
"jpeg",
"png",
"gif",
"markdown",
"mp3",
"m4a",
"mp4",
"docx",
"xls",
"xlsx"].includes(result.file_format?.toLowerCase());


IndividualExperiments.propTypes = {
individual: individualPropTypesShape,
Expand Down
13 changes: 13 additions & 0 deletions src/propTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ export const experimentResultPropTypesShape = PropTypes.shape({
"SFF",
"GFF",
"TABIX",
"PDF",
"CSV",
"TSV",
"JPEG",
"PNG",
"GIF",
"MARKDOWN",
"MP3",
"M4A",
"MP4",
"DOCX",
"XLS",
"XLSX",
"UNKNOWN",
"OTHER",
]),
Expand Down