From aa10dd40fd026c556a1c70d2eb085a89f30f44c8 Mon Sep 17 00:00:00 2001 From: Anna Viklund Date: Fri, 29 May 2026 20:14:16 +0200 Subject: [PATCH 1/3] layout: tweak content order for small screens --- .../pages/session-details/session-details.tsx | 172 +++++++++--------- 1 file changed, 84 insertions(+), 88 deletions(-) diff --git a/ui/src/pages/session-details/session-details.tsx b/ui/src/pages/session-details/session-details.tsx index cf7d9bbfa..a8c966f10 100644 --- a/ui/src/pages/session-details/session-details.tsx +++ b/ui/src/pages/session-details/session-details.tsx @@ -126,101 +126,97 @@ const Content = ({ session }: { session: SessionDetails }) => { > {activeCapture ? : null} -
-
- - - - - - - - -
- -
-
- -
- {activeCapture ? ( - - ) : null} -
-
- -
- -
-
-
-
-
-
- + + + + -
-
-
- {activeCapture ? ( - <> - - {activeCapture.dateTimeLabel} - - - - - - - - - ) : null} + + + + +
+
-
- + + +
+ {activeCapture ? : null}
-
- + + +
+
+
+ + +
+
+ +
+
+
+ {activeCapture ? ( + <> + + {activeCapture.dateTimeLabel} + + + + + + + + + ) : null} +
+
+ +
+
+
-
+
Date: Fri, 29 May 2026 20:32:07 +0200 Subject: [PATCH 2/3] feat: exclude snap to detections view setting after navigation improvements --- .../activity-plot/activity-plot.tsx | 17 +++++++---------- .../pages/session-details/session-details.tsx | 3 --- ui/src/pages/session-details/view-settings.tsx | 17 ----------------- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/ui/src/pages/session-details/activity-plot/activity-plot.tsx b/ui/src/pages/session-details/activity-plot/activity-plot.tsx index 9c61728dd..711c11a1b 100644 --- a/ui/src/pages/session-details/activity-plot/activity-plot.tsx +++ b/ui/src/pages/session-details/activity-plot/activity-plot.tsx @@ -19,13 +19,11 @@ const tooltipBorderColor = CONSTANTS.COLOR_THEME.border export interface ActivityPlotProps { session: SessionDetails setActiveCaptureId: (captureId: string) => void - snapToDetections?: boolean timeline: TimelineTick[] } export const ActivityPlot = ({ session, - snapToDetections, timeline, setActiveCaptureId, }: ActivityPlotProps) => { @@ -156,14 +154,13 @@ export const ActivityPlot = ({ return } - const captureId = - snapToDetections || !timelineTick.representativeCaptureId - ? findClosestCaptureId({ - snapToDetections, - timeline, - targetDate: timelineTick.startDate, - }) - : timelineTick.representativeCaptureId + const captureId = !timelineTick.representativeCaptureId + ? findClosestCaptureId({ + snapToDetections: false, + timeline, + targetDate: timelineTick.startDate, + }) + : timelineTick.representativeCaptureId if (captureId) { setActiveCaptureId(captureId) diff --git a/ui/src/pages/session-details/session-details.tsx b/ui/src/pages/session-details/session-details.tsx index a8c966f10..8de4c3df5 100644 --- a/ui/src/pages/session-details/session-details.tsx +++ b/ui/src/pages/session-details/session-details.tsx @@ -86,7 +86,6 @@ const Content = ({ session }: { session: SessionDetails }) => { const [settings, setSettings] = useState({ defaultFilters: true, showDetections: true, - snapToDetections: session.numDetections ? true : false, }) // Data @@ -209,7 +208,6 @@ const Content = ({ session }: { session: SessionDetails }) => {
@@ -220,7 +218,6 @@ const Content = ({ session }: { session: SessionDetails }) => { void - session: SessionDetails settings: { defaultFilters: boolean showDetections: boolean - snapToDetections: boolean } }) => { const { projectId } = useParams() @@ -70,18 +65,6 @@ export const ViewSettings = ({ /> {project ? : null}
- - onSettingsChange({ - ...settings, - snapToDetections: !settings.snapToDetections, - }) - } - disabled={session.numDetections ? false : true} - />
From e885c9b2e86018bd39b795df3df186f3bdd475ce Mon Sep 17 00:00:00 2001 From: Anna Viklund Date: Fri, 29 May 2026 21:40:54 +0200 Subject: [PATCH 3/3] layout: stabilize layout for small screens --- ui/src/pages/session-details/process/process.tsx | 11 ++++++++++- ui/src/pages/session-details/session-details.tsx | 16 ++++++++++------ ui/src/pages/session-details/view-settings.tsx | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ui/src/pages/session-details/process/process.tsx b/ui/src/pages/session-details/process/process.tsx index f32779685..7d9c412ca 100644 --- a/ui/src/pages/session-details/process/process.tsx +++ b/ui/src/pages/session-details/process/process.tsx @@ -18,13 +18,22 @@ import { STRING, translate } from 'utils/language' import { UserPermission } from 'utils/user/types' import { ProcessNow } from './process-now' -export const Process = ({ capture }: { capture: CaptureDetails }) => { +export const Process = ({ capture }: { capture?: CaptureDetails }) => { const { projectId } = useParams() const { project } = useProjectDetails(projectId as string, true) const [pipelineId, setPipelineId] = useState( project?.settings.defaultProcessingPipeline?.id ) + if (!capture) { + return ( + + ) + } + return ( diff --git a/ui/src/pages/session-details/session-details.tsx b/ui/src/pages/session-details/session-details.tsx index 8de4c3df5..3b6eabf78 100644 --- a/ui/src/pages/session-details/session-details.tsx +++ b/ui/src/pages/session-details/session-details.tsx @@ -123,7 +123,7 @@ const Content = ({ session }: { session: SessionDetails }) => { })} tooltip={translate(STRING.TOOLTIP_SESSION)} > - {activeCapture ? : null} + {user.loggedIn ? : null}
@@ -170,8 +170,8 @@ const Content = ({ session }: { session: SessionDetails }) => { width={activeCapture?.width ?? session.firstCapture.width} />
-
-
+
+
{activeCapture ? ( <> @@ -197,16 +197,20 @@ const Content = ({ session }: { session: SessionDetails }) => { - ) : null} + ) : ( + + {translate(STRING.LOADING_DATA)}... + + )}
-
+
-
+