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

Add a preference to disable ghost comments

Summary: Ref T7447. At least some users dislike this feature so strongly that they'd prefer not to have it at all.

Test Plan: Viewed ghosts; toggled preference, no more ghosts.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim, epriestley

Maniphest Tasks: T7447

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

+22
+7
src/applications/differential/query/DifferentialInlineCommentQuery.php
··· 148 148 assert_instances_of($new, 'DifferentialChangeset'); 149 149 150 150 $viewer = $this->getViewer(); 151 + 152 + $pref = $viewer->loadPreferences()->getPreference( 153 + PhabricatorUserPreferences::PREFERENCE_DIFF_GHOSTS); 154 + if ($pref == 'disabled') { 155 + return $inlines; 156 + } 157 + 151 158 $all = array_merge($old, $new); 152 159 153 160 $changeset_ids = mpull($inlines, 'getChangesetID');
+14
src/applications/settings/panel/PhabricatorDiffPreferencesSettingsPanel.php
··· 20 20 $preferences = $user->loadPreferences(); 21 21 22 22 $pref_unified = PhabricatorUserPreferences::PREFERENCE_DIFF_UNIFIED; 23 + $pref_ghosts = PhabricatorUserPreferences::PREFERENCE_DIFF_GHOSTS; 23 24 $pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE; 24 25 25 26 if ($request->isFormPost()) { ··· 35 36 36 37 $unified = $request->getStr($pref_unified); 37 38 $preferences->setPreference($pref_unified, $unified); 39 + 40 + $ghosts = $request->getStr($pref_ghosts); 41 + $preferences->setPreference($pref_ghosts, $ghosts); 38 42 39 43 $preferences->save(); 40 44 return id(new AphrontRedirectResponse()) ··· 59 63 array( 60 64 'default' => pht('On Small Screens'), 61 65 'unified' => pht('Always'), 66 + ))) 67 + ->appendChild( 68 + id(new AphrontFormSelectControl()) 69 + ->setLabel(pht('Show Older Inlines')) 70 + ->setName($pref_ghosts) 71 + ->setValue($preferences->getPreference($pref_ghosts)) 72 + ->setOptions( 73 + array( 74 + 'default' => pht('Enabled'), 75 + 'disabled' => pht('Disabled'), 62 76 ))) 63 77 ->appendChild( 64 78 id(new AphrontFormSelectControl())
+1
src/applications/settings/storage/PhabricatorUserPreferences.php
··· 31 31 32 32 const PREFERENCE_DIFF_UNIFIED = 'diff-unified'; 33 33 const PREFERENCE_DIFF_FILETREE = 'diff-filetree'; 34 + const PREFERENCE_DIFF_GHOSTS = 'diff-ghosts'; 34 35 35 36 const PREFERENCE_CONPH_NOTIFICATIONS = 'conph-notifications'; 36 37 const PREFERENCE_CONPHERENCE_COLUMN = 'conpherence-column';