Homec4science

Make mobile navigation work properly by default in more cases

Authored by epriestley <git@epriestley.com> on Nov 2 2015, 21:06.

Description

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

Details

Committed
epriestley <git@epriestley.com>Nov 3 2015, 19:11
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2ca269cb3113: Replace Roboto Slab with Aleo for PHUIDocumentView
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH300c74c49dc9: Make mobile navigation work properly by default in more cases (authored by epriestley <git@epriestley.com>).Nov 3 2015, 19:11