docs: the folding channel header in its e2e, and three comments brought up to date

The e2e asserted the channel chrome never moves; it folds once now. The
ui catalog lists scrollFold and progressiveRows, Tabs names the
per-tab memory its callers use, and the welcome note says a removed
language orphans its stored copies too.
This commit is contained in:
2026-10-02 23:42:32 +02:00
parent 608fde2d55
commit dfd43ae89c
4 changed files with 22 additions and 14 deletions
+15 -9
View File
@@ -106,28 +106,34 @@ test.describe("channel view", () => {
await expectContentType(page, "includeLive", false);
});
// Platform S4b: the whole channel chrome (banner, identity, tabs, toolbar) is fixed — it stays
// put while only the video grid scrolls.
test("the channel chrome stays fixed while the video grid scrolls", async ({ page }) => {
// Platform S4b + E31 S4c: the channel chrome sits outside the scroller. Scrolling into the videos
// folds the banner and identity once (the name moves into the tab row); from then on the folded
// chrome stays put while only the video grid scrolls.
test("the channel chrome folds once, then stays fixed while the grid scrolls", async ({
page,
}) => {
await openApp(page);
await page.getByTestId("video-card-channel").first().click();
const count = page.getByTestId("item-count");
const title = page.getByTestId("channel-title");
await expect(count).toBeVisible();
await expect(page.getByTestId("video-card").first()).toBeVisible();
const titleTop = await title.evaluate((el) => el.getBoundingClientRect().top);
const countTop = await count.evaluate((el) => el.getBoundingClientRect().top);
await expect(page.getByTestId("channel-folded")).toHaveCount(0);
// Keep nudging until the grid is tall enough to actually scroll (it may still be filling in).
await expect
.poll(async () => {
await page.getByRole("main").evaluate((el) => el.scrollBy(0, 1500));
await page.getByRole("main").evaluate((el) => el.scrollBy(0, 600));
return page.getByRole("main").evaluate((el) => el.scrollTop);
})
.toBeGreaterThan(400);
const folded = page.getByTestId("channel-folded");
await expect(folded).toBeVisible();
await expect(folded.getByTestId("channel-title")).toBeVisible();
const titleTop = await folded.evaluate((el) => el.getBoundingClientRect().top);
const countTop = await count.evaluate((el) => el.getBoundingClientRect().top);
// The chrome didn't move — banner title and toolbar are in exactly the same place.
expect(await title.evaluate((el) => el.getBoundingClientRect().top)).toBe(titleTop);
await page.getByRole("main").evaluate((el) => el.scrollBy(0, 400));
expect(await folded.evaluate((el) => el.getBoundingClientRect().top)).toBe(titleTop);
expect(await count.evaluate((el) => el.getBoundingClientRect().top)).toBe(countTop);
});
});