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

Show lint messages in deleted files on the left-hand side of the change

Summary:
See PHI416. If you raise a lint message in a deleted file, we don't render any text on the right hand side so the message never displays.

This is occasionally still legitimate/useful, e.g. to display a "don't delete this file" message. At least for now, show these messages on the left.

Test Plan: Posted a lint message on a deleted file via `harbormaster.sendmessage`, viewed revision, saw file expand with synthetic inline for lint.

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

+13 -3
+13 -3
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 390 390 return array(); 391 391 } 392 392 393 + $change_type = $changeset->getChangeType(); 394 + if (DifferentialChangeType::isDeleteChangeType($change_type)) { 395 + // If this is a lint message on a deleted file, show it on the left 396 + // side of the UI because there are no source code lines on the right 397 + // side of the UI so inlines don't have anywhere to render. See PHI416. 398 + $is_new = 0; 399 + } else { 400 + $is_new = 1; 401 + } 402 + 393 403 $template = id(new DifferentialInlineComment()) 394 - ->setChangesetID($changeset->getID()) 395 - ->setIsNewFile(1) 396 - ->setLineLength(0); 404 + ->setChangesetID($changeset->getID()) 405 + ->setIsNewFile($is_new) 406 + ->setLineLength(0); 397 407 398 408 $inlines = array(); 399 409 foreach ($messages as $message) {