From 70846aefbe5bfeca4694bee1419bc36ac1674652 Mon Sep 17 00:00:00 2001 From: Shobhit Nagpal <74096450+Shobhit-Nagpal@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:12:55 +0530 Subject: [PATCH] refactor: time input labels on hover (#1855) --- .../rundown-event/RundownEvent.module.scss | 7 ++++++ .../rundown-event/RundownEventInner.tsx | 9 +++++++- .../time-input-flow/TimeInputFlow.module.scss | 23 +++++++++++++++++++ .../rundown/time-input-flow/TimeInputFlow.tsx | 9 +++++--- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/apps/client/src/features/rundown/rundown-event/RundownEvent.module.scss b/apps/client/src/features/rundown/rundown-event/RundownEvent.module.scss index d4526ad5a..4f412e2c6 100644 --- a/apps/client/src/features/rundown/rundown-event/RundownEvent.module.scss +++ b/apps/client/src/features/rundown/rundown-event/RundownEvent.module.scss @@ -134,6 +134,13 @@ $skip-opacity: 0.2; height: 100%; } +.eventTimers.editMode:hover { + [class*="hoverLabel"] { + opacity: 1; + transition: opacity 0.15s 0.5s ease; + } +} + .chipSection { grid-area: chip; } diff --git a/apps/client/src/features/rundown/rundown-event/RundownEventInner.tsx b/apps/client/src/features/rundown/rundown-event/RundownEventInner.tsx index 61ca42e2f..b85089092 100644 --- a/apps/client/src/features/rundown/rundown-event/RundownEventInner.tsx +++ b/apps/client/src/features/rundown/rundown-event/RundownEventInner.tsx @@ -10,10 +10,12 @@ import { IoTime, } from 'react-icons/io5'; import { LuArrowDownToLine } from 'react-icons/lu'; +import { useSessionStorage } from '@mantine/hooks'; import { EndAction, Playback, TimerType, TimeStrategy } from 'ontime-types'; import Tooltip from '../../../common/components/tooltip/Tooltip'; import { cx } from '../../../common/utils/styleUtils'; +import { AppMode, sessionKeys } from '../../../ontimeConfig'; import TitleEditor from '../common/TitleEditor'; import TimeInputFlow from '../time-input-flow/TimeInputFlow'; @@ -76,6 +78,11 @@ function RundownEventInner({ }: RundownEventInnerProps) { const [renderInner, setRenderInner] = useState(false); + const [editorMode] = useSessionStorage({ + key: sessionKeys.editorMode, + defaultValue: AppMode.Edit, + }); + useEffect(() => { setRenderInner(true); }, []); @@ -92,7 +99,7 @@ function RundownEventInner({ return !renderInner ? null : ( <> -
+
-
+
{showLabels && Start time} + Start
-
+
{showLabels && End time} + End
-
+
{showLabels && Duration} + Duration