-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
search: Add search suggestion for "unresolved topics". #31758
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Previously, the search suggestion only featured "resolved topics" and filtering for "unresolved topics" was not as intuitive. Users would have to use the negate operator "-" to filter for unresolved topics and it is not possible to edit pills. This change adds "unresolved topics" to the search with support to cancel negations. Fixes: #31725.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,6 +371,7 @@ test("empty_query_suggestions", () => { | |
"is:alerted", | ||
"is:unread", | ||
"is:resolved", | ||
"-is:resolved", | ||
"sender:myself@zulip.com", | ||
`channel:${devel_id}`, | ||
`channel:${office_id}`, | ||
|
@@ -504,6 +505,7 @@ test("check_is_suggestions", ({override, mock_template}) => { | |
"-is:alerted", | ||
"-is:unread", | ||
"-is:resolved", | ||
"is:resolved", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this being included in a query that starts with a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was an agreement to include it in CZO. Due to the confusion, I'm wondering if we should change course and just remove that from being suggested for |
||
]; | ||
assert.deepEqual(suggestions.strings, expected); | ||
|
||
|
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.
Can you explain a bit more why you're keeping two copies of the search string here, and why you're slicing them on different indices? Maybe you can share an example of what would happen here.
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.
In the case of
-
with the suggestion of-is:resolved
, we would get a suggestion string of--is:resolved
.One copy of the string is to used to store the string that the typeahead should return.
is:resolved
The other copy of the string is used for pattern matching
-is:resolved