Skip to content

Emojipicker with search - #6624

Draft
mahibi wants to merge 6 commits into
masterfrom
emojipickerWithSearch
Draft

Emojipicker with search#6624
mahibi wants to merge 6 commits into
masterfrom
emojipickerWithSearch

Conversation

@mahibi

@mahibi mahibi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

just a quick test based on top of https://github.com/nextcloud/talk-android/compare/emojipickerWithSearch?expand=1 to have an emojipicker with search

Will only continue with this if it's the decision in #6623 (comment)

Video:

Screen_recording_20260902_185352.mp4

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/33656364520/artifacts/9857503188
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Adds a new panel between the message input and the emoji picker with
a search field and a backspace button.

- The bundled androidx emoji2-emojipicker library has no search API
  and its emoji dataset isn't accessible from app code, so search is
  powered by a standalone keyword dataset (assets/emoji_keywords.json,
  derived from Unicode CLDR emoji names, scoped to the ~1770 emoji the
  library itself bundles) loaded via EmojiKeywordProvider. Matches
  replace the picker grid; picking one inserts it and records it as a
  recent emoji like the built-in grid does.
- The backspace button deletes the emoji/character before the cursor,
  using BreakIterator for grapheme-cluster-aware deletion so multi-
  codepoint emoji (flags, ZWJ sequences, skin tones) are removed
  whole.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…able search/backspace

Consolidates all emoji-picker code (keyword search, category-tab theming,
recent-emoji persistence) under com.nextcloud.talk.emojipicker and wraps
the androidx EmojiPickerView plus the search/backspace UI in a single
EmojiPickerPanel view. Search and backspace are now toggleable per call
site via searchEnabled/backspaceEnabled and wired through callbacks
(onEmojiPicked/onBackspaceClicked), so the panel has no knowledge of how
a pick or backspace is applied by the host.

Search is now available everywhere the picker is used - message input,
message reactions, status message, and avatar emoji picker - not just
the chat message input.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
EmojiPickerPanel's search EditText was left at its static default
colors, so the "Search emoji" hint didn't follow the app's dynamic
per-server branding the way the rest of the picker already does.
EmojiPickerPanel.applyTheme() now sets hint/text colors alongside the
existing background/tab/scroll-gesture theming, and every call site
(chat input, reactions, status message, avatar picker) routes through
it instead of theming pieces individually.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
These icons were left at their static drawable tint, so they didn't
follow the app's dynamic per-server branding like the rest of the
picker. EmojiPickerPanel.applyTheme() now tints all three with the
same color used for the search hint text.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
With the keyboard open for typing a search term, a backspace button
right next to the field read as if it deleted from the search term
itself rather than from the host's own text field. EmojiPickerPanel
now hides it on search-field focus and restores it once focus leaves
(or the panel is reset).

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…lete

EmojiPickerPanel gains backspaceActionAvailable, which the host toggles
independently of backspaceEnabled (which only controls whether the
button shows at all). MessageInputFragment now keeps it in sync with
whether the message input actually has text, since the panel itself
has no knowledge of the host's text field content.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant