Skip to content

improve: [1123] キーコンフィグ画面のキーボードプレビューについて、キーパターンやImgTypeが変わっても表示を維持するよう変更#2158

Merged
cwtickle merged 1 commit into
developfrom
feature/1123-kbPreview-visible
Jun 23, 2026
Merged

Conversation

@cwtickle

Copy link
Copy Markdown
Owner

🔨 変更内容 / Details of Changes

1. キーコンフィグ画面のキーボードプレビューについて、キーパターンやImgTypeが変わっても表示を維持するよう変更

  • キーコンフィグ画面のキーボードプレビューについて、キーパターンやImgTypeを切り替えると非表示になっていましたが、キーコンフィグ画面を離脱するまでは表示を継続するよう処理を見直しました。

🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes

  1. キーパターンの比較に使えるため。

📷 スクリーンショット / Screenshot

📝 その他コメント / Other Comments

@cwtickle cwtickle added the func11:KeyConfig キーコンフィグ、キー定義関係 label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6c883f38-c746-4d3c-a73f-f8df231fe815

📥 Commits

Reviewing files that changed from the base of the PR and between 0480a01 and 32fbc2e.

📒 Files selected for processing (2)
  • js/danoni_main.js
  • js/lib/danoni_constants.js

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Fixed keyboard layout preview state management in the key configuration screen to properly restore preview display when returning
    • Separated keyboard preview display control from key lock state for improved state management

Walkthrough

g_stateObj gains a new kbPreviewFlg boolean flag (default false) to track keyboard layout preview visibility separately from keyLockFlg. The title screen no longer resets keyLockFlg. keyConfigInit initializes kbPreviewFlg on first entry, auto-clicks btnKbPreview to restore preview state on re-entry, and togglePreview now writes to kbPreviewFlg instead of keyLockFlg.

Changes

KeyConfig Keyboard Preview State Separation

Layer / File(s) Summary
New kbPreviewFlg field and initialization
js/lib/danoni_constants.js, js/danoni_main.js
kbPreviewFlg: false is added to g_stateObj. The keyLockFlg = false reset is removed from the title screen initializer. keyConfigInit now also resets kbPreviewFlg to false when _initFlg is active.
Preview restore on re-entry and toggle state update
js/danoni_main.js
At the end of keyConfigInit, btnKbPreview is auto-clicked to restore preview display when kbPreviewFlg is true. Inside keyconfigKeyboardPreview.togglePreview, the visibility state is now written to kbPreviewFlg instead of keyLockFlg.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • cwtickle/danoniplus#2103: Introduces the keyboard preview toggle/refresh flow in keyConfigInit and keyconfigKeyboardPreview.togglePreview — the same code paths that this PR modifies to adopt kbPreviewFlg.
  • cwtickle/danoniplus#2155: Adds a KeyLock feature that synchronizes key locking with preview visibility in the same KeyConfig/preview flow, directly adjacent to the keyLockFlgkbPreviewFlg split made here.
  • cwtickle/danoniplus#2142: Modifies keyconfigKeyboardPreview and togglePreview logic in danoni_main.js, overlapping with the preview state management area changed in this PR.

Suggested labels

code-refactoring

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: improving keyboard preview on the key config screen to maintain display across key pattern and ImgType changes.
Description check ✅ Passed The description is directly related to the changeset, explaining the keyboard preview persistence feature and its purpose for pattern comparison.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/1123-kbPreview-visible

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.0)
js/danoni_main.js
js/lib/danoni_constants.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cwtickle cwtickle merged commit fc6e11e into develop Jun 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

func11:KeyConfig キーコンフィグ、キー定義関係

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant