@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

New UI for fulltext message search

Summary: Basically all here, but still probably needs some polish (links to jump? full dates?). Looks much better, still duplicates messages though sometimes. Needs to debug that more.

Test Plan:
Revisit search UI inside Conpherence, outside Conpherence, and normal room searches in Conpherence.

{F1870748}

{F1870749}

{F1870750}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16708

authored by

Chad Little and committed by
chad
49165bc6 52dd354d

+147 -110
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => '823b1104', 10 + 'conpherence.pkg.css' => 'f934296b', 11 11 'conpherence.pkg.js' => 'cbe4d9be', 12 12 'core.pkg.css' => 'b99bbf5e', 13 13 'core.pkg.js' => '30185d95', ··· 49 49 'rsrc/css/application/conpherence/durable-column.css' => '44bcaa19', 50 50 'rsrc/css/application/conpherence/header-pane.css' => 'e8acbd37', 51 51 'rsrc/css/application/conpherence/menu.css' => '4f51db5a', 52 - 'rsrc/css/application/conpherence/message-pane.css' => '4db388a6', 52 + 'rsrc/css/application/conpherence/message-pane.css' => '7a94bf5e', 53 53 'rsrc/css/application/conpherence/notification.css' => '965db05b', 54 54 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 55 - 'rsrc/css/application/conpherence/transaction.css' => '46253e19', 55 + 'rsrc/css/application/conpherence/transaction.css' => '85129c68', 56 56 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 57 57 'rsrc/css/application/countdown/timer.css' => '16c52f5c', 58 58 'rsrc/css/application/daemon/bulk-job.css' => 'df9c1d4a', ··· 619 619 'conpherence-durable-column-view' => '44bcaa19', 620 620 'conpherence-header-pane-css' => 'e8acbd37', 621 621 'conpherence-menu-css' => '4f51db5a', 622 - 'conpherence-message-pane-css' => '4db388a6', 622 + 'conpherence-message-pane-css' => '7a94bf5e', 623 623 'conpherence-notification-css' => '965db05b', 624 624 'conpherence-participant-pane-css' => '7bba0b56', 625 625 'conpherence-thread-manager' => '01774ab2', 626 - 'conpherence-transaction-css' => '46253e19', 626 + 'conpherence-transaction-css' => '85129c68', 627 627 'd3' => 'a11a5ff2', 628 628 'differential-changeset-view-css' => '9ef7d354', 629 629 'differential-core-view-css' => '5b7b8ff4',
+1 -1
src/applications/conpherence/controller/ConpherenceThreadSearchController.php
··· 36 36 $view = $engine->renderResults($results, $saved); 37 37 38 38 return id(new AphrontAjaxResponse()) 39 - ->setContent($view->getObjectList()); 39 + ->setContent($view->getContent()); 40 40 } 41 41 }
+68 -47
src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
··· 13 13 14 14 public function newQuery() { 15 15 return id(new ConpherenceThreadQuery()) 16 - ->needParticipantCache(true); 16 + ->needParticipantCache(true) 17 + ->needProfileImage(true); 17 18 } 18 19 19 20 protected function buildCustomSearchFields() { ··· 147 148 $context = array(); 148 149 } 149 150 151 + $content = array(); 150 152 $list = new PHUIObjectItemListView(); 151 153 $list->setUser($viewer); 152 154 foreach ($conpherences as $conpherence_phid => $conpherence) { ··· 157 159 $icon_name = $conpherence->getPolicyIconName($policy_objects); 158 160 $icon = id(new PHUIIconView()) 159 161 ->setIcon($icon_name); 160 - $item = id(new PHUIObjectItemView()) 161 - ->setObjectName($conpherence->getMonogram()) 162 - ->setHeader($title) 163 - ->setHref('/'.$conpherence->getMonogram()) 164 - ->setObject($conpherence) 165 - ->addIcon('none', $created) 166 - ->addIcon( 167 - 'none', 168 - pht('Messages: %d', $conpherence->getMessageCount())) 169 - ->addAttribute( 170 - array( 171 - $icon, 172 - ' ', 173 - pht( 174 - 'Last updated %s', 175 - phabricator_datetime($conpherence->getDateModified(), $viewer)), 176 - )); 177 162 178 - $messages = idx($context, $conpherence_phid); 179 - if ($messages) { 180 - foreach ($messages as $group) { 181 - $rows = array(); 182 - foreach ($group as $message) { 183 - $xaction = $message['xaction']; 184 - if (!$xaction) { 185 - continue; 186 - } 163 + if (!strlen($fulltext)) { 164 + $item = id(new PHUIObjectItemView()) 165 + ->setObjectName($conpherence->getMonogram()) 166 + ->setHeader($title) 167 + ->setHref('/'.$conpherence->getMonogram()) 168 + ->setObject($conpherence) 169 + ->setImageURI($conpherence->getProfileImageURI()) 170 + ->addIcon('none', $created) 171 + ->addIcon( 172 + 'none', 173 + pht('Messages: %d', $conpherence->getMessageCount())) 174 + ->addAttribute( 175 + array( 176 + $icon, 177 + ' ', 178 + pht( 179 + 'Last updated %s', 180 + phabricator_datetime($conpherence->getDateModified(), $viewer)), 181 + )); 182 + $list->addItem($item); 183 + } else { 184 + $messages = idx($context, $conpherence_phid); 185 + $box = array(); 186 + $list = null; 187 + if ($messages) { 188 + foreach ($messages as $group) { 189 + $rows = array(); 190 + foreach ($group as $message) { 191 + $xaction = $message['xaction']; 192 + if (!$xaction) { 193 + continue; 194 + } 187 195 188 - $view = id(new ConpherenceTransactionView()) 189 - ->setUser($viewer) 190 - ->setHandles($handles) 191 - ->setMarkupEngine($engines[$conpherence_phid]) 192 - ->setConpherenceThread($conpherence) 193 - ->setConpherenceTransaction($xaction) 194 - ->setFullDisplay(false) 195 - ->addClass('conpherence-fulltext-result'); 196 + $view = id(new ConpherenceTransactionView()) 197 + ->setUser($viewer) 198 + ->setHandles($handles) 199 + ->setMarkupEngine($engines[$conpherence_phid]) 200 + ->setConpherenceThread($conpherence) 201 + ->setConpherenceTransaction($xaction) 202 + ->setFullDisplay(true) 203 + ->addClass('conpherence-fulltext-result'); 196 204 197 - if ($message['match']) { 198 - $view->addClass('conpherence-fulltext-match'); 205 + if ($message['match']) { 206 + $view->addClass('conpherence-fulltext-match'); 207 + } 208 + 209 + $rows[] = $view; 199 210 } 200 - 201 - $rows[] = $view; 211 + $box[] = id(new PHUIBoxView()) 212 + ->appendChild($rows) 213 + ->addClass('conpherence-fulltext-results'); 202 214 } 203 - 204 - $box = id(new PHUIBoxView()) 205 - ->appendChild($rows) 206 - ->addClass('conpherence-fulltext-results'); 207 - $item->appendChild($box); 208 215 } 216 + $header = id(new PHUIHeaderView()) 217 + ->setHeader($title) 218 + ->setHeaderIcon($icon_name) 219 + ->setHref('/'.$monogram); 220 + 221 + $content[] = id(new PHUIObjectBoxView()) 222 + ->setHeader($header) 223 + ->appendChild($box); 209 224 } 225 + } 210 226 211 - $list->addItem($item); 227 + if ($list) { 228 + $content = $list; 229 + } else { 230 + $content = id(new PHUIBoxView()) 231 + ->addClass('conpherence-search-room-results') 232 + ->appendChild($content); 212 233 } 213 234 214 235 $result = new PhabricatorApplicationSearchResultView(); 215 - $result->setObjectList($list); 216 - $result->setNoDataString(pht('No threads found.')); 236 + $result->setContent($content); 237 + $result->setNoDataString(pht('No results found.')); 217 238 218 239 return $result; 219 240 }
+7 -10
src/applications/conpherence/view/ConpherenceTransactionView.php
··· 247 247 break; 248 248 } 249 249 250 - $this->appendChild( 251 - phutil_tag( 252 - 'div', 253 - array( 254 - 'class' => $content_class, 255 - ), 256 - $content)); 250 + $view = phutil_tag( 251 + 'div', 252 + array( 253 + 'class' => $content_class, 254 + ), 255 + $content); 257 256 258 - return phutil_tag_div( 259 - 'conpherence-transaction-content', 260 - $this->renderChildren()); 257 + return phutil_tag_div('conpherence-transaction-content', $view); 261 258 } 262 259 263 260 }
+42 -44
webroot/rsrc/css/application/conpherence/message-pane.css
··· 198 198 width: 100%; 199 199 } 200 200 201 - .conpherence-message-pane .conpherence-transaction-view { 201 + .conpherence-transaction-view { 202 202 padding: 2px 0px; 203 203 margin: 4px 20px; 204 204 background-size: 100%; 205 205 min-height: auto; 206 206 } 207 207 208 - .device-phone .conpherence-message-pane .conpherence-transaction-view { 208 + .device-phone .conpherence-transaction-view { 209 209 margin: 0 8px; 210 210 } 211 211 212 - .conpherence-message-pane .conpherence-transaction-image { 212 + .conpherence-transaction-image { 213 213 float: left; 214 214 border-radius: 3px; 215 215 height: 35px; ··· 219 219 top: 5px; 220 220 } 221 221 222 - .device-phone .conpherence-message-pane .conpherence-transaction-image { 222 + .device-phone .conpherence-transaction-image { 223 223 height: 25px; 224 224 width: 25px; 225 225 background-size: 25px; 226 226 } 227 227 228 - .conpherence-message-pane .conpherence-comment.anchor-target, 229 - .conpherence-message-pane .conpherence-edited.anchor-target { 228 + .conpherence-transaction-view.conpherence-comment.anchor-target, 229 + .conpherence-transaction-view.conpherence-edited.anchor-target { 230 230 background: {$lightyellow}; 231 231 } 232 232 233 - .conpherence-message-pane .conpherence-comment.anchor-target { 233 + .cconpherence-transaction-view.conpherence-comment.anchor-target { 234 234 margin: 4px 8px 4px 8px; 235 235 padding: 2px 4px 2px 4px; 236 236 } 237 237 238 - .conpherence-message-pane .conpherence-edited.anchor-target { 238 + .conpherence-transaction-view.conpherence-edited.anchor-target { 239 239 margin: 0px 8px 0px 8px; 240 240 padding: 0px 4px 0px 4px; 241 241 } 242 242 243 - .conpherence-message-pane .conpherence-transaction-detail { 243 + .conpherence-transaction-view .conpherence-transaction-detail { 244 244 border-width: 0; 245 245 margin-left: 45px; 246 246 } 247 247 248 - .device-phone .conpherence-message-pane .conpherence-transaction-detail { 248 + .device-phone .conpherence-transaction-view .conpherence-transaction-detail { 249 249 margin-left: 32px; 250 250 } 251 251 252 - .conpherence-message-pane .conpherence-transaction-view.date-marker { 252 + .conpherence-transaction-view.date-marker { 253 253 padding: 0; 254 254 margin: 20px 20px 4px; 255 255 min-height: auto; 256 256 } 257 257 258 - .device-phone .conpherence-message-pane 259 - .conpherence-transaction-view.date-marker { 258 + .device-phone .conpherence-transaction-view.date-marker { 260 259 margin: 12px 0 4px; 261 260 } 262 261 263 - .device-tablet .conpherence-message-pane 264 - .conpherence-transaction-view.date-marker { 265 - padding-left: 37px; 262 + .device-tablet .conpherence-transaction-view.date-marker { 263 + padding-left: 37px; 266 264 } 267 265 268 - .conpherence-message-pane .conpherence-transaction-view.date-marker 269 - .date { 270 - left: 40px; 271 - font-size: {$normalfontsize}; 272 - padding: 0px 4px; 266 + .conpherence-transaction-view.date-marker .date { 267 + left: 40px; 268 + font-size: {$normalfontsize}; 269 + padding: 0px 4px; 273 270 } 274 271 275 - .device .conpherence-message-pane .conpherence-transaction-view.date-marker 276 - .date { 277 - left: 4px; 272 + .device .conpherence-transaction-view.date-marker .date { 273 + left: 4px; 278 274 } 279 275 280 - .device-phone .conpherence-message-pane .conpherence-edited { 276 + .device-phone .conpherence-transaction-view.conpherence-edited { 281 277 min-height: none; 282 278 color: {$lightgreytext}; 283 279 margin: 0 8px; 284 280 } 285 281 286 - .conpherence-message-pane .conpherence-edited .conpherence-transaction-content { 287 - color: {$lightgreytext}; 288 - font-size: {$biggerfontsize}; 289 - font-style: italic; 290 - margin: 0; 291 - padding: 0; 292 - float: left; 293 - line-height: 20px; 282 + .conpherence-transaction-view.conpherence-edited 283 + .conpherence-transaction-content { 284 + color: {$lightgreytext}; 285 + font-size: {$biggerfontsize}; 286 + font-style: italic; 287 + margin: 0; 288 + padding: 0; 289 + float: left; 290 + line-height: 20px; 294 291 } 295 292 296 - .conpherence-message-pane .conpherence-edited { 293 + .conpherence-transaction-view.conpherence-edited { 297 294 padding: 0; 298 295 margin-top: 0; 299 296 margin-bottom: 0; 300 297 min-height: inherit; 301 298 } 302 299 303 - .conpherence-message-pane .conpherence-edited + .conpherence-comment { 300 + .conpherence-transaction-view.conpherence-edited + .conpherence-comment { 304 301 margin-top: 16px; 305 302 } 306 303 ··· 309 306 margin-top: 24px; 310 307 } 311 308 312 - .conpherence-message-pane .conpherence-edited .conpherence-transaction-header { 313 - float: right; 309 + .conpherence-transaction-view.conpherence-edited 310 + .conpherence-transaction-header { 311 + float: right; 314 312 } 315 313 316 - .conpherence-message-pane .conpherence-edited 314 + .conpherence-transaction-view.conpherence-edited 317 315 .conpherence-transaction-content a { 318 316 color: {$darkbluetext}; 319 317 } 320 318 321 - .conpherence-message-pane .conpherence-transaction-info { 319 + .conpherence-transaction-view .conpherence-transaction-info { 322 320 margin: 0 8px; 323 321 } 324 322 325 - .conpherence-message-pane .conpherence-transaction-info, 326 - .conpherence-message-pane .anchor-link, 327 - .conpherence-message-pane .phabricator-content-source-view { 323 + .conpherence-transaction-view .conpherence-transaction-info, 324 + .conpherence-transaction-view .anchor-link, 325 + .conpherence-transaction-view .phabricator-content-source-view { 328 326 color: {$lightgreytext}; 329 327 line-height: 16px; 330 328 font-size: {$smallerfontsize}; 331 329 } 332 330 333 - .conpherence-message-pane .conpherence-transaction-content { 331 + .conpherence-transaction-view .conpherence-transaction-content { 334 332 padding: 2px 0 8px 0; 335 333 } 336 334 ··· 453 451 right: 0; 454 452 } 455 453 456 - input.conpherence-search-input { 454 + .conpherence-search-form-view input.conpherence-search-input { 457 455 padding-left: 8px; 458 456 width: calc(100% - 24px); 459 457 border-radius: 20px;
+24 -3
webroot/rsrc/css/application/conpherence/transaction.css
··· 28 28 font-weight: bold; 29 29 } 30 30 31 + /***** Thread Search **********************************************************/ 32 + 31 33 .conpherence-fulltext-results { 32 - margin: 0 8px 8px; 33 - background: {$lightgreybackground}; 34 - border: 1px solid {$lightgreyborder}; 34 + padding: 8px 0; 35 + } 36 + 37 + .conpherence-fulltext-results + .conpherence-fulltext-results { 38 + border-top: 2px solid {$thinblueborder}; 39 + margin-top: -8px; 35 40 } 36 41 37 42 .conpherence-fulltext-result { ··· 46 51 .conpherence-fulltext-results .epoch-link { 47 52 float: right; 48 53 } 54 + 55 + .conpherence-message-pane .conpherence-fulltext-results 56 + .conpherence-transaction-view.conpherence-fulltext-result { 57 + margin-left: 0; 58 + margin-right: 0; 59 + } 60 + 61 + .conpherence-message-pane .conpherence-search-room-results .phui-object-box { 62 + border: none; 63 + margin: 0; 64 + } 65 + 66 + .conpherence-message-pane .conpherence-search-room-results 67 + .phui-object-box .phui-header-shell { 68 + display: none; 69 + }