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

Mention the "inline comments" rule in the callout for "Large" diffs

Summary:
See PHI638. When a diff is large (between 100 and 1000 files), we collapse content by default unless a change also has inline comments.

This rule isn't explicitly explained anywhere. Although it's not really a critical rule, it fits easily enough into the UI callout.

Also render the UI callout in a slightly more modern way and avoid `hsprintf()`.

Test Plan:
{F5596496}

- Also, clicked the "Expand" link and saw everything expand properly.

Reviewers: amckinley

Reviewed By: amckinley

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

+22 -16
+22 -16
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 182 182 if ($large_warning) { 183 183 $count = $this->getChangesetCount(); 184 184 185 - $warning = new PHUIInfoView(); 186 - $warning->setTitle(pht('Large Diff')); 187 - $warning->setSeverity(PHUIInfoView::SEVERITY_WARNING); 188 - $warning->appendChild(hsprintf( 189 - '%s <strong>%s</strong>', 185 + $expand_uri = $request_uri 186 + ->alter('large', 'true') 187 + ->setFragment('toc'); 188 + 189 + $message = array( 190 190 pht( 191 - 'This diff is large and affects %s files. '. 192 - 'You may load each file individually or ', 191 + 'This large diff affects %s files. Files without inline '. 192 + 'comments have been collapsed.', 193 193 new PhutilNumber($count)), 194 + ' ', 194 195 phutil_tag( 195 - 'a', 196 - array( 197 - 'class' => 'button button-grey', 198 - 'href' => $request_uri 199 - ->alter('large', 'true') 200 - ->setFragment('toc'), 201 - ), 202 - pht('Show All Files Inline')))); 203 - $warning = $warning->render(); 196 + 'strong', 197 + array(), 198 + phutil_tag( 199 + 'a', 200 + array( 201 + 'href' => $expand_uri, 202 + ), 203 + pht('Expand All Files'))), 204 + ); 205 + 206 + $warning = id(new PHUIInfoView()) 207 + ->setTitle(pht('Large Diff')) 208 + ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 209 + ->appendChild($message); 204 210 205 211 $old = array_select_keys($changesets, $old_ids); 206 212 $new = array_select_keys($changesets, $new_ids);