@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.

Hide the "large" diff warning on "very large" diffs

Summary:
Ref T13110. Ref T13130. When a revision is "large" (100 - 1000 files) we hide the actual textual changes by default. When it is "very large" (more than 1000 files) we hide all the changesets by default.

For "very large" diffs, we currently still show the "large" warning, which doesn't really make sense since there aren't any actual changesets.

When a diff is "very large", don't show the "large" warning.

Test Plan:
- Viewed a small diff (<100 files), saw no warnings.
- Viewed a large diff (100-1000 files), saw just the large warning.
- Viewed a very large diff (>1000 files).
- Before: both "large" and "very large" help warnings.
- After: just "very large" warnings.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13130, T13110

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

+9 -1
+9 -1
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 153 153 154 154 $request_uri = $request->getRequestURI(); 155 155 156 + // Revisions with more than 100 files are "large". 157 + // Revisions with more than 1000 files are "very large". 156 158 $limit = 100; 157 159 $large = $request->getStr('large'); 158 - if (count($changesets) > $limit && !$large) { 160 + 161 + $large_warning = 162 + (!$this->isVeryLargeDiff()) && 163 + (count($changesets) > $limit) && 164 + (!$large); 165 + 166 + if ($large_warning) { 159 167 $count = count($changesets); 160 168 $warning = new PHUIInfoView(); 161 169 $warning->setTitle(pht('Large Diff'));