fix(ux): apply UX quick wins (#54)

Get started links to registration and says an admin approves accounts.
Back navigation restores the library scroll; search no longer fills history.
Steam and PSN unlink ask first. Any close marks news as seen.
Confetti plays only when the level rises on the page.
Count-ups respect reduced motion. Html lang follows the UI language.
Add a 404 page, translated role and dialog close label.
This commit is contained in:
lobo committed 2026-10-21 08:21:39 +02:00
1 parent 60dcfe8992
commit a60010e055
28 files changed
+427 -58

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
// @vitest-environment jsdom
import {afterEach, describe, expect, it, vi} from 'vitest';
import {cleanup, render, screen} from '@testing-library/react';
import StatCard from './StatCard.jsx';
vi.mock('react-i18next', () => import('../test/i18n-mock.js'));
afterEach(() => {
cleanup();
delete document.documentElement.dataset.reduceMotion;
});
describe('StatCard', () => {
it('shows the final number at once when the user wants reduced motion', () => {
document.documentElement.dataset.reduceMotion = 'true';
render(<StatCard label="Games" value={1234}/>);
expect(screen.getByText('1.234')).toBeTruthy();
});
it('counts up from 0 otherwise', () => {
render(<StatCard label="Games" value={1234}/>);
expect(screen.getByText('0')).toBeTruthy();
});
});