element-hq / element-hq/element-web

Username completion ordering: shorter/exact match sorted after longer incomplete match

Open
#15,609 1 comment 3 reactions 1 assignee Claimed by @SimonBrandner View on GitHub
A-Autocomplete P2 S-Minor T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

# Description

Username completion ordering: when I type a username, `@...` I expect to see the shorter/exact match sorted before the longer incomplete match, but this is not the current behavior.

### Steps to reproduce

- Find/create users with matching-prefix names, ideally where one username is a prefix of the other, `@prefix` & `@prefixuser`
- Type `@` to begin tagging, at `@prefix`
- (I observe) `@prefixuser` first in the suggestions and tab completion, despite that it should come later in lexicographic order.

Is there some kind of special casing of completion on shorter or complete/terminated words/tokens?

Logs being sent: no

### Screenshot
Shows chat text-entry box, with user-completion initiated.
Text: `@dk`
Completion: `@dkess` then `@dk`

![Screen Shot 2020-10-29 at 9 42 46 AM-redact-2](https://user-images.githubusercontent.com/601708/97609268-9d6d2580-19d0-11eb-8515-059e65b4a560.png)

### Version information

- **Platform**: desktop

For the desktop app:
- **OS**: macOS
- **URL**: private, 1.7.10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.