Page MenuHomePhabricator

Basic Conpherence Search in Thread
ClosedPublic

Authored by chad on Oct 12 2016, 7:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
Unknown Object (File)
Mon, Dec 9, 10:42 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
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.

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.