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

@@ -204,6 +204,50 @@ describe("ProjectLightbox", () => {
).toBeInTheDocument();
});
it("shows the duration when the video already has its metadata at opening (loadedmetadata never fires again)", () => {
jest
.spyOn(HTMLMediaElement.prototype, "readyState", "get")
.mockReturnValue(1);
jest
.spyOn(HTMLMediaElement.prototype, "duration", "get")
.mockReturnValue(75);
const dialog = setup();
expect(dialog.querySelector(".ds-lb-time")?.textContent).toBe(
"0:00 / 1:15",
);
});
it("keeps 0:00 / 0:00 until the metadata is there, then reads the duration from the playback tick", () => {
const frames: FrameRequestCallback[] = [];
jest.spyOn(window, "requestAnimationFrame").mockImplementation((cb) => {
frames.push(cb);
return frames.length;
});
const dialog = setup();
expect(dialog.querySelector(".ds-lb-time")?.textContent).toBe(
"0:00 / 0:00",
);
const video = dialog.querySelector("video") as HTMLVideoElement;
Object.defineProperty(video, "duration", {
configurable: true,
value: 42,
});
// sem evento algum: quem lê é o marcador, quadro a quadro, enquanto o vídeo toca
act(() => {
video.dispatchEvent(new Event("play"));
});
act(() => {
for (const frame of frames.splice(0)) frame(0);
});
expect(dialog.querySelector(".ds-lb-time")?.textContent).toBe(
"0:00 / 0:42",
);
});
it("seeks with the range slider", () => {
const dialog = setup();
const video = loadVideo(dialog, 30);