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:
1 parent
9e2d65a926
commit
204ebd5fa5
49 files changed
+2197
-606
No files matched your search
@@ -509,15 +509,19 @@ describe("useCinematicScroll: montagem e desmontagem", () => {
|
||||
expect(prevented).toBe(false);
|
||||
});
|
||||
|
||||
it("path: reduced motion -> nothing, and anchor clicks are left to the browser", async () => {
|
||||
it("path: reduced motion -> no Lenis, and each anchor click is an instant jump, never an animation", async () => {
|
||||
mockMedia(["(prefers-reduced-motion: reduce)"]);
|
||||
await mount();
|
||||
|
||||
const { prevented } = click(link("projetos"));
|
||||
const first = click(link("projetos"));
|
||||
const second = click(link("projetos"));
|
||||
|
||||
expect(prevented).toBe(false);
|
||||
expect(first.prevented).toBe(true);
|
||||
expect(second.prevented).toBe(true);
|
||||
expect(mockLenis).toHaveLength(0);
|
||||
expect(window.scrollTo).not.toHaveBeenCalled();
|
||||
expect(window.scrollTo).toHaveBeenCalledTimes(2);
|
||||
for (const [options] of (window.scrollTo as jest.Mock).mock.calls)
|
||||
expect(options).toMatchObject({ behavior: "instant" });
|
||||
});
|
||||
|
||||
it("path: touch -> anchors are still handled (the click listener does not wait for any package)", async () => {
|
||||
|
||||
Reference in new issue
Block a user