10 Commits

Author SHA1 Message Date
Mikkeli Matlock bb7b1cf6b2 Implement comprehensive localization framework with English and Finnish support
- Add flutter_localizations dependency and l10n configuration
- Create ARB files for English (en) and Finnish (fi) translations
- Localize UI strings across all major components:
  * Navigation drawer and page titles
  * Scoring interface (arrows per end, ruleset names)
  * Scorecard headers (End, Arrows, Sum of 3/6, Accumulative)
  * Keypad functional buttons (CLEAR/TYHJENNÄ, CLOSE/SULJE)
  * Settings page placeholder content
  * Dialog messages and confirmation prompts
- Preserve universal archery scoring notation (X, 10, 9, M remain unlocalised)
- Use authentic Finnish archery terminology throughout
- Configure main app with proper localization delegates and supported locales
- Generate localization classes automatically via flutter_localizations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 20:47:16 +09:00
Mikkeli Matlock 8f7d870985 Fix vertical overflow by removing nested Scaffold architecture
- Remove nested Scaffold from ScoringPage (now uses LayoutBuilder)
- Use proper constraint-based height calculation instead of MediaQuery
- Maintain score preservation across navigation without nested scaffolds
- Fix viewport architecture to work within MainNavigationPage body
- Minor keypad layout adjustment (77%/23% flex ratio)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 13:28:43 +09:00
Mikkeli Matlock 10b1bf3f80 Clear active state on arrow count switch and simplify dialog
- Adds _disarmActiveState() to clear selection and retract keypad after mode switch
- Simplifies 'Keep scores?' dialog to just title and Yes/No buttons
- Prevents confusing active end highlighting after rule changes

Note: Hardcoded strings identified for future localization setup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 23:00:37 +09:00
Mikkeli Matlock 22d2e99400 Fix score preservation to maintain visual positions
Changes score preservation logic to keep scores in their visual row positions
rather than logical end positions when switching arrow count modes.

Example: End #4 scores in 3-arrow mode now move to second row of End #2
in 6-arrow mode, then auto-sort to first row as expected.

- Flattens scores by visual row order (1-12) before mode switch
- Redistributes scores to new structure maintaining visual positions
- Temporarily disables parent notifications during preservation
- Applies per-end sorting after redistribution completes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:56:03 +09:00
Mikkeli Matlock 398ac5af63 Implement persistent state across navigation views
Lifts scoring state from ScoringPage to MainNavigationPage level to preserve
scores and rule modes when switching between navigation views.

State management improvements:
- MainNavigationPage now manages persistent scoring state (arrows per end, scores array)
- ScoringPage accepts initial state parameters and callback functions
- All score modifications notify parent to maintain state consistency
- Deep copying ensures proper state isolation between parent and child

Persistence features:
- Scores remain intact when navigating to Settings and back to Main scorer
- Arrow count mode (3/6 arrows) preserved across view switches
- All sophisticated end interaction behaviors maintained within scoring context
- Confirmation dialogs for rule changes still work with persistent state

Technical implementation:
- State lifting pattern following Flutter best practices
- Callback functions for bidirectional communication between parent and child
- Deep copying of score arrays prevents reference sharing issues
- Clean separation of navigation state from scoring logic

This enhancement ensures professional UX where users can navigate between
app sections without losing their scoring progress or configuration settings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:51:33 +09:00
Mikkeli Matlock 8c86f9b38d Add 'Keep current scores?' confirmation dialog for arrow count switching
Implements smart score preservation when switching between 3-arrow and 6-arrow modes:

Core functionality:
- Detects existing scores before allowing arrow count mode changes
- Shows confirmation dialog only when scores exist on scorecard
- Two-option dialog: 'Yes - Keep scores' or 'No - Clear scores'
- User can cancel dialog to abort mode change completely

Score preservation logic:
- Preserves existing scores in their current positions when keeping scores
- Handles 6→3 arrow transition: rows 11-12 become inactive but retain scores
- Maintains visual greying and unselectable state for deactivated cells
- Respects new arrow count limits when copying scores to new structure

Dialog UX improvements:
- Clear messaging explaining the consequences of each choice
- Professional button styling with explicit action descriptions
- Cancellable dialog preserves current state if user changes mind
- Seamless integration with existing toggle switch behavior

Technical implementation:
- _hasAnyScores() helper efficiently detects non-empty scorecard
- _preserveScoresWithNewArrowCount() safely migrates scores to new structure
- Async/await pattern for proper dialog handling and state updates
- Maintains all existing sophisticated end interaction behaviors

This enhancement prevents accidental score loss while allowing flexible
rule switching, matching professional archery scoring conventions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:45:28 +09:00
Mikkeli Matlock c57418ea8b Add swipe-in side navigation with Main/Settings pages
Implements professional navigation structure with Material Design drawer:

- MainNavigationPage: Central navigation hub with AppBar and Drawer
- SettingsPage: Placeholder settings page for future configuration options
- Drawer navigation: Swipe-in side menu with Main (Scorer) and Settings options
- App title updates dynamically based on current page selection
- Clean architecture separating navigation from scoring logic

Navigation features:
- Material Design drawer with branded header showing 'Archery Bookkeeper Alpha 0.1'
- Icons for visual clarity (sports for scorer, settings for configuration)
- Selected state highlighting for current page
- Automatic drawer close on navigation selection
- Professional app description in drawer footer

Updated main.dart to use MainNavigationPage as entry point
Modified ScoringPage to work as embedded page without its own AppBar
Maintained all sophisticated end interaction behaviors within scoring context

This establishes the foundation for additional pages and features while
preserving the advanced scoring functionality implemented in the previous release.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:42:32 +09:00
Mikkeli Matlock 074f827c8b Implement comprehensive end interaction system with split viewport keypad
This major enhancement transforms the scoring interface into a sophisticated end interaction system that mirrors professional archery scoring workflows.

Core behaviors: per-end descending sorting, smart cell selection snapping, active end visual highlighting, cross-end disarm, enhanced keypad pop-up/retract.

Split viewport: upper viewport with scrollable scorecard, lower viewport with 30% keypad, 250ms animated transitions, proper separation prevents UI obstruction.

Enhanced 4x4 keypad: responsive Expanded widgets, CLEAR and CLOSE buttons, percentage-based sizing eliminates overflow.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:36:10 +09:00
Mikkeli Matlock 75b350f08d Implement static 6-arrow layout with logical grouping system
- Fix dynamic column generation issue that created 6 columns instead of 3
- Implement static 12-row grid with intelligent visual state management
- Add visual-to-logical mapping system for proper end/arrow indexing
- Fix sum calculations using logical end groupings instead of visual rows
- Replace ends per set selector with automatic ruleset inference
- Convert to percentage-based responsive layout eliminating viewport overflow
- Add clean merged arrow header replacing individual column indices

Core improvements:
- 3-arrow (Indoor): 10 ends, sum-3 active, sum-6 on even ends
- 6-arrow (Outdoor): 6 ends, sum-3 greyed, sum-6 every 2 visual rows
- No more RenderFlex overflow errors with responsive column widths
- Proper bounds checking prevents range errors on inactive rows
- Package identifier updated to com.novoyuuparosk.archery_bookkeeper

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 10:55:58 +09:00
Mikkeli Matlock 631a186dfd Restructured to use Flutter. Mockup UIs 2025-08-22 23:42:12 +09:00