Pull request comment permalink does not scroll to the target activity comment on PRs with a large number of comments/activities

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      When opening a pull request using a comment permalink URL

      ../pull-requests/{id}/overview?commentId={id}
      

      Bitbucket should scroll to and highlight a specific comment. However, on pull requests with many comments or activity, this fails, leaving the page at the top or middle of the Activity feed and failing to display the target comment.

      Steps to Reproduce

      1. Open a pull request that has a large number of comments/activities.
      2. In the Activity feed, pick a comment that is relatively recent (roughly within the most recent 25 activity items) but not the very newest one, so that several other activities (comments, approvals, rescopes, etc.) would render above it on the same page load.
      3. Copy that comment's permalink (the link/chain icon next to its timestamp gives a URL ending in {{?commentId= {id}

        }}).

      1. Open that permalink URL in a new browser tab/window.

      Example

      • .../pull-requests/32933/overview?commentId=633307

      Expected Results

      The page scrolls to and highlights the comment referenced by commentId, regardless of how many other activities render above it or how long the PR's comment history is.

      Actual Results

      The page remains at the top or middle of the Activity feed; the target comment is never scrolled. However, if we scroll down in the feed, the comment is highlighted in blue.

      If other activity content positioned above it (avatars, comment bodies, images/emoji, etc.) is still loading/rendering at that point, the resulting layout shift pushes the target comment out of view with no further correction.

      Workaround

      Currently, there is no known workaround for this behaviour. A workaround will be added here when available.

              Assignee:
              Navpreet Ahuja
              Reporter:
              Nikhil Kapoor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: