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

Explain why older changes are hidden more clearly

Summary:
Fixes T9920. When hiding changes, tell users why so they can learn the comment rule (usually, "Changes from before your most recent comment are hidden."; sometimes they're hidden for pagination reasons).

Also use "Show Older Comments" instead of "Show older comments." for the action since I think it's a little more consistent to use title case for links/actions?

Test Plan:
- Viewed a task with a lot of comments, saw a "most recent comment" element.
- Artificially set page size to 3, saw a "lots of changes" hide.
- Grepped for removed string.
- Clicked both "show older stuff" links.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9920

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

+26 -7
-5
src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
··· 810 810 '%d Users Need Approval', 811 811 ), 812 812 813 - '%s older changes(s) are hidden.' => array( 814 - '%d older change is hidden.', 815 - '%d older changes are hidden.', 816 - ), 817 - 818 813 '%s, %s line(s)' => array( 819 814 array( 820 815 '%s, %s line',
+26 -2
src/view/phui/PHUITimelineView.php
··· 91 91 92 92 $spacer = self::renderSpacer(); 93 93 94 + // Track why we're hiding older results. 95 + $hide_reason = null; 96 + 94 97 $hide = array(); 95 98 $show = array(); 96 99 ··· 109 112 // by default. We may still need to paginate if there are a large number 110 113 // of events. 111 114 $more = (bool)$hide; 115 + 116 + if ($more) { 117 + $hide_reason = 'comment'; 118 + } 119 + 112 120 if ($this->getPager()) { 113 121 if ($this->getPager()->getHasMoreResults()) { 122 + if (!$more) { 123 + $hide_reason = 'limit'; 124 + } 114 125 $more = true; 115 126 } 116 127 } 117 128 118 129 $events = array(); 119 130 if ($more && $this->getPager()) { 131 + switch ($hide_reason) { 132 + case 'comment': 133 + $hide_help = pht( 134 + 'Changes from before your most recent comment are hidden.'); 135 + break; 136 + case 'limit': 137 + default: 138 + $hide_help = pht( 139 + 'There are a very large number of changes, so older changes are '. 140 + 'hidden.'); 141 + break; 142 + } 143 + 120 144 $uri = $this->getPager()->getNextPageURI(); 121 145 $uri->setQueryParam('quoteTargetID', $this->getQuoteTargetID()); 122 146 $uri->setQueryParam('quoteRef', $this->getQuoteRef()); ··· 127 151 'class' => 'phui-timeline-older-transactions-are-hidden', 128 152 ), 129 153 array( 130 - pht('Older changes are hidden. '), 154 + $hide_help, 131 155 ' ', 132 156 javelin_tag( 133 157 'a', ··· 136 160 'mustcapture' => true, 137 161 'sigil' => 'show-older-link', 138 162 ), 139 - pht('Show older changes.')), 163 + pht('Show Older Changes')), 140 164 )); 141 165 142 166 if ($show) {