@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When query panels have more results, show a "View All Results" button at the bottom

Summary:
Depends on D20335. Ref T13263. Ref T13272. See PHI854. Ref T9903.

Currently, we don't provide a clear indicator that a query panel is showing a partial result set (UI looks the same whether there are more results or not).

We also don't provide any way to get to the full result set (regardless of whether it is the same as the visible set or not) on tab panels, since they don't inherit the header buttons.

To (mostly) fix these problems, add a "View All Results" button at the bottom of the list if the panel shows only a subset of results.

Test Plan:
{F6314560}

{F6314562}

{F6314564}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13272, T13263, T9903

Differential Revision: https://secure.phabricator.com/D20336

+27
+27
src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
··· 136 136 $results_view->setContent($content); 137 137 } 138 138 139 + if ($pager->getHasMoreResults()) { 140 + $item_list = $results_view->getObjectList(); 141 + 142 + $more_href = $engine->getQueryResultsPageURI($key); 143 + if ($item_list) { 144 + $item_list->newTailButton() 145 + ->setHref($more_href); 146 + } else { 147 + // For search engines that do not return an object list, add a fake 148 + // one to the end so we can render a "View All Results" button that 149 + // looks like it does in normal applications. At time of writing, 150 + // several major applications like Maniphest (which has group headers) 151 + // and Feed (which uses custom rendering) don't return simple lists. 152 + 153 + $content = $results_view->getContent(); 154 + 155 + $more_list = id(new PHUIObjectItemListView()) 156 + ->setAllowEmptyList(true); 157 + 158 + $more_list->newTailButton() 159 + ->setHref($more_href); 160 + 161 + $content = array($content, $more_list); 162 + $results_view->setContent($content); 163 + } 164 + } 165 + 139 166 return $results_view; 140 167 } 141 168