Page MenuHomePhabricator

Basic structure for MenuItem on Home
ClosedPublic

Authored by chad on Jan 11 2017, 7:08 PM.
Tags
None
Referenced Files
F18745798: D17180.id41320.diff
Fri, Oct 3, 9:27 AM
F18651852: D17180.diff
Sep 21 2025, 5:44 AM
F18651680: D17180.id.diff
Sep 21 2025, 5:02 AM
F18617022: D17180.diff
Sep 14 2025, 7:53 PM
F18508403: D17180.id.diff
Sep 5 2025, 2:47 AM
F18500452: D17180.diff
Sep 4 2025, 9:04 PM
F18459789: D17180.id.diff
Sep 1 2025, 5:58 PM
F18445045: D17180.diff
Aug 31 2025, 8:08 PM
Subscribers

Details

Summary

Ref T11957, builds out /home/menu/ as a basic structure for adding/editing the homepage menu.

Test Plan

visit /home/menu/ and add items to global and personal. Not wired to anything.

Diff Detail

Repository
rP Phabricator
Branch
home-favorites (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15206
Build 19985: Run Core Tests
Build 19984: arc lint + arc unit

Event Timeline

epriestley added inline comments.
src/applications/home/constants/PhabricatorHomeConstants.php
7–17

Instead of hard-coding these, you should add (or reuse) methods on PhabricatorApplication so each application, so the code looks something like this:

foreach ($all_applications as $app) {
  if ($app->shouldThisThingGoOnTheDefaultHomeMenu()) {
    $items[] = new item
  }
}

Then third-party applications will be able to install themselves, etc. I think isPinnedByDefault() is currently the method for this.

You can generate builtin keys like "app.".$app->getPHID() or similar. They just need to be unique; they don't need to be constants.

This revision is now accepted and ready to land.Jan 11 2017, 7:19 PM
  • rough in proper isPinnedByDefaults
This revision was automatically updated to reflect the committed changes.