Skip to content

feat: Replace keyboard.json dialogs with tabbed editor#913

Merged
yoichiro merged 2 commits intomainfrom
feature/workbench-keyboard-json-tabbed-editor
Mar 25, 2026
Merged

feat: Replace keyboard.json dialogs with tabbed editor#913
yoichiro merged 2 commits intomainfrom
feature/workbench-keyboard-json-tabbed-editor

Conversation

@yoichiro
Copy link
Copy Markdown
Collaborator

@yoichiro yoichiro commented Mar 25, 2026

Summary

  • Replace keyboard.json dialog-based editing (KeyboardJsonEditorDialog, LayoutPreviewDialog) with an integrated tab-based UI matching the keymap.c editor pattern
  • Add three tabs for keyboard.json: Code Editor, Form Editor (vertical sub-tabs for General/USB・MCU/Hardware/Features/Lighting/Input), and Key Layout (visual drag editor)
  • Implement 2-way binding with debounced auto-apply for both Form Editor and Key Layout — no more explicit Apply buttons
  • Keep Code Editor always mounted (display:none) to preserve editing state and pending debounce across tab switches
  • Show JSON parse error messages when switching to Form Editor or Key Layout with invalid JSON
  • Add i18n entries for new UI labels (Form Editor, Could not parse keyboard.json.)

Test plan

  • Select keyboard.json → verify 3 tabs appear (Code Editor / Form Editor / Key Layout)
  • Edit keyboard name in Form Editor → switch to Code Editor → verify JSON reflects the change
  • Switch back to Form Editor → verify the changed name is retained
  • Break JSON in Code Editor (remove a comma) → switch to Form Editor → verify error message is shown
  • Switch to Key Layout tab → verify error message is shown there too
  • Switch back to Code Editor → verify the broken JSON is preserved (comma not restored)
  • Fix JSON in Code Editor → switch to Form Editor → verify form loads correctly
  • Drag a key in Key Layout → switch to Code Editor → verify layout positions updated in JSON
  • Verify keymap.c tabs (Code Editor / Visual Editor) still work correctly
  • Verify Japanese locale displays correctly for all new labels

🤖 Generated with Claude Code

yoichiro and others added 2 commits March 26, 2026 07:36
…y with keymap.c

Convert keyboard.json editing from dialog-based UI to tab-based UI (Code Editor / Form Editor / Key Layout) matching the keymap.c tab pattern. Extract KeyboardJsonSettingsPanel and KeyboardLayoutPanel as standalone components. Implement 2-way binding with debounced auto-apply for both Form Editor and Key Layout tabs. Keep Code Editor always mounted (display:none) to preserve editing state across tab switches. Show parse error messages when JSON is invalid.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…stive-deps rule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yoichiro yoichiro merged commit 34db3a6 into main Mar 25, 2026
1 check passed
@yoichiro yoichiro deleted the feature/workbench-keyboard-json-tabbed-editor branch March 25, 2026 23:46
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