Skip to content

Show user mention suggestion box#12965

Open
nanaya wants to merge 3 commits into
ppy:masterfrom
nanaya:suggestion-user
Open

Show user mention suggestion box#12965
nanaya wants to merge 3 commits into
ppy:masterfrom
nanaya:suggestion-user

Conversation

@nanaya
Copy link
Copy Markdown
Collaborator

@nanaya nanaya commented May 14, 2026

I don't think this can be split further 🫥

One of the class names should be ...Controller instead of ...State but it's rather long already.

The result itself probably needs improvement from #12633. Mainly boosting the active users part.

Copy link
Copy Markdown
Collaborator

@notbakaneko notbakaneko left a comment

Choose a reason for hiding this comment

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

(still checking)

Flashing the old results doesn't seem right:
https://github.com/user-attachments/assets/baf9c104-c974-48a8-bcf6-8c8f3f239d52

...where's the embed

@observable visible = false;

@observable private readonly cache: Partial<Record<string, UserSearchEntry[]>> = {};
private readonly debouncedFetchSuggestions = debounce(() => this.fetchSuggestions());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this ends up sending a query every key press?

}

@observer
export default class MentionCompletionBox extends React.Component<Props> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

need makeObservable(this) for @action to work

nanaya added 3 commits May 26, 2026 17:23
- confusing when coming back from autocompleted name (@ -> autocomplete
  -> move cursor back)
- even worse when going back from there (different type of flashing)
- there's also leftover of the search spinner
@nanaya nanaya force-pushed the suggestion-user branch from 244b958 to 4f5b189 Compare May 26, 2026 09:37
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