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.
Details
Details
- Reviewers
epriestley - Commits
- rP508a2a149857: Basic Conpherence Search in Thread
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
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/conpherence/controller/ConpherenceThreadSearchController.php | ||
---|---|---|
25–33 | 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. |
Comment Actions
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:
webroot/rsrc/js/application/conpherence/behavior-conpherence-search.js | ||
---|---|---|
27–31 | idk, something not working here, will poke at it some more though. |