From 9afc5c628757317814a1afdaa389eb2c4cb920df Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 10 Jul 2020 10:43:16 -0700 Subject: [PATCH] Remove "Recent Commits" from repository landing page Summary: Ref T13552. Currently, the repository landing page has a panel with recent commits. This is accessible by clicking "History" and usually below the fold, so it's not clearly useful. Since I'm consolidating this code anyway to fix an issue with the import pipeline, just get rid of this history view. Test Plan: Viewed a repository landing page, no longer saw a history panel. Maniphest Tasks: T13552 Differential Revision: https://secure.phabricator.com/D21408 --- .../DiffusionRepositoryController.php | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index f00521257e..ae785cff9d 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -299,16 +299,10 @@ final class DiffusionRepositoryController extends DiffusionController { $handles, $browse_pager); - $content[] = $this->buildHistoryTable( - $history_results, - $history, - $history_exception); - if ($readme) { $content[] = $readme; } - try { $branch_button = $this->buildBranchList($drequest); $this->branchButton = $branch_button; @@ -428,51 +422,6 @@ final class DiffusionRepositoryController extends DiffusionController { return null; } - private function buildHistoryTable( - $history_results, - $history, - $history_exception) { - - $request = $this->getRequest(); - $viewer = $request->getUser(); - $drequest = $this->getDiffusionRequest(); - $repository = $drequest->getRepository(); - - if ($history_exception) { - if ($repository->isImporting()) { - return $this->renderStatusMessage( - pht('Still Importing...'), - pht( - 'This repository is still importing. History is not yet '. - 'available.')); - } else { - return $this->renderStatusMessage( - pht('Unable to Retrieve History'), - $history_exception->getMessage()); - } - } - - $history_table = id(new DiffusionHistoryTableView()) - ->setUser($viewer) - ->setDiffusionRequest($drequest) - ->setHistory($history) - ->setIsHead(true); - - if ($history_results) { - $history_table->setParents($history_results['parents']); - } - - $panel = id(new PHUIObjectBoxView()) - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) - ->addClass('diffusion-mobile-view'); - $header = id(new PHUIHeaderView()) - ->setHeader(pht('Recent Commits')); - $panel->setHeader($header); - $panel->setTable($history_table); - - return $panel; - } - private function buildBranchList(DiffusionRequest $drequest) { $viewer = $this->getViewer();