Page MenuHomePhabricator

Basic Conpherence Search in Thread
ClosedPublic

Authored by chad on Oct 12 2016, 7:55 PM.
Tags
None
Referenced Files
F14003324: D16697.id40216.diff
Sat, Oct 26, 4:50 AM
F14000315: D16697.id40216.diff
Thu, Oct 24, 9:07 PM
F13990625: D16697.id.diff
Tue, Oct 22, 5:07 AM
F13988010: D16697.id40212.diff
Mon, Oct 21, 12:36 PM
F13985683: D16697.id40213.diff
Sun, Oct 20, 10:19 PM
F13984976: D16697.id40201.diff
Sun, Oct 20, 5:18 PM
F13982035: D16697.id40194.diff
Sat, Oct 19, 8:53 PM
F13980161: D16697.id40214.diff
Oct 19 2024, 8:50 AM
Subscribers

Details

Summary

Adds a search bar toggle and results for searching inside a Conpherence Room. The UI of the results itself are not styled yet, and will follow up with another diff.

Test Plan

Go to Conpherence, search for "asdf", get lots of results. Search for nothing, get no change, search for something fictitious, get no threads found (will follow up with search result UI).

Diff Detail

Repository
rP Phabricator
Branch
search-conpherence (branched from master)
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/applications/conpherence/controller/ConpherenceThreadSearchController.php:32XHP5Use of Undeclared Variable
Warningwebroot/rsrc/js/application/conpherence/behavior-conpherence-search.js:1JAVELIN5`javelinsymbols` Not In Path
Unit
Tests Passed
Build Status
Buildable 14087
Build 18277: Run Core Tests
Build 18276: arc lint + arc unit

Event Timeline

chad retitled this revision from to [WIP] Conpherence Search in Thread.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.
src/applications/conpherence/controller/ConpherenceThreadSearchController.php
24–32

I'm sort of stuck here, I want to use the search engine renderer, but I'm not sure what magic order to call the methods in, also I think Conpherence hasn't been modernized here.

This kinda works, maybe enough to get you unstuck?

$engine = new ConpherenceThreadSearchEngine();
$engine->setViewer($viewer);
$saved = $engine->buildSavedQueryFromBuiltin('all')
  ->setParameter('ids', array($conpherence_id))
  ->setParameter('fulltext', $fulltext);

$pager = $engine->newPagerForSavedQuery($saved);
$pager->setPageSize(15);

$query = $engine->buildQueryFromSavedQuery($saved);

$results = $engine->executeQuery($query, $pager);
$view = $engine->renderResults($results, $saved);

// Just to make it clear that it's doing something...
return $this->newPage()->appendChild($view->getObjectList());

Result:

Screen Shot 2016-10-12 at 3.59.53 PM.png (1×1 px, 180 KB)

chad edited edge metadata.
  • updates again?
webroot/rsrc/js/application/conpherence/behavior-conpherence-search.js
27–31

idk, something not working here, will poke at it some more though.

  • make some animations
  • make it work
  • really ugly
  • probably some bugs
  • clean up thread switching bugs
chad edited the test plan for this revision. (Show Details)
chad retitled this revision from [WIP] Conpherence Search in Thread to Basic Conpherence Search in Thread.
  • remove conpherence-update-css
  • remove additional calls to conpherence-update-css
epriestley edited edge metadata.

Seems to do something useful

This revision is now accepted and ready to land.Oct 13 2016, 7:22 PM
This revision was automatically updated to reflect the committed changes.