1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-12 15:51:04 +01:00
phorge-phorge/src
epriestley 950e9d085b In ProfileMenu, put more structure between "stored/configured items" and "display items"
Summary:
Depends on D20356. Ref T13275. See also T12871 and T12949.

Currently, the whole "ProfileMenu" API operates around //stored// items. However, stored items are allowed to produce zero or more //display// items, and we sometimes want to highlight display item X but render stored item Y (as is the case with "Link" items pointing at `?filter=xyz` on Workboards).

For the most part, this either: doesn't work; or works by chance; or is kind of glued together with hope and prayer (as in D20353).

Put an actual structural layer in place between "stored/configured item" and "display item" that can link them together more clearly. Now:

  - The list of `ItemConfiguration` objects (stored/configured items) is used to build an `ItemViewList`.
  - This handles the selection/highlighting/default state, and knows which display items are related to which stored items.
  - When we're all done figuring out what we're going to select and what we're going to highlight, it pops out an actual View which can build the HTML.

This requires API changes which are not included in this change, see next change.

This doesn't really do anything on its own, but builds toward a more satisfying fix for T12871. I'd hoped to avoid doing this for now, but wasn't able to get a patch I felt good about for T12871 built without fixing this first.

Test Plan: See next change.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13275

Differential Revision: https://secure.phabricator.com/D20357
2019-04-02 15:19:59 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Refine the "Mangled Webserver Response" setup check 2019-03-05 12:58:32 -08:00
applications In ProfileMenu, put more structure between "stored/configured items" and "display items" 2019-04-02 15:19:59 -07:00
docs Allow "SMTP" and "Sendmail" mailers to have "Message-ID" behavior configured in "cluster.mailers" 2019-03-16 12:35:55 -07:00
extensions Add src/extensions/ to Phabricator 2013-08-14 15:38:06 -07:00
infrastructure Correct some straggling Ferret/Cursor interactions 2019-04-01 14:53:33 -07:00
view Automatically build mobile menus from navigation, and clean up external ProfileMenu API 2019-04-02 15:17:44 -07:00
__phutil_library_init__.php
__phutil_library_map__.php In ProfileMenu, put more structure between "stored/configured items" and "display items" 2019-04-02 15:19:59 -07:00