fix(navegacao): foco em âncora de outra página, vitrine acessível e 3D mais leve

Foco cai no destino ao chegar de outra página; âncoras ignoram ?tipo=; movimento reduzido salta em todos os cliques; cronômetro da janela ampliada; degradê no topo de Projetos e legendas do mergulho com intervalos testados; vitrine acima da barra de cookies e com 2 paradas por projeto; reel-list.css no global; 3D montado em tarefas curtas, limitado a ~30 qps e estático com WebGL por software; pôsteres da vitrine de 330 para 158 KB; SC Plus regravado; scripts sem funções acima de complexidade 10.
This commit is contained in:
Evandro Fonseca Junior committed 2026-10-14 19:14:48 -03:00
1 parent 9e2d65a926
commit 204ebd5fa5
49 files changed
+2197 -606

No files matched your search

+21 -20
View File
@@ -3,8 +3,8 @@ import {
chapterFraction,
chapterIndexAt,
desktopFractionAt,
getProjectVideo,
getShowcaseAssets,
getShowcaseConfig,
mobileFractionAt,
SHOWCASE,
type ShowcaseConfig,
@@ -12,7 +12,8 @@ import {
/**
* Testes de caminhos-base de lib/project-showcase.ts (complemento de project-showcase.test.ts):
* getProjectVideo (id da vitrine x id fora dela x chaves herdadas de Object, nos dois aparelhos) e os trechos
* getShowcaseConfig/getShowcaseAssets (id da vitrine x id fora dela x chaves herdadas de Object, nos dois aparelhos; o
* antigo getProjectVideo saiu do módulo por não ter mais uso) e os trechos
* de chapterAnchors/interpolate/chapterFraction que o arquivo principal não exercita.
*/
@@ -23,17 +24,17 @@ function config(
return { id: "fixture", accent: "#fff", durations, weight: 1, chapters };
}
describe("getProjectVideo", () => {
describe("getShowcaseConfig e getShowcaseAssets", () => {
it.each(SHOWCASE.map(({ id }) => id))(
"path: showcase project %s -> assets for the requested device",
"path: showcase project %s -> its config and the assets of each device",
(id) => {
expect(getProjectVideo(id, "desktop")).toEqual(
getShowcaseAssets(id, "desktop"),
expect(getShowcaseConfig(id)?.id).toBe(id);
expect(getShowcaseAssets(id, "desktop").poster).toBe(
`/videos/${id}/desktop.webp`,
);
expect(getProjectVideo(id, "mobile")).toEqual(
getShowcaseAssets(id, "mobile"),
expect(getShowcaseAssets(id, "mobile").poster).toBe(
`/videos/${id}/mobile.webp`,
);
expect(getProjectVideo(id)).toEqual(getShowcaseAssets(id, "desktop"));
},
);
@@ -44,22 +45,22 @@ describe("getProjectVideo", () => {
"__proto__",
"toString",
"SEV-MODAINTIMA",
])(
"path: id %j is not a showcase project -> undefined for both devices",
(id) => {
expect(getProjectVideo(id)).toBeUndefined();
expect(getProjectVideo(id, "mobile")).toBeUndefined();
},
);
])("path: id %j is not a showcase project -> no config", (id) => {
expect(getShowcaseConfig(id)).toBeUndefined();
});
it("path: the two devices differ in size and in poster, not in the project folder", () => {
const desktop = getProjectVideo("nutriscan", "desktop");
const mobile = getProjectVideo("nutriscan", "mobile");
const desktop = getShowcaseAssets("nutriscan", "desktop");
const mobile = getShowcaseAssets("nutriscan", "mobile");
expect(desktop).toMatchObject({ width: 1440, height: 900 });
expect(mobile).toMatchObject({ width: 390, height: 844 });
expect(desktop?.poster).toBe("/videos/nutriscan/desktop.webp");
expect(mobile?.poster).toBe("/videos/nutriscan/mobile.webp");
expect(desktop.poster).toBe("/videos/nutriscan/desktop.webp");
expect(mobile.poster).toBe("/videos/nutriscan/mobile.webp");
expect(desktop.sources.map(({ src }) => src)).toEqual([
"/videos/nutriscan/desktop.webm",
"/videos/nutriscan/desktop.mp4",
]);
});
});