1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 16:00:59 +01:00
phorge-phorge/src/applications/paste
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 Provide a stable URI for getting raw paste content 2015-09-25 10:45:01 -07:00
capability Paste: Add edit policy 2014-12-31 08:24:57 -08:00
conduit phtize all the things 2015-05-22 21:16:39 +10:00
config Fully remove all the public-create-mail settings 2015-05-20 14:21:33 -07:00
controller Make mobile navigation work properly by default in more cases 2015-11-03 10:11:24 -08:00
editor Allow setting of Archive/Active on Paste 2015-08-05 13:44:55 -07:00
lipsum Fix bin/lipsum 2015-07-07 05:33:03 -07:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Truncate long source lines in Paste search result list snippets 2015-10-20 19:07:04 +00:00
remarkup Add some missing type hints 2015-05-05 07:33:00 +10:00
snippet Truncate long source lines in Paste search result list snippets 2015-10-20 19:07:04 +00:00
storage Truncate long source lines in Paste search result list snippets 2015-10-20 19:07:04 +00:00
view Return $this from setter methods 2015-07-06 22:53:43 +10:00