diff --git a/src/components/ExperimentDetails/ExperimentDetailPage.scss b/src/components/ExperimentDetails/ExperimentDetailPage.scss
index 2f5336c9..fc930d1c 100644
--- a/src/components/ExperimentDetails/ExperimentDetailPage.scss
+++ b/src/components/ExperimentDetails/ExperimentDetailPage.scss
@@ -1,7 +1,6 @@
@import "../../App";
.experiment-detail-page {
-
&__sticky-bar {
position: fixed;
bottom: 0;
@@ -24,13 +23,12 @@
}
}
-
&__trial-cards {
display: flex;
flex-direction: row-reverse;
width: 100%;
max-width: 100%;
- overflow-x: scroll;
+ overflow-x: auto;
background: $white;
padding: 20px 12px;
transform: rotate(180deg);
@@ -40,16 +38,12 @@
transform: none;
overflow-x: hidden;
align-items: center;
-
-
}
@include maxWidth(550px) {
padding-left: 0;
padding-right: 0;
}
-
-
}
&__trials-header {
@@ -91,7 +85,6 @@
margin-left: 0;
}
-
@include tabletWidth {
transform: none;
margin-left: 0;
diff --git a/src/components/ExperimentDetails/Inputs/ExperimentInputs.jsx b/src/components/ExperimentDetails/Inputs/ExperimentInputs.jsx
index b66336ab..d11a1ffe 100644
--- a/src/components/ExperimentDetails/Inputs/ExperimentInputs.jsx
+++ b/src/components/ExperimentDetails/Inputs/ExperimentInputs.jsx
@@ -1,9 +1,7 @@
import useBEMNaming from "../../../common/useBEMNaming";
import React, { useEffect, useRef, useState } from "react";
import "./ExperimentInputs.scss";
-import Button from "../../Buttons/Button";
-import NoInputs from "./NoInputs";
-import InputPreview from "./InputPreview";
+import Button from "../../Buttons/Button"; import NoInputs from "./NoInputs";
import InputSelectors from "./InputSelectors";
export const ExperimentInputs = (props) => {
@@ -27,13 +25,13 @@ export const ExperimentInputs = (props) => {
};
}, [isOpen]);
- const selectedIndex = props.inputs.indexOf(props.selectedInput);
+ const selectedIndex = props.selectedInput && (props.hasMultipleInputs ? props.inputs.indexOf(props.selectedInput) : props.inputs.findIndex(input => input.src === props.selectedInput.src));
- const hasNoInputs = props.inputs.length === 0 || props.inputs[0] === "";
+ const hasNoInputs = !props.inputs || props.inputs.length === 0 || props.inputs[0] === "";
- const handleSelect = (input) => {
+ const handleSelect = (input, idx) => {
setIsOpen(false);
- props.selectInput(input);
+ props.selectInput(input, idx);
};
if (hasNoInputs)
@@ -42,33 +40,27 @@ export const ExperimentInputs = (props) => {
return (
);
};
diff --git a/src/components/ExperimentDetails/Inputs/ExperimentInputs.scss b/src/components/ExperimentDetails/Inputs/ExperimentInputs.scss
index c36bc5b3..4306f5ad 100644
--- a/src/components/ExperimentDetails/Inputs/ExperimentInputs.scss
+++ b/src/components/ExperimentDetails/Inputs/ExperimentInputs.scss
@@ -3,6 +3,7 @@
.experiment-inputs {
align-items: center;
display: flex;
+ flex-direction: column;
justify-content: space-between;
width: 100%;
@@ -14,12 +15,13 @@
.secondary-button {
height: 48px;
+ margin-left: auto;
+ margin-bottom: 20px;
}
&__selection-area {
margin-bottom: 32px;
- position: relative;
- width: clamp(200px, 500px, 400px);
+ width: 100%;
@include tabletWidth {
max-width: 300px;
diff --git a/src/components/ExperimentDetails/Inputs/InputPreview.js b/src/components/ExperimentDetails/Inputs/InputPreview.js
deleted file mode 100644
index c7864706..00000000
--- a/src/components/ExperimentDetails/Inputs/InputPreview.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from "react";
-import "./InputPreview.scss";
-import { TaskInputTypes } from "../../../helpers/TaskInputTypes";
-import Task from "../../../helpers/Task";
-import { InputPreviewImage } from "./InputPreviewImage";
-import { InputPreviewText } from "./InputPreviewText";
-
-export default function InputPreview(props) {
- const task = props.task ?? Task.image_classification;
-
- if (task.inputType === TaskInputTypes.Text)
- return
;
-}
diff --git a/src/components/ExperimentDetails/Inputs/InputPreviewImage.js b/src/components/ExperimentDetails/Inputs/InputPreviewImage.js
index 5219cc04..45a4701d 100644
--- a/src/components/ExperimentDetails/Inputs/InputPreviewImage.js
+++ b/src/components/ExperimentDetails/Inputs/InputPreviewImage.js
@@ -3,7 +3,6 @@ import React from "react";
export function InputPreviewImage(props) {
const { getElement } = useBEMNaming("input-preview");
-
return (