Add tooltip for "not" search token tag in Global Search results

Summary:
These tags already use colors to differentiate. Use a tooltip for "NOT" query token tags like all the other types also do, because consistency.

Closes T16093

Test Plan:
1. Go to https://we.phorge.it/search/query/advanced/
2. In the `Query` field, enter `bleh =zsd +a NOT(x) "phrase like this" a -phasa ~amp title:fb "use meo" érr`.
3. Click `Search` button.
4. Look at the tags shown for the string `Searched For: ...`.
5. See that only red tags also use a (minus) icon.
6. Don't see a minus icon for the red token tag anymore, now get a tooltip for the red token tag.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16093

Differential Revision: https://we.phorge.it/D26057
This commit is contained in:
Andre Klapper 2025-06-03 11:34:50 +02:00
parent e410020f78
commit a638bafe51

View file

@ -62,6 +62,7 @@ final class PhabricatorFulltextToken extends Phobject {
$operator = $token->getOperator();
switch ($operator) {
case PhutilSearchQueryCompiler::OPERATOR_NOT:
$tip = pht('Excluding Search');
$shade = PHUITagView::COLOR_RED;
$icon = 'fa-minus';
break;