mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
chore(cuesheet): remove temporary first-render metrics scaffold
The metrics scaffold has served its purpose: it proved the lazy text-cell editor change (Exp A) and ruled out the colour-precompute and lazy-autosize candidates. Removing it entirely: - restores AutoTextarea/Tooltip/useReactiveTextInput/EventRow/CuesheetTable to their original (uninstrumented) form - deletes common/devtools/cuesheet-metrics Keeps the validated Exp A optimization (lazy editor mounting). Verified: typecheck, lint, 181 unit tests, and production build all pass; no scaffold references remain in the bundle.
This commit is contained in:
@@ -14,7 +14,6 @@ import {
|
||||
import EmptyPage from '../../../common/components/state/EmptyPage';
|
||||
import EmptyTableBody from '../../../common/components/state/EmptyTableBody';
|
||||
import { useEntryActionsContext } from '../../../common/context/EntryActionsContext';
|
||||
import { useCuesheetPerf } from '../../../common/devtools/cuesheet-metrics/useCuesheetPerf'; // PERF-METRICS
|
||||
import type { RundownSource } from '../../../common/hooks-query/useScopedRundown';
|
||||
import type { ExtendedEntry } from '../../../common/utils/rundownMetadata';
|
||||
import { usePersistedRundownOptions } from '../../../features/rundown/rundown.options';
|
||||
@@ -73,7 +72,6 @@ export default function CuesheetTable({
|
||||
const setScrollHandler = useEventSelection((state) => state.setScrollHandler);
|
||||
|
||||
const virtuosoRef = useRef<TableVirtuosoHandle | null>(null);
|
||||
useCuesheetPerf(virtuosoRef); // PERF-METRICS
|
||||
const { listeners } = useTableNav();
|
||||
|
||||
const meta = useMemo(
|
||||
|
||||
+18
-21
@@ -5,7 +5,6 @@ import { CSSProperties, memo, useMemo } from 'react';
|
||||
import { IoEllipsisHorizontal } from 'react-icons/io5';
|
||||
|
||||
import IconButton from '../../../../common/components/buttons/IconButton';
|
||||
import { timeSync, useMountProbe } from '../../../../common/devtools/cuesheet-metrics/usePerfMark'; // PERF-METRICS
|
||||
import type { ExtendedEntry } from '../../../../common/utils/rundownMetadata';
|
||||
import { cx, getAccessibleColour } from '../../../../common/utils/styleUtils';
|
||||
import { AppMode } from '../../../../ontimeConfig';
|
||||
@@ -57,29 +56,25 @@ function EventRow({
|
||||
|
||||
const openMenu = useCuesheetTableMenu((store) => store.openMenu);
|
||||
|
||||
useMountProbe('EventRow', true); // PERF-METRICS
|
||||
|
||||
const { rowBgColour, backgroundColor, mutedText } = useMemo(() => {
|
||||
return timeSync('row.colourCalc', () => { // PERF-METRICS
|
||||
const accessible = getAccessibleColour(colour);
|
||||
const tmpColour = cssOrHexToColour(accessible.color) as RGBColour;
|
||||
const accessible = getAccessibleColour(colour);
|
||||
const tmpColour = cssOrHexToColour(accessible.color) as RGBColour;
|
||||
|
||||
let rowBgColour: string | undefined;
|
||||
if (isLoaded) {
|
||||
rowBgColour = '#087A27'; // $active-green
|
||||
} else if (colour) {
|
||||
const accessibleBg = cssOrHexToColour(accessible.backgroundColor);
|
||||
if (accessibleBg !== null) {
|
||||
rowBgColour = colourToHex({ ...accessibleBg, alpha: accessibleBg.alpha * 0.25 });
|
||||
}
|
||||
let rowBgColour: string | undefined;
|
||||
if (isLoaded) {
|
||||
rowBgColour = '#087A27'; // $active-green
|
||||
} else if (colour) {
|
||||
const accessibleBg = cssOrHexToColour(accessible.backgroundColor);
|
||||
if (accessibleBg !== null) {
|
||||
rowBgColour = colourToHex({ ...accessibleBg, alpha: accessibleBg.alpha * 0.25 });
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
rowBgColour,
|
||||
backgroundColor: accessible.backgroundColor,
|
||||
mutedText: colourToHex({ ...tmpColour, alpha: tmpColour.alpha * 0.8 }),
|
||||
};
|
||||
}); // PERF-METRICS
|
||||
return {
|
||||
rowBgColour,
|
||||
backgroundColor: accessible.backgroundColor,
|
||||
mutedText: colourToHex({ ...tmpColour, alpha: tmpColour.alpha * 0.8 }),
|
||||
};
|
||||
}, [colour, isLoaded]);
|
||||
|
||||
return (
|
||||
@@ -122,7 +117,9 @@ function EventRow({
|
||||
{eventIndex}
|
||||
</td>
|
||||
)}
|
||||
{timeSync('row.getVisibleCells', () => table.getRow(rowId).getVisibleCells()) // PERF-METRICS
|
||||
{table
|
||||
.getRow(rowId)
|
||||
.getVisibleCells()
|
||||
.map((cell) => {
|
||||
return (
|
||||
<td
|
||||
|
||||
Reference in New Issue
Block a user