HomePhabricator
Diffusion Comm 28423a51b376

[web] Hide typeahead if multiple characters are selected

Description

[web] Hide typeahead if multiple characters are selected

Summary:
As discussed here: https://linear.app/comm/issue/ENG-2891/refactor-some-of-the-native-typeahead-creation-logic-and-make-web
and here: https://linear.app/comm/issue/ENG-2888/typeahead-decide-what-to-do-with-multi-character-selection-near-symbol
we needed a little refactor in web typeahead.
This diff resolves both.
It is possible to rewrite condtional event tighter, but we would need to wrap them in signle useMemo
which might hurt our performance. This way feel clear enough and we use utility function prepared earlier.

Test Plan:
Tested if web typeahead works propery:

Reviewers: inka, michal, kamil

Reviewed By: inka

Subscribers: ashoat, tomek, atul, kamil, michal, inka

Differential Revision: https://phab.comm.dev/D6557

Details

Provenance
przemekAuthored on Feb 8 2023, 4:24 AM
Reviewer
inka
Differential Revision
D6557: [web] Hide typeahead if multiple characters are selected
Parents
rCOMM3c887a1e0619: Revert "Temporary changes for staff release"
Branches
Unknown
Tags
Unknown