Deep linking a specific line of code in a PR hides the line after page load #154966
Unanswered
ChrisN-transnexus
asked this question in
Pull Requests
Replies: 1 comment
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Bug
Body
If I click on the left side of a diff within a PR (the darker green/pink area), the browser's URL is updated with a hash which is supposed to link directly to the line which was clicked, EG:
https://{repo URL}/pull/79/files#diff-a010b816a9f61daed69cb4fb1f11d416cf4bca65f4244e16334d15daf2b01c42R9The purpose of this hash is to allow the user to share the link with a coworker so their browser can be taken directly to the line of code being discussed. However, once the URL is copy/pasted into a browser, the page scrolls to the line in question, then the "floating" grey file name header covers the highlighted line, creating a confusing experience and defeating the purpose of deep linking a specific line of code.
The team which created the "floating" file name header clearly did not account for deep linking a specific line of code, and did not test for this experience. This is confusing for the person receiving the deep link URL and makes the user who sent the deep link look dumb. It should be fixed, and only needs a simple change to scroll the page roughly 40px less when viewing a deep link in a PR.
All reactions