Skip to content

Conversation

@sm-sayedi
Copy link
Collaborator

Fixes: #124

TODO: tests

Screenshots
Empty query (light) Empty query (dark)
1  Empty query (Light) 1  Empty query (Dark)
New topic Long names Shortcut syntax
2  New topic 3  Long channel:topic names 4  Shortcut syntax
Screen recording
Topic.link.autocomplete.mov

This was missed when we first added the channel link autocomplete feature.
As of this commit, it's not yet possible in the app to initiate a
topic link autocomplete interaction. So in the widgets code that would
consume the results of such an interaction, we just throw for now,
leaving that to be implemented in a later commit.
This will be used in the next commits for generating topic link syntax
in the compose box when a topic is chosen from the topic autocomplete.

Also, modify `channelLink` function to generate incomplete syntax in
addition to the previous completed syntax. In the next commits, the new
incomplete syntax will be inserted in the compose box when a channel is
chosen from the channel autocomplete. This way, the topic autocomplete
interaction will be readily available. The old completed syntax will
be inserted to the compose box when the channel is chosen from the
topic autocomplete.
In the next commit(s), we'll need the narrow field in autocomplete intent.
We already cancel out an autocomplete intent whenever the selection is
expanding to the left of the intent character (e.g @ or #).
To simplify this, we can start the search for the intent character from
the selection start, going leftwards.

This is basically NFC, but in the new approach if there's an
autocomplete intent inside the selection that will be cancelled,
it still keeps looking for another autocomplete intent to the left,
while previously it would cancel the looking process too.

I think simplifying this part of the code is worth the additional
looking which is basically harmless.
For this commit we temporarily intercept the query at the
AutocompleteField widget, to avoid invoking the widgets that are
still unimplemented. That lets us defer those widgets' logic to a
separate later commit.
From the web repo; edited in Inkscape to remove the padding around it.
   https://github.com/zulip/zulip/blob/052655eee/web/icons/corner-down-right.svg
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.

stream/topic autocomplete (e.g. #**mobile**)

1 participant