Skip to content

Fix the autocomplete "dropdown" menus#487

Merged
7w1 merged 6 commits intoSableClient:devfrom
nushea:emoji-scrolling
Mar 24, 2026
Merged

Fix the autocomplete "dropdown" menus#487
7w1 merged 6 commits intoSableClient:devfrom
nushea:emoji-scrolling

Conversation

@nushea
Copy link
Contributor

@nushea nushea commented Mar 23, 2026

Description

This PR seeks to fix the issues around the autocomplete for emoji, room, command, and people.

The issues fixed by this PR are: the autocomplete menu not scrolling, not rollovering (ie when you were at the top you couldnt go back to the bottom or vice versa), and when editing a message and trying to select an emoji the arrow buttons not working.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

Written with all the natural stupidity possible in one so-called human

@nushea nushea requested review from 7w1 and hazre as code owners March 23, 2026 01:29
Copy link
Member

@7w1 7w1 left a comment

Choose a reason for hiding this comment

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

Haven't tested yet but looks good on a glance

@7w1
Copy link
Member

7w1 commented Mar 23, 2026

Seems like enter can't select an emoji when editing a message, don't know if thats intended.
When the autocomplete menu pops up, there isn't any selection box around an entry until you start using arrow keys, i feel like having that selection box appear around the first element by default would make things a little more clear?

@nushea
Copy link
Contributor Author

nushea commented Mar 23, 2026

Seems like enter can't select an emoji when editing a message, don't know if thats intended. When the autocomplete menu pops up, there isn't any selection box around an entry until you start using arrow keys, i feel like having that selection box appear around the first element by default would make things a little more clear?

if the objective is to use an actual focustrap as it is intended, you cant both have it not focused and selecting the first item as far as i can tell, the previous pr only had the 1st item selected by hard-selecting it and then not using the focus trap in any meaningful way, i could try to rewrite this to avoid using a focustrap at all, but any pr that wants to implement the changes that the previous pr wanted to implement without it being a complete workaround of the focustrap would require just not using one and rewriting the autocomplete function (again as far as i can tell and my knowledge around focustraps goes), which i would be happy to try my hand at if highlighting the 1st item is a hard requirement (also i will be looking into why entering doesnt select an item on edit messages)

@nushea nushea marked this pull request as draft March 23, 2026 18:07
@nushea nushea marked this pull request as ready for review March 24, 2026 05:50
@nushea
Copy link
Contributor Author

nushea commented Mar 24, 2026

I will make a new pr whenever i have the time to do it properly since this would still need quite some rewriting, but this fixes all the issues as far as i can tell (except not highlighting the 1st item as you type it since that is still not how focustraps work at all afaik but could use a rewrite to avoid using a focustrap for this))

@7w1 7w1 added this pull request to the merge queue Mar 24, 2026
Merged via the queue into SableClient:dev with commit 8f46cff Mar 24, 2026
9 checks passed
@nushea nushea deleted the emoji-scrolling branch March 24, 2026 06:44
github-merge-queue bot pushed a commit that referenced this pull request Mar 24, 2026
> [!IMPORTANT]
> Merging this PR will create a new release.

## Fixes

* Fixed text autocomplete issues
([#487](#487) by @nushea)
* Fix crash when url contains malformed/dangling uri components.
([#512](#512) by @7w1)
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.

2 participants