"use client"; import type { ChannelGroupSectionView } from "yt-dlp-transcript-common/views/channelGroupSections"; import { ChannelGroupLine } from "./ChannelGroupLine"; import { RACK_LAYERS } from "./rackLayout"; // A group's section header: one full-colspan row above its channels' rows, so // the columns stay locked across every group (comparing transcript counts // across groups is the point, which is what rules out cards). // // scope="rowgroup", NOT colgroup. `rowgroup` maps to role `rowheader`; // `colgroup` maps to `columnheader` and would drop group names into the same // role bucket channels-sort.spec.ts iterates over the real column headers. // // The accessible name is set explicitly to the group's name so // getByRole("rowheader", { name }) addresses the group and not the whole line of // station buttons and counts nested inside it. export function ChannelGroupHeaderRow({ section, siteId, colSpan, }: { section: ChannelGroupSectionView; siteId: string; // The table's full width, owned by ChannelsTable: it is the one that knows // how many pipeline columns the settings switched on. colSpan: number; }) { const { group, channels } = section; const name = group.name || group.id; return ( // THE SECTION RULE IS THE CELL'S SHADOW, NOT THE ROW'S BORDER. Tailwind's // preflight collapses table borders, and a collapsed border belongs to the // table grid, not to the sticky cell — so pinned under the thead, the th // moved and its 2px top rule stayed behind as a gap the rows showed // through. An inset shadow is painted by the th and travels with it.