Page MenuHomePhabricator

D14097.diff
No OneTemporary

D14097.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -99,7 +99,7 @@
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd',
'rsrc/css/application/releeph/releeph-request-typeahead.css' => '667a48ae',
- 'rsrc/css/application/search/search-results.css' => '586db3a4',
+ 'rsrc/css/application/search/search-results.css' => '7dea472c',
'rsrc/css/application/slowvote/slowvote.css' => '475b4bd2',
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
'rsrc/css/application/uiexample/example.css' => '528b19de',
@@ -734,7 +734,7 @@
'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => '6920d200',
'phabricator-remarkup-css' => '1c4ac273',
- 'phabricator-search-results-css' => '586db3a4',
+ 'phabricator-search-results-css' => '7dea472c',
'phabricator-shaped-request' => '7cbe244b',
'phabricator-side-menu-view-css' => 'bec2458e',
'phabricator-slowvote-css' => '475b4bd2',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2840,7 +2840,6 @@
'PhabricatorSearchResultView' => 'applications/search/view/PhabricatorSearchResultView.php',
'PhabricatorSearchSelectController' => 'applications/search/controller/PhabricatorSearchSelectController.php',
'PhabricatorSearchSelectField' => 'applications/search/field/PhabricatorSearchSelectField.php',
- 'PhabricatorSearchSnippetInterface' => 'applications/search/interface/PhabricatorSearchSnippetInterface.php',
'PhabricatorSearchStringListField' => 'applications/search/field/PhabricatorSearchStringListField.php',
'PhabricatorSearchSubscribersField' => 'applications/search/field/PhabricatorSearchSubscribersField.php',
'PhabricatorSearchTextField' => 'applications/search/field/PhabricatorSearchTextField.php',
@@ -4133,7 +4132,6 @@
'PhabricatorMentionableInterface',
'PhabricatorDestructibleInterface',
'PhabricatorProjectInterface',
- 'PhabricatorSearchSnippetInterface',
),
'DifferentialRevisionAffectedFilesHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionAuthorHeraldField' => 'DifferentialRevisionHeraldField',
@@ -5027,7 +5025,6 @@
'PhabricatorApplicationTransactionInterface',
'PhabricatorProjectInterface',
'PhabricatorSpacesInterface',
- 'PhabricatorSearchSnippetInterface',
),
'ManiphestTaskAssignHeraldAction' => 'HeraldAction',
'ManiphestTaskAssignOtherHeraldAction' => 'ManiphestTaskAssignHeraldAction',
@@ -7626,7 +7623,6 @@
'PhabricatorTokenReceiverInterface',
'PhabricatorDestructibleInterface',
'PhabricatorApplicationTransactionInterface',
- 'PhabricatorSearchSnippetInterface',
),
'PhrictionDocumentAuthorHeraldField' => 'PhrictionDocumentHeraldField',
'PhrictionDocumentContentHeraldField' => 'PhrictionDocumentHeraldField',
diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php
--- a/src/applications/differential/storage/DifferentialRevision.php
+++ b/src/applications/differential/storage/DifferentialRevision.php
@@ -13,8 +13,7 @@
PhabricatorApplicationTransactionInterface,
PhabricatorMentionableInterface,
PhabricatorDestructibleInterface,
- PhabricatorProjectInterface,
- PhabricatorSearchSnippetInterface {
+ PhabricatorProjectInterface {
protected $title = '';
protected $originalTitle;
@@ -630,18 +629,4 @@
$this->saveTransaction();
}
-
-/* -( PhabricatorSearchSnippetInterface )---------------------------------- */
-
-
- public function renderSearchResultSnippet(PhabricatorUser $viewer) {
- $content = $this->getSummary();
- $content = PhabricatorMarkupEngine::summarize($content);
- $content = PhabricatorMarkupEngine::renderOneObject(
- id(new PhabricatorMarkupOneOff())->setContent($content),
- 'default',
- $viewer);
- return $content;
- }
-
}
diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php
--- a/src/applications/maniphest/storage/ManiphestTask.php
+++ b/src/applications/maniphest/storage/ManiphestTask.php
@@ -13,8 +13,7 @@
PhabricatorDestructibleInterface,
PhabricatorApplicationTransactionInterface,
PhabricatorProjectInterface,
- PhabricatorSpacesInterface,
- PhabricatorSearchSnippetInterface {
+ PhabricatorSpacesInterface {
const MARKUP_FIELD_DESCRIPTION = 'markup:desc';
@@ -391,18 +390,4 @@
return $this->spacePHID;
}
-
-/* -( PhabricatorSearchSnippetInterface )---------------------------------- */
-
-
- public function renderSearchResultSnippet(PhabricatorUser $viewer) {
- $content = $this->getDescription();
- $content = PhabricatorMarkupEngine::summarize($content);
- $content = PhabricatorMarkupEngine::renderOneObject(
- id(new PhabricatorMarkupOneOff())->setContent($content),
- 'default',
- $viewer);
- return $content;
- }
-
}
diff --git a/src/applications/phriction/storage/PhrictionDocument.php b/src/applications/phriction/storage/PhrictionDocument.php
--- a/src/applications/phriction/storage/PhrictionDocument.php
+++ b/src/applications/phriction/storage/PhrictionDocument.php
@@ -7,8 +7,7 @@
PhabricatorFlaggableInterface,
PhabricatorTokenReceiverInterface,
PhabricatorDestructibleInterface,
- PhabricatorApplicationTransactionInterface,
- PhabricatorSearchSnippetInterface {
+ PhabricatorApplicationTransactionInterface {
protected $slug;
protected $depth;
@@ -253,19 +252,4 @@
$this->saveTransaction();
}
-
-/* -( PhabricatorSearchSnippetInterface )---------------------------------- */
-
-
- public function renderSearchResultSnippet(PhabricatorUser $viewer) {
- $content = $this->getContent()->getContent();
- $content = PhabricatorMarkupEngine::summarize($content);
- $content = PhabricatorMarkupEngine::renderOneObject(
- id(new PhabricatorMarkupOneOff())->setContent($content),
- 'default',
- $viewer);
- return $content;
- }
-
-
}
diff --git a/src/applications/search/interface/PhabricatorSearchSnippetInterface.php b/src/applications/search/interface/PhabricatorSearchSnippetInterface.php
deleted file mode 100644
--- a/src/applications/search/interface/PhabricatorSearchSnippetInterface.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-/**
- * Objects can implement this interface to provide text snippets in search
- * result views.
- */
-interface PhabricatorSearchSnippetInterface {
-
- public function renderSearchResultSnippet(PhabricatorUser $viewer);
-
-}
diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
--- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
+++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
@@ -251,7 +251,6 @@
foreach ($results as $phid => $handle) {
$view = id(new PhabricatorSearchResultView())
- ->setUser($viewer)
->setHandle($handle)
->setQuery($query)
->setObject(idx($objects, $phid))
diff --git a/src/applications/search/view/PhabricatorSearchResultView.php b/src/applications/search/view/PhabricatorSearchResultView.php
--- a/src/applications/search/view/PhabricatorSearchResultView.php
+++ b/src/applications/search/view/PhabricatorSearchResultView.php
@@ -21,13 +21,7 @@
return $this;
}
- public function getObject() {
- return $this->object;
- }
-
public function render() {
- $viewer = $this->getUser();
-
$handle = $this->handle;
if (!$handle->isComplete()) {
return;
@@ -52,18 +46,6 @@
$item->addAttribute(pht('Closed'));
}
- $object = $this->getObject();
- if ($object instanceof PhabricatorSearchSnippetInterface) {
- $snippet = $object->renderSearchResultSnippet($viewer);
- $snippet = phutil_tag(
- 'div',
- array(
- 'class' => 'phui-search-snippet',
- ),
- $snippet);
- $item->appendChild($snippet);
- }
-
return $item;
}
diff --git a/webroot/rsrc/css/application/search/search-results.css b/webroot/rsrc/css/application/search/search-results.css
--- a/webroot/rsrc/css/application/search/search-results.css
+++ b/webroot/rsrc/css/application/search/search-results.css
@@ -16,8 +16,3 @@
font-weight: normal;
color: #000;
}
-
-.phui-search-snippet {
- margin: 0 8px;
- color: {$greytext};
-}

File Metadata

Mime Type
text/plain
Expires
Oct 19 2024, 10:49 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710476
Default Alt Text
D14097.diff (8 KB)

Event Timeline