Compare commits

4 Commits

Author SHA1 Message Date
Frank Schwenk
634d012097 fix(ui): prevent winner modal icons from clipping
Increase top padding, set overflow visible, and position decorative icons inside container so emojis are fully visible.

Refs #26
2025-10-30 10:50:24 +01:00
Frank Schwenk
301d5b131c feat(ux): auto-advance on game type and race selection
- Step 4: selecting a game type immediately advances to step 5
- Step 5: selecting Endlos or a quick-pick number immediately finalizes race-to

Improves flow by removing an extra click. No changes to validation.

Refs #26
2025-10-30 10:41:38 +01:00
Frank Schwenk
4c8b0cfed7 refactor(css): remove global :focus outline styles in index.css\n\nFocus rings were visually distracting for this app context; removed the global *:focus rule. Component-level focus where needed can be handled locally.\n\nRefs #26 2025-10-30 10:36:47 +01:00
Frank Schwenk
31ed600c97 fix(build): remove stray CSS brace causing esbuild minify warning
Fix unexpected '}' in src/styles/index.css after .btn--secondary:hover.\nEliminates Vite/esbuild css-syntax-error during production build.\n\nRefs #26
2025-10-30 10:34:30 +01:00
3 changed files with 11 additions and 11 deletions

View File

@@ -26,7 +26,7 @@
.winner-announcement { .winner-announcement {
text-align: center; text-align: center;
margin: 20px 0 0 0; margin: 20px 0 0 0;
padding: 24px 16px; padding: 32px 16px 24px 16px; /* extra top padding to keep icons inside */
background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%); background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
border-radius: 16px; border-radius: 16px;
font-size: 1.2rem; font-size: 1.2rem;
@@ -35,13 +35,13 @@
box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3); box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3);
animation: celebrationPulse 2s ease-in-out infinite; animation: celebrationPulse 2s ease-in-out infinite;
position: relative; position: relative;
overflow: hidden; overflow: visible; /* avoid clipping decorative icons */
} }
.winner-announcement::before { .winner-announcement::before {
content: '🎉'; content: '🎉';
position: absolute; position: absolute;
top: -10px; top: 6px;
left: 20px; left: 20px;
font-size: 24px; font-size: 24px;
animation: bounce 1s ease-in-out infinite; animation: bounce 1s ease-in-out infinite;
@@ -50,7 +50,7 @@
.winner-announcement::after { .winner-announcement::after {
content: '🏆'; content: '🏆';
position: absolute; position: absolute;
top: -10px; top: 6px;
right: 20px; right: 20px;
font-size: 24px; font-size: 24px;
animation: bounce 1s ease-in-out infinite 0.5s; animation: bounce 1s ease-in-out infinite 0.5s;

View File

@@ -612,6 +612,8 @@ const GameTypeStep = ({ onNext, onCancel, initialValue = '' }: GameTypeStepProps
const handleSelect = (selectedType: string) => { const handleSelect = (selectedType: string) => {
setGameType(selectedType); setGameType(selectedType);
// Auto-advance to next step on selection
onNext(selectedType);
}; };
const handleSubmit = (e: Event) => { const handleSubmit = (e: Event) => {
@@ -706,7 +708,11 @@ const RaceToStep = ({ onNext, onCancel, initialValue = '', gameType }: RaceToSte
const handleQuickPick = (value: number) => { const handleQuickPick = (value: number) => {
// For endlos (endless) games, use Infinity to prevent automatic completion // For endlos (endless) games, use Infinity to prevent automatic completion
setRaceTo(value === 0 ? 'Infinity' : value); const selected = value === 0 ? 'Infinity' : value;
setRaceTo(selected);
// Auto-advance to the next step (finalize) when a quick pick is chosen
const raceToValue = selected === 'Infinity' ? Infinity : (parseInt(String(selected), 10) || 0);
onNext(raceToValue);
}; };
const handleInputChange = (e: Event) => { const handleInputChange = (e: Event) => {

View File

@@ -161,7 +161,6 @@ input:focus, select:focus {
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
} }
}
.btn-primary:hover { .btn-primary:hover {
background: var(--color-primary-hover); background: var(--color-primary-hover);
@@ -267,11 +266,6 @@ input:focus, select:focus {
border: 0; border: 0;
} }
/* Focus styles for better accessibility */
*:focus {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}
/* Skip link for keyboard navigation */ /* Skip link for keyboard navigation */
.skip-link { .skip-link {