Skip to content

Gesture auto-complete, similar to emojis/mentions#5919

Merged
akleshchev merged 3 commits into
secondlife:developfrom
gwigz:gwigz/gesture-autocomplete
Jun 18, 2026
Merged

Gesture auto-complete, similar to emojis/mentions#5919
akleshchev merged 3 commits into
secondlife:developfrom
gwigz:gwigz/gesture-autocomplete

Conversation

@gwigz

@gwigz gwigz commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

New gesture picker for nearby chat slash gesture autocomplete. Shown when the user types / nearby chat, matching active gestures instead of relying only on inline text completion.

  • LLGestureAutocompleteHelper following the existing LLChatMentionHelper/LLEmojiHelper autocomplete pattern
  • LLFloaterGestureAutocompletePicker and XUI for displaying matching gesture triggers and names.
  • Wires nearby chat to build gesture matches from active LLGestureMgr entries
  • Supports keyboard selection through the same LLTextEditor helper key-forwarding path used by other autocomplete helpers
  • Respects the existing ChatAutocompleteGestures chat preference
SCR-20260611-jvuu

Preview only shown in nearby chat, for active / prefixed triggers, like /wave.

SCR-20260611-jvww

Also ignores anything that doesn't match gestures, as you'd expect.

class LLFloater;
class LLUICtrl;

class LLGestureAutocompleteHelper : public LLSingleton<LLGestureAutocompleteHelper>

@akleshchev akleshchev Jun 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLFloaterGestureAutocompletePicker is effectively a singleton, since only a single instance can exist.

This is a not a request to change this, just a note, that code might have been simpler if LLFloaterGestureAutocompletePicker was doing all this instead of managing both host and picker manualy.

Comment thread indra/newview/llfloaterimnearbychat.cpp Outdated
@akleshchev

Copy link
Copy Markdown
Contributor

@maxim-productengine I think you are familiar with with autocompletion in chat, please check this over.

This likely needs approval from product before merge, I will create a ticket for triage.

@akleshchev akleshchev linked an issue Jun 15, 2026 that may be closed by this pull request
@akleshchev akleshchev requested a review from Copilot June 15, 2026 19:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new gesture auto-complete experience in Nearby Chat when typing /, using the same helper/picker pattern as existing emoji and @mention autocompletion.

Changes:

  • Introduces LLGestureAutocompleteHelper (LLUI) plus a new LLFloaterGestureAutocompletePicker (Newview) to display/select matching gesture triggers.
  • Wires Nearby Chat keystrokes to build suggestion rows from active LLGestureMgr gestures when ChatAutocompleteGestures is enabled.
  • Extends LLTextEditor key-forwarding so the gesture picker can be keyboard-navigated like other autocomplete helpers.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
indra/newview/skins/default/xui/en/floater_gesture_autocomplete_picker.xml Adds XUI definition for the gesture autocomplete picker floater.
indra/newview/llviewerfloaterreg.cpp Registers the new gesture autocomplete picker floater type.
indra/newview/llfloaterimnearbychat.cpp Builds gesture match rows on keystroke and shows/hides the helper based on input.
indra/newview/llfloatergestureautocompletepicker.h Declares the picker floater class and its selection/keyboard handling.
indra/newview/llfloatergestureautocompletepicker.cpp Implements picker population, keyboard navigation, and commit behavior.
indra/newview/CMakeLists.txt Adds the new picker floater source/header to the build.
indra/llui/lltexteditor.cpp Forwards key handling to the new gesture helper (like emoji/mention helpers).
indra/llui/llgestureautocompletehelper.h Declares the singleton helper API and row model for gesture suggestions.
indra/llui/llgestureautocompletehelper.cpp Implements helper show/hide/commit plumbing and picker refresh.
indra/llui/CMakeLists.txt Adds the new helper source/header to the LLUI build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread indra/newview/llfloaterimnearbychat.cpp Outdated
Comment thread indra/newview/llfloatergestureautocompletepicker.cpp

@maxim-productengine maxim-productengine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure that mGestureList->setDoubleClickCallback is the correct approach, because the first click may cause focus loss for the chat editor and that triggers hideHelper, so the picker is closed before the double-click is actually handled. I built this branch and it is indeed the issue: double-clicking the gesture won't put it into the chat.

Probably you need to update the mHostCtrlFocusLostConn = host_ctrl->setFocusLostCallback lambda: when focus goes into the picker's own floater, restore it to the host control instead of hiding. This way the picker stays open and the double-click commit fires correctly.
On the other hand, you may want to get rid of the double-click callback and handle single click similar to the name-mention helper. Both approaches are fine with me.

And Andrey is right, we'll need product approval before merge.

gwigz added 2 commits June 16, 2026 21:37
Includes some minor improvements (locales partially setup, LLCachedControl , require one letter after `/`, and tab select tweak)
@gwigz gwigz force-pushed the gwigz/gesture-autocomplete branch from a490f43 to 7545724 Compare June 17, 2026 08:06
@gwigz

gwigz commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

thanks, that should put it in a better position now

the lambda is a bit more than what mentions has, as gestures is using a scroll list which seems to pinch focus when it's clicked... could do it differently but that'll possibly require edits to LLScrollListCtrl?

@maxim-productengine

Copy link
Copy Markdown
Contributor

Looks good

Comment thread indra/newview/llfloaterimnearbychat.cpp Outdated
@akleshchev akleshchev merged commit 2c591b1 into secondlife:develop Jun 18, 2026
12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
@akleshchev

Copy link
Copy Markdown
Contributor

Thank you for your contribution!

@secondlife secondlife unlocked this conversation Jun 18, 2026
@gwigz gwigz deleted the gwigz/gesture-autocomplete branch June 18, 2026 21:16
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.

Gesture auto-completion

4 participants