Ref T11132. This is a new default default (no dashboard) homepage. It offers (Diffs) (Tasks) (Repositories) in the main column and (Feed) in the side column. No NUX stuff, No logged out public view (upcoming diff). This should be complete, but unclear how to bucketize Differential.
Details
- Reviewers
epriestley - Maniphest Tasks
- T11132: New Phabricator NUX
- Commits
- rPd5327fdba076: New 'default' homepage
Test new account's default homepage.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Oh, hmm, the bucketing thing is probably a bit messy. Maybe try this?
- Sort of follow what PhabricatorDashboardQueryPanelType does to actually run the query through the entire SearchEngine, not just the RevisionQuery.
- You can probably do $saved = $engine->buildSavedQueryFromBuiltin('active'); to get the right $saved object (corresponding to Differential's default query).
I don't know how much of a pain that will be. If that takes more than like 10 minutes and you haven't fixed it, I can go figure out how to force it to work.
If the viewer is not logged in, I think bucketing fails (at best, it doesn't make sense). We might want to do this for logged-out users?
- Run 'all' instead of 'active' for Differential?
- Query open instead of open + assigned for Maniphest?
Specifically, this thing:
public function renderPanelContent( PhabricatorUser $viewer, PhabricatorDashboardPanel $panel, PhabricatorDashboardPanelRenderingEngine $engine) { $engine = $this->getSearchEngine($panel); $engine->setViewer($viewer); $engine->setContext(PhabricatorApplicationSearchEngine::CONTEXT_PANEL); $key = $panel->getProperty('key'); if ($engine->isBuiltinQuery($key)) { $saved = $engine->buildSavedQueryFromBuiltin($key); } else { $saved = id(new PhabricatorSavedQueryQuery()) ->setViewer($viewer) ->withEngineClassNames(array(get_class($engine))) ->withQueryKeys(array($key)) ->executeOne(); } if (!$saved) { throw new Exception( pht( 'Query "%s" is unknown to application search engine "%s"!', $key, get_class($engine))); } $query = $engine->buildQueryFromSavedQuery($saved); $pager = $engine->newPagerForSavedQuery($saved); if ($panel->getProperty('limit')) { $limit = (int)$panel->getProperty('limit'); if ($pager->getPageSize() !== 0xFFFF) { $pager->setPageSize($limit); } } $results = $engine->executeQuery($query, $pager); return $engine->renderResults($results, $saved); }
I think you can do like:
$engine = new DifferentialRevisionSearchEngine(); $saved = $engine->buildSavedQueryFromBuiltin('active'); $query = $engine->buildQueryFromSavedQuery($saved); $pager = $engine->newPagerForSavedQuery($saved); $pager->setPageSize(10); $results = $engine->executeQuery($query, $pager); $view = $engine->renderResults($results, $saved);
Not sure if that actually works or not, but maybe it's not too far off.
We should also completely remove these config options:
- maniphest.priorities.unbreak-now
- maniphest.priorities.needs-triage
- welcome.html
...and add them to PhabricatorExtraConfigSetupCheck. We can do that in a followup or I can shoot you a diff for it, though. I'll write up a couple sentences about how to keep welcome.html limping along in a task somewhere for the changelog just in case it's still in use.