Skip to content

Conversation

yoichiro
Copy link
Collaborator

@yoichiro yoichiro commented Jul 1, 2025

$(cat <<'EOF'

Summary

This PR introduces a comprehensive project creation dialog for the firmware workbench, replacing the immediate project creation with a configurable dialog that allows users to specify project parameters and optionally generate QMK template files.

Key Features

  • Enhanced Project Creation Dialog: Replaced simple project creation with a comprehensive form including:

    • Project name with auto-generation following existing naming conventions
    • QMK firmware version selection
    • Optional keyboard directory name specification
    • Template file creation with keyboard-specific configuration
  • QMK Template Generation: Updated template generation to use modern QMK standards:

    • Replaced old config.h/info.json approach with current keyboard.json specification
    • Added rules.mk generation for build configuration
    • MCU-specific pin configurations and bootloader detection
    • Support for both development boards (Pro Micro, etc.) and integrated MCUs
  • Comprehensive UI Controls:

    • MCU type selection (development board vs integrated MCU)
    • Dynamic MCU selection based on type
    • Keyboard information fields (name, maintainer, manufacturer)
    • Form validation with proper error handling
  • Complete Internationalization: Added Japanese translations for all new UI elements

Technical Implementation

  • React Hook Form: Used for robust form state management and validation
  • MCU Configuration Logic: Automatic pin mapping and bootloader selection based on MCU type and specific MCU choice
  • Template Generation: QMK-compliant keyboard.json, keymap.c, and rules.mk file generation
  • State Management: Proper Redux integration with new action thunks

Changes Made

  1. New Components:

    • CreateNewWorkbenchProjectDialog.tsx: Main dialog component with comprehensive form controls
  2. Enhanced Actions:

    • workbench.action.ts: Added createWorkbenchProjectWithOptions thunk with template file generation logic
    • MCU-specific helper functions for pin configuration and bootloader selection
  3. UI Integration:

    • Header.tsx & Header.container.ts: Updated to use new dialog instead of immediate project creation
  4. Internationalization:

    • ja.json: Added comprehensive Japanese translations for all new UI strings

Behavior Changes

  • Before: Clicking "Create New Project" immediately created a project with default settings
  • After: Clicking "Create New Project" opens a dialog allowing users to configure project parameters and optionally generate template files

Testing Considerations

  • Template file generation follows QMK current standards (keyboard.json format)
  • MCU-specific configurations are properly mapped for both development boards and integrated MCUs
  • Form validation prevents invalid configurations
  • Default project naming follows existing conventions

🤖 Generated with Claude Code
EOF
)

…eration

- Replace immediate project creation with configurable dialog
- Add CreateNewWorkbenchProjectDialog component with full form controls
- Support MCU type selection (development board vs integrated MCU)
- Auto-generate QMK keyboard.json, keymap.c, and rules.mk templates
- Update template generation from old config.h/info.json to modern keyboard.json
- Add MCU-specific pin configurations and bootloader detection
- Include comprehensive Japanese translations for new UI elements
- Support optional template file creation with keyboard metadata

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

Co-Authored-By: Claude <[email protected]>
@yoichiro yoichiro closed this Jul 1, 2025
@yoichiro yoichiro deleted the feature/workbench-project-creation-dialog branch July 1, 2025 23:39
@yoichiro
Copy link
Collaborator Author

yoichiro commented Jul 1, 2025

I decided that I need to choice other approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant