-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add autocomplete info section in FAQ. #1017
Conversation
@zulipbot add "area: documentation" |
4bfaf27
to
ba30283
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ezio-Sarthak, this looks fairly informative 👍
Leaving a couple of comments inline as suggestions to make this more user oriented, let me know how they sound to you.
docs/FAQ.md
Outdated
|
||
You could refer to the above section to try out each of the below prefixes! | ||
|
||
#### Message write box |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could maybe simply be referred to as "Message compose" or in a verbose manner, "Message compose autocomplete"? Inferring autocomplete that can be used during composing. Since message compose is limited to msg_write_box
, it would sound simpler to understand with our intent being conveyed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I overlapped with that thought too recently. Though since selecting streams and topics may also be considered in "composing a message", I wondered if that's an apt option. Nevertheless, we could explore it with feedback. I'd share this suggestion and one other I had in mind for this in CZO, and would appreciate suggestions from others as well.
docs/FAQ.md
Outdated
|
||
**NOTE:** Currently, the above autocompletes ignore a text containing whitespaces if it is specified as a prefix for autocompletion. (e.g., `#test he` wouldn't lead to `#**test here**`) See also [#925](https://github.com/zulip/zulip-terminal/issues/925). | ||
|
||
#### Other write boxes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "other autocomplete options"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing your below point, I am a bit more inclined to Other autocomplete fields
. What do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems a little confusing, if you want to go in that direction maybe Other autocomplete-enabled fields
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that makes sense. Let's go with "Other autocomplete options" then 👍.
docs/FAQ.md
Outdated
|
||
#### Other write boxes | ||
|
||
All other write boxes in compose box don't require a prefix, i.e., the prefix for them is an empty string (`''`). Autocompletes here are contextual and specific to a particular write box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest explaining how message recipients work here (stream, topic, pm recipients), as in a mention that we have "headers" or "fields" where we enter these (a screenshot might be helpful here like the GIF you have above), so that it serves as context to the table below, keeping the table compact as it currently stands.
"Fields" is a fairly easy term to understand for something that accepts input.
ba30283
to
94d3f70
Compare
docs/FAQ.md
Outdated
|
||
**\*** If a PM recipient's name contains comma(s) (`,`), they would be treated as comma-separated recipients. | ||
|
||
Stream message compose (for **1** and **2**): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're being specific, it might be better if we use specific terms as discussed on the stream, like "specifying/defining stream and topic" and "specifying/defining private message recipients".
The other point I just noticed is, the cursor in your screenshots remains on the message content, could you perhaps put screenshots with the cursor on these header fields? It might help with emphasizing the field we're describing here.
94d3f70
to
f9b6fed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ezio-Sarthak Apparently I started a review earlier, so here's what I wrote then for reference - I think most points are still relevant.
docs/FAQ.md
Outdated
1. Type a prefix designated for an autocomplete (e.g., `:` for autocompleting emojis). | ||
2. Along with the prefix, type the initial letters of the text (e.g., `air` for `airplane`). | ||
3. Now hit the hotkey. You'd see suggestions being listed in the footer (if there are any). | ||
4. Cycle between different suggestions as described in above hotkey section. (Notice that a selected suggestion is colored in **black**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black is theme-specific, or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I would say. We use the default "code"
palette (which is black) for this, uniform throughout all themes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be simpler to indicate the selected value is highlighted?
We could also add a 5th entry to indicate that cycling "past the end" goes back to the prefix you enter.
docs/FAQ.md
Outdated
|
||
|Prefix Type|Prefix text(s)|Autocompleted text format| | ||
| :--- | :---: | :---: | | ||
|Mention a user|`@`, `@**`|`@**User name**`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two are subtly different, but worth confirming in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. @**
is assigned to autocomplete_users
and @
is assigned to autocomplete_mentions
. While some are specified explicitly in the autocomplete_map, I see it's better to include the @
to user groups too 👍. Here's what we have:
autocomplete_map = OrderedDict([
('@_', self.autocomplete_users),
('@_**', self.autocomplete_users),
('@', self.autocomplete_mentions),
('@*', self.autocomplete_groups),
('@**', self.autocomplete_users),
('#', self.autocomplete_streams),
('#**', self.autocomplete_streams),
(':', self.autocomplete_emojis),
])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth treating @
with it's own row, indicating it matches users and groups (eg. @term
on czo).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
docs/FAQ.md
Outdated
|
||
**NOTE:** Currently, the above autocompletes ignore a text containing whitespaces if it is specified as a prefix for autocompletion. (e.g., `#test he` wouldn't lead to `#**test here**`) See also [#925](https://github.com/zulip/zulip-terminal/issues/925). | ||
|
||
#### Other write boxes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If grouped together, this could be "Message recipients" (as per "current message recipients")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean grouping the recipient headers (as done currently)?
docs/FAQ.md
Outdated
|
||
|Box type|Autocompleted text format| | ||
| :--- | :---: | | ||
|Stream|`Stream name`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could include a note that the stream box will indicate if it's a valid stream and of what type?
1b8c7f6
to
e92a999
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ezio-Sarthak This is looking close, just rather large and verbose for an FAQ answer, so if we can trim it and keep it accurate and useful, that would be great 👍 (my ideas for that are in the comments)
docs/FAQ.md
Outdated
In ZT, we use `ctrl f` and `ctrl r` for cycling through autocompletes: | ||
* `ctrl f` allows switching between autocomplete suggestions in a forward manner (see the GIF below). | ||
* `ctrl r` does the same job but in reverse manner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to keep mentioning ZT, and we've duplicated the ctrl-f/r; this might just fit within one sentence, or maybe two bullets if it doesn't look strange. We can emphasize the f=forward and r=reverse by bolding the words.
docs/FAQ.md
Outdated
### Understanding the working | ||
|
||
Below are some basic steps to work with autocompletes in ZT (assuming that the user is composing a message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text before the numbered list says little except composing text in the "content box", so we can probably combine the section title and this text together.
Maybe: (too long?)
"Example: Using autocomplete to add a recognized emoji in your message body"
(the extra text re the gif could then be removed too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
docs/FAQ.md
Outdated
1. Type a prefix designated for an autocomplete (e.g., `:` for autocompleting emojis). | ||
2. Along with the prefix, type the initial letters of the text (e.g., `air` for `airplane`). | ||
3. Now hit the hotkey. You'd see suggestions being listed in the footer (if there are any). | ||
4. Cycle between different suggestions as described in above hotkey section. (Notice that a selected suggestion is colored in **black**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be simpler to indicate the selected value is highlighted?
We could also add a 5th entry to indicate that cycling "past the end" goes back to the prefix you enter.
docs/FAQ.md
Outdated
Now that you have a basic understanding of how autocompletes in ZT work, let's explore what all sorts of autocomplete prefixes ZT support, as of now. Note that the kinds of prefix supported also differ within each compose box. Thus, the prefixes listed below are grouped by type of compose box. | ||
|
||
You could refer to the above section to try out each of the below prefixes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style of text is probably more appropriate in a tutorial.
Probably all we need is text somewhere which indicates that:
- in the message body (I don't think that word came up, but it seems OK?) we use prefixes
- for the recipient boxes (1, 2, 3) the prefixes are assumed
Note that with recipient boxes there is no "prefix" (as above bullets) so perhaps this title could be "Areas with autocomplete support" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I was just framing the two bullets in a similar way. I wanted to query if recipient boxes sound internal? Does "recipient header" make sense?
docs/FAQ.md
Outdated
|
||
|Prefix Type|Prefix text(s)|Autocompleted text format| | ||
| :--- | :---: | :---: | | ||
|Mention a user|`@`, `@**`|`@**User name**`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth treating @
with it's own row, indicating it matches users and groups (eg. @term
on czo).
docs/FAQ.md
Outdated
@@ -108,6 +108,29 @@ You could refer to the above section to try out each of the below prefixes! | |||
|
|||
**NOTE:** Currently, the above autocompletes ignore a text containing whitespaces if it is specified as a prefix for autocompletion. (e.g., `#test he` wouldn't lead to `#**test here**`) See also [#925](https://github.com/zulip/zulip-terminal/issues/925). | |||
|
|||
#### Other autocomplete options | |||
|
|||
All other message composing areas that support autocompletion don't require a prefix, i.e., the prefix for them is an empty string (`''`). Autocompletes here are mostly contextual and specific. See the below snapshots to better distinguish between various compose fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than prefixes being the empty string, we can just not mention prefixes in this case, or that they're taken from the context (you have "contextual" 👍).
docs/FAQ.md
Outdated
|S. No.|Field|Autocompleted text format| | ||
| :---: | :--- | :---: | | ||
|1|Stream|`Stream name`| | ||
|2|Topic|`Topic name`| | ||
|3|PM recipient|`Name <email>`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given you have two images for Streams and PMs, I'd suggest skipping the text above and this table, and having two sections referring to 1, 2 and 3 in the text in each section. The table doesn't really give much extra information here.
The notes can also fit into the sections.
e92a999
to
1c013ed
Compare
1c013ed
to
0fcaddd
Compare
0fcaddd
to
3e7f2be
Compare
This commit adds a FAQ entry: `How do I use autocompletes in ZT?`. * Hotkeys used * Example guide to using autocomplete to pick a matching emoji * Support in the message body * Support in the message recipients (stream/topic/PM recipients) (minor changes for consistency/structure by neiljp)
3e7f2be
to
c77968e
Compare
@Ezio-Sarthak Thanks for this - I'm sure users will benefit from this 👍 Merging this now after your agreement on the minor adjustments I made via the branch I referred to in the stream 🎉 |
This PR adds a section
How do I use autocompletes in ZT?
, which lists and explains the working of currently supported autocompletes in ZT, grouped by different compose boxesNOTE: Currently I'm not sure if the first bullet title is user-friendly, and so would appreciate feedback/suggestions for the same :)