Skip to content

投稿画面のテキスト入力欄を完全にCompose化した - #2046

Merged
pantasystem merged 7 commits into
developfrom
feature/compose-emoji-textfield
Jul 26, 2026
Merged

投稿画面のテキスト入力欄を完全にCompose化した#2046
pantasystem merged 7 commits into
developfrom
feature/compose-emoji-textfield

Conversation

@pantasystem

Copy link
Copy Markdown
Owner

やったこと

動作確認

スクリーンショット(任意)

備考

Issue番号

pantasystem and others added 7 commits July 27, 2026 00:28
- NoteEditorTextField: BasicTextField ベースの入力土台(補完なし)
- EmojiTokenScanner: カーソル直前の :query トークン検出(純粋関数)
- EmojiComposeTextField: 補完ドロップダウン付き純粋Compose版
  (TextFieldValue で text+selection を一体管理、URL貼付検出、auto-focus)
- CW フィールドを純粋Compose版へ切替(Phase 3)
- トークンスキャナ・差分ロジックのユニットテスト追加

本文フィールドは従来の AndroidView 版のまま(Phase 4 で移行予定)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
- EmojiComposeTextField に textCursorPosFlow 対応を追加
  (絵文字ピッカー・メンション挿入後のキャレット再配置)
- NoteEditorTextInputSection の本文フィールドを EmojiComposeTextField へ切替
- 不要になった InputType import を除去

旧 AndroidView 版(EmojiAutoCompleteTextField)は未参照になったが、
実機での動作確認後に Phase 5 で削除する

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
フィールドがフォーカスを失ったら候補ドロップダウンを隠すようにした。
focusable Popup を使わないためフォーカス/IMEのフリッカーは発生しない。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
verticalScroll の Column に detectTapGestures を追加し、入力欄・ボタン
以外の空白タップで focusManager.clearFocus() する。フォーカス連動で
補完ドロップダウンも閉じる。ドラッグ(スクロール)はタップとして扱われない。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
clearFocus 方式をやめ、dismissSignal を親から渡す方式に変更。
外側タップで suppressed=true にしてドロップダウンのみ非表示にし、
フォーカス・IME は保持する。次にトークン(query)が変化したら
suppressed を解除して再表示する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
Compose移行完了に伴い、未参照となった旧AndroidView実装を削除:
- EmojiAutoCompleteTextField(SelectionAwareMultiAutoCompleteTextView含む)
- CustomEmojiCompleteAdapter / CustomEmojiTokenizer
- 空の重複ファイル modules/features/note/CustomEmojiCompleteAdapter.kt

上記アダプタ/トークナイザを使う唯一の残存箇所だったViewベース簡易
エディタ SimpleEditor を機能ごと廃止:
- SimpleEditorFragment.kt(SimpleEditor interface含む) / fragment_simple_editor.xml
- SetSimpleEditor.kt / MainActivity.setSimpleEditor() / app_bar_main.xml の simpleEditorBase
- SettingAppearanceActivity の簡易エディタ トグル

永続化Configの isSimpleEditorEnabled フィールドはスキーマ変更回避のため残置。
:app:assembleDebug BUILD SUCCESSFUL。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dxk6vdyqgYEhaBpymi3mEk
@pantasystem
pantasystem merged commit 073df9d into develop Jul 26, 2026
1 check passed
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