1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00
phorge-phorge/src/applications/search
epriestley 300c74c49d Make mobile navigation work properly by default in more cases
Summary:
Fixes T5752. This obsoletes a bunch of old patterns and I'll follow up on those with a big "go do a bunch of mechanical code changes" task. Major goals are:

  - Don't load named queries multiple times on search pages.
  - Don't require extra code to get standard navigation right on mobile.
  - Reduce the amount of boilerplate in ListControllers.
  - Reduce the amount of boilerplate around navigation/menus in all controllers.

Specifically, here's what this does:

  - The StandardPage is now a smarter/more structured object with `setNavigation()` and `setCrumbs()` methods. More rendering decisions are delayed until the last possible moment.
    - It uses this to automatically add crumb actions to the application menu.
    - It uses this to automatically reuse one SearchEngine instead of running queries multiple times.
  - The new preferred way to build responses is `$this->newPage()` (like `$this->newDialog()`), which has structured methods for adding stuff (`setTitle()`, etc).
  - SearchEngine exposes a new convenience method so you don't have to do all the controller delegation stuff.
  - Building menus is generally simpler.

Test Plan:
  - Tested paste list, view, edit, comment, raw controllers for functionality, mobile menu, crumbs, navigation menu.
  - Edited saved queries.
  - Tested Differential, Maniphest (no changes).
  - Verified the paste pages don't run any duplicate NamedQuery queries.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5752

Differential Revision: https://secure.phabricator.com/D14382
2015-11-03 10:11:24 -08:00
..
application Maniphest - prevent uneditable tasks from being able to be closed as duplicates 2015-05-18 13:07:05 -07:00
applicationpanel Modernize search engine selection 2015-05-20 06:59:59 +10:00
config Modernize search engine selection 2015-05-20 06:59:59 +10:00
constants Extend from Phobject 2015-06-15 18:02:27 +10:00
controller Make mobile navigation work properly by default in more cases 2015-11-03 10:11:24 -08:00
engine Make mobile navigation work properly by default in more cases 2015-11-03 10:11:24 -08:00
field Move some PhabricatorSearchField subclasses 2015-07-06 22:52:05 +10:00
index Refine error behavior of bin/search index 2015-09-27 13:11:11 -07:00
management Refine error behavior of bin/search index 2015-09-27 13:11:11 -07:00
query Revert "Allow search results to be snippeted, roughly" 2015-09-10 20:57:26 -07:00
storage Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
typeahead Use typeaheads instead of checkbox lists for task status / priority 2015-04-23 11:49:34 -07:00
view Revert "Allow search results to be snippeted, roughly" 2015-09-10 20:57:26 -07:00
worker Refine error behavior of bin/search index 2015-09-27 13:11:11 -07:00