From 9b00490aa71f69a8c9604141e94888a98c55cde2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 04:43:37 +0000 Subject: [PATCH] feat: Revamp modes, texts, timer, and UI This commit introduces several enhancements and fixes: - **Timer Fix:** Refactored timer logic in `useTypingTest.ts` for improved stability and accuracy. Consolidated timer effects and ensured proper state resets on test completion, reset, or mode/duration changes. - **Developer Mode Revamp:** - Significantly expanded code snippets for JavaScript, Python, Java, C#, and Go. - Added TypeScript as a new selectable language with its own code snippets. - Updated UI components (`ModeSelector`, `TypingTest`) to support TypeScript. - **Flirty Mode Revamp:** - Increased the variety of flirty text messages. - Added subtle UI enhancements (themed border/shadow for `TextDisplay`) when Flirty mode is active. - **Expanded Normal Texts:** Added more sentences to the "normal" mode text collection to increase variety. - **UI Upgrades (General):** - Implemented a custom focus ring utility (`custom-focus-ring`) for better accessibility and applied it to various interactive elements (mode selectors, buttons, links). - Made custom clickable divs (Header logo, mode selectors) keyboard accessible. - Updated GitHub link in Footer and standardized copyright notice. - Ensured consistency with existing UI theming (shadcn/ui). --- client/src/components/Footer.tsx | 10 +- client/src/components/Header.tsx | 5 +- client/src/components/typing/ModeSelector.tsx | 28 +- client/src/components/typing/TextDisplay.tsx | 14 +- client/src/components/typing/TypingTest.tsx | 7 +- client/src/index.css | 4 + client/src/lib/helpers/textGenerator.ts | 57 ++++- client/src/lib/hooks/useTypingTest.ts | 242 ++++++++---------- 8 files changed, 207 insertions(+), 160 deletions(-) diff --git a/client/src/components/Footer.tsx b/client/src/components/Footer.tsx index a1fa13a..d5a3a10 100644 --- a/client/src/components/Footer.tsx +++ b/client/src/components/Footer.tsx @@ -1,12 +1,12 @@ export default function Footer() { return ( -