From 579a09c673745fee7111edadc3e9a520d7748215 Mon Sep 17 00:00:00 2001 From: wniestroj <152595753+wniestroj@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:39:28 +0100 Subject: [PATCH] Feedback changes and fixes (#615) * Simulations sidebar - no layout options selected by default * Simulations sidebar - selecting both layouts deselects both options * Fix pkpd version overlap navigation buttons on high scales * Simulation page - fix plots get smaller after each resize/sidebar collapse; Fix height of plots on ultra wide resolutions; Fix Simulation Sidebar view for high scales * Simulation page - fix plots box having wrong dimensions on first plot render * Input width and table height adjustments for scales up to 200% * Disable edit button on shared projects * Simulation page - Add confirmation box to removing plot * Fix plot buttons being overlapped * Remove unintentional prop pass * Add Ref prefix to reference plot lines; Fix plots not resize on initial load --------- Co-authored-by: Martin Robinson --- .../src/features/data/DosingProtocols.tsx | 1 + frontend-v2/src/features/drug/Drug.tsx | 7 ++-- frontend-v2/src/features/main/Sidebar.tsx | 9 +++- frontend-v2/src/features/projects/Project.tsx | 15 ++++--- .../src/features/projects/Projects.tsx | 42 ++++++++++++++++++- .../src/features/results/ResultsTab.tsx | 8 ++-- .../simulation/SimulationPlotView.tsx | 27 +++++++----- .../src/features/simulation/Simulations.tsx | 16 +++++-- .../simulation/SimulationsSidePanel.tsx | 13 +++++- 9 files changed, 107 insertions(+), 31 deletions(-) diff --git a/frontend-v2/src/features/data/DosingProtocols.tsx b/frontend-v2/src/features/data/DosingProtocols.tsx index d77554c4..d1dddf7f 100644 --- a/frontend-v2/src/features/data/DosingProtocols.tsx +++ b/frontend-v2/src/features/data/DosingProtocols.tsx @@ -236,6 +236,7 @@ const DosingProtocols: FC = ({ label="Units" value={adminUnit} onChange={handleAmountUnitChange(adminId)} + sx={{ maxWidth: '10rem'}} size="small" margin="dense" > diff --git a/frontend-v2/src/features/drug/Drug.tsx b/frontend-v2/src/features/drug/Drug.tsx index 3fbc1f0c..6b4ba9a1 100644 --- a/frontend-v2/src/features/drug/Drug.tsx +++ b/frontend-v2/src/features/drug/Drug.tsx @@ -317,7 +317,7 @@ const Drug: FC = () => { 1300 ? "70%" : "100%", maxHeight: getTableHeight({ steps: DOUBLE_TABLE_SECOND_BREAKPOINTS }), }} > @@ -359,7 +359,7 @@ const Drug: FC = () => { {isEditIndex === index ? ( { {isEditIndex === index ? ( { {isEditIndex === index ? ( +
+
{isExpanded ? ( )} +
+
{isExpanded && ( )} +
+
); diff --git a/frontend-v2/src/features/projects/Project.tsx b/frontend-v2/src/features/projects/Project.tsx index 7db9a7fe..51882e02 100644 --- a/frontend-v2/src/features/projects/Project.tsx +++ b/frontend-v2/src/features/projects/Project.tsx @@ -44,7 +44,6 @@ import EditIcon from "@mui/icons-material/Edit"; import CheckIcon from "@mui/icons-material/Check"; import CloseIcon from "@mui/icons-material/Close"; import { DescriptionModal } from "./Description"; -import { useFieldState } from "../../app/hooks"; interface Props { project: ProjectRead; @@ -245,6 +244,12 @@ const ProjectRow: FC = ({ ? "Remove shared project from your list" : "Delete Project"; + const getRowNumber = () => { + if (window.innerHeight < 800) return Math.ceil(window.innerHeight / 100); + + return 15; + } + return ( <> = ({ textFieldProps={defaultProps} size="small" rules={{ required: true, validate: validateName }} - sx={{ ...defaultSx }} + sx={{ ...defaultSx, minWidth: '10rem' }} /> ) : (