Mattermost-server: Position the autocomplete popover relative to the @, ~, or / trigger in the post draft

Created on 29 Sep 2020  路  1Comment  路  Source: mattermost/mattermost-server

In addition to the work recently done on the autocomplete UI, we'd like to position the autocomplete popover in relation to the @, or / trigger within the post draft.

Behaviour notes:

  1. If the trigger character in the post draft is positioned on the far left side of the post draft input, position the autocomplete popover with the left edge of the post draft.

image

  1. Position the left edge of the autocomplete popover so that the icon or avatar is aligned with the aligned horizontally with the @, or / trigger

image

  1. If the trigger character is positioned at an x value that is greater than the autocomplete popover's width subtracted from the post draft width, align the autocomplete popover to the right edge of the post draft input

image

Note 1: If there are multiple lines of text, the autocomplete should float above the line the cursor is on.
Note 2: We want the same behaviour for the autocomplete suggestion box in the right-hand side thread draft box and the edit post modal

Related to suggestion box behaviour here: https://mattermost.atlassian.net/browse/MM-29082


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-24072

AreEnd User Feature Hard Help Wanted TecReactJS

Most helpful comment

Hi! I would like to take this one!

>All comments

Hi! I would like to take this one!

Was this page helpful?
0 / 5 - 0 ratings