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

Don't expand folded timelines just because users went to any anchor whatsoever

Summary:
Ref T12970. See PHI43. Currently, the "Show Older Comments" link gets auto-clicked if the user visits **any** anchor. This is not correct.

Instead, only auto-click it if the user visits a numeric anchor. This fixes the behavior approximately 98% of the time. See T12970 for a followup on the remaining ambiguous cases.

Test Plan:
- Viewed a revision with some folded transactions and a "Show Older Comments" link.
- Clicked a link to a file in the table of contents, with a hash like `#1234abcd`.
- Before: Timeline expanded and I ended up somewhere bad.
- After: Timeline no longer expanded.
- Manually changed hash to `#1234` (purely numeric), saw timeline expand.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12970

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

+7
+7
webroot/rsrc/js/application/transactions/behavior-show-older-transactions.js
··· 17 17 if (!hash) { 18 18 return false; 19 19 } 20 + 21 + // If the hash isn't purely numeric, ignore it. Comments always have 22 + // numeric hashes. See PHI43 and T12970. 23 + if (!hash.match(/^\d+$/)) { 24 + return false; 25 + } 26 + 20 27 var id = 'anchor-'+hash; 21 28 try { 22 29 JX.$(id);