From 5e86d6228c12ef25ee2135f991076d8d973c5cfb Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Tue, 10 Jun 2025 17:01:55 +0200 Subject: [PATCH] rm unneeded comments --- lerobot/html_dataset_visualizer/next.config.ts | 2 +- .../src/app/[org]/[dataset]/[episode]/fetch-data.ts | 1 - .../html_dataset_visualizer/src/app/explore/page.tsx | 1 - .../src/components/data-recharts.tsx | 11 ----------- .../src/components/playback-bar.tsx | 2 -- .../src/components/side-nav.tsx | 1 - 6 files changed, 1 insertion(+), 17 deletions(-) diff --git a/lerobot/html_dataset_visualizer/next.config.ts b/lerobot/html_dataset_visualizer/next.config.ts index 937028008..e81c31c81 100644 --- a/lerobot/html_dataset_visualizer/next.config.ts +++ b/lerobot/html_dataset_visualizer/next.config.ts @@ -2,7 +2,7 @@ import type { NextConfig } from "next"; import packageJson from './package.json'; const nextConfig: NextConfig = { - /* config options here */ + typescript: { ignoreBuildErrors: true, }, diff --git a/lerobot/html_dataset_visualizer/src/app/[org]/[dataset]/[episode]/fetch-data.ts b/lerobot/html_dataset_visualizer/src/app/[org]/[dataset]/[episode]/fetch-data.ts index b25a51ee1..e5056b985 100644 --- a/lerobot/html_dataset_visualizer/src/app/[org]/[dataset]/[episode]/fetch-data.ts +++ b/lerobot/html_dataset_visualizer/src/app/[org]/[dataset]/[episode]/fetch-data.ts @@ -134,7 +134,6 @@ export async function getEpisodeData( ) .map(([key]) => key); - // --- Refactored: Group columns by suffix first, then by scale --- // 1. Group all numeric keys by suffix (excluding 'timestamp') const numericKeys = seriesNames.filter((k) => k !== "timestamp"); const suffixGroupsMap: Record = {}; diff --git a/lerobot/html_dataset_visualizer/src/app/explore/page.tsx b/lerobot/html_dataset_visualizer/src/app/explore/page.tsx index ec8d8138f..5a175f028 100644 --- a/lerobot/html_dataset_visualizer/src/app/explore/page.tsx +++ b/lerobot/html_dataset_visualizer/src/app/explore/page.tsx @@ -6,7 +6,6 @@ import { formatStringWithVars, } from "@/utils/parquetUtils"; -// Server component for data fetching export default async function ExplorePage({ searchParams, }: { diff --git a/lerobot/html_dataset_visualizer/src/components/data-recharts.tsx b/lerobot/html_dataset_visualizer/src/components/data-recharts.tsx index 38a6ef401..3a0ebeb6b 100644 --- a/lerobot/html_dataset_visualizer/src/components/data-recharts.tsx +++ b/lerobot/html_dataset_visualizer/src/components/data-recharts.tsx @@ -47,10 +47,8 @@ export const DataRecharts = React.memo( }, ); -// Delimiter for nested/flattened keys const NESTED_KEY_DELIMITER = ","; -// SingleDataGraph renders one chart for a group const SingleDataGraph = React.memo( ({ data, @@ -62,7 +60,6 @@ const SingleDataGraph = React.memo( setHoveredTime: (t: number | null) => void; }) => { const { currentTime, setCurrentTime } = useTime(); - // Utility: flatten nested objects with dot notation function flattenRow(row: Record, prefix = ""): Record { const result: Record = {}; for (const [key, value] of Object.entries(row)) { @@ -129,12 +126,10 @@ const SingleDataGraph = React.memo( return chartData.length - 1; }; - // Handle mouseLeave - restore to video's current time const handleMouseLeave = () => { setHoveredTime(null); }; - // Handle click on chart - this SHOULD change the video time const handleClick = (data: any) => { if (data && data.activePayload && data.activePayload.length) { const timeValue = data.activePayload[0].payload.timestamp; @@ -143,9 +138,7 @@ const SingleDataGraph = React.memo( }; // Custom legend to show current value next to each series - // --- Grouped Legend UI --- const CustomLegend = () => { - // Find the closest data point to the hovered or current time const closestIndex = findClosestDataIndex( hoveredTime != null ? hoveredTime : currentTime, ); @@ -172,12 +165,9 @@ const SingleDataGraph = React.memo( groupColorMap[group] = `hsl(${idx * (360 / allGroups.length)}, 100%, 50%)`; }); - // Helper: check if all children are visible const isGroupChecked = (group: string) => groups[group].every(k => visibleKeys.includes(k)); - // Helper: check if some children are visible const isGroupIndeterminate = (group: string) => groups[group].some(k => visibleKeys.includes(k)) && !isGroupChecked(group); - // Handle parent (group) checkbox const handleGroupCheckboxChange = (group: string) => { if (isGroupChecked(group)) { // Uncheck all children @@ -188,7 +178,6 @@ const SingleDataGraph = React.memo( } }; - // Handle single (non-grouped) or child checkbox const handleCheckboxChange = (key: string) => { setVisibleKeys((prev) => prev.includes(key) ? prev.filter((k) => k !== key) : [...prev, key] diff --git a/lerobot/html_dataset_visualizer/src/components/playback-bar.tsx b/lerobot/html_dataset_visualizer/src/components/playback-bar.tsx index 84fb37c9b..0fd05f1f7 100644 --- a/lerobot/html_dataset_visualizer/src/components/playback-bar.tsx +++ b/lerobot/html_dataset_visualizer/src/components/playback-bar.tsx @@ -10,8 +10,6 @@ import { FaArrowUp, } from "react-icons/fa"; -// duration is now provided by useTime context - import { debounce } from "@/utils/debounce"; const PlaybackBar: React.FC = () => { diff --git a/lerobot/html_dataset_visualizer/src/components/side-nav.tsx b/lerobot/html_dataset_visualizer/src/components/side-nav.tsx index 4858ed3fd..cf5c0d4f1 100644 --- a/lerobot/html_dataset_visualizer/src/components/side-nav.tsx +++ b/lerobot/html_dataset_visualizer/src/components/side-nav.tsx @@ -25,7 +25,6 @@ const Sidebar: React.FC = ({ const [sidebarVisible, setSidebarVisible] = React.useState(true); const toggleSidebar = () => setSidebarVisible((prev) => !prev); - // Ref for the sidebar nav const sidebarRef = React.useRef(null); React.useEffect(() => {