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
- Branch
- search-conpherence (branched from master)
- Lint
Lint Warnings Severity Location Code Message Warning webroot/rsrc/js/application/conpherence/behavior-conpherence-search.js:1 JAVELIN5 `javelinsymbols` Not In Path - Unit
Tests Passed - Build Status
Buildable 14095 Build 18291: Run Core Tests Build 18290: arc lint + arc unit
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. |