Closed
Bug 1007293
Opened 10 years ago
Closed 8 years ago
"Blame" link should scroll to selected line
Categories
(Webtools Graveyard :: DXR, enhancement)
Webtools Graveyard
DXR
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: new_one)
References
()
Details
(Whiteboard: mxr-parity)
Attachments
(1 file)
When I click "Blame", I'd like the blame page to scroll to the same line (selected by being the search result, or explicitly by clicking a line number). MXR does this: <a href="http://hg.mozilla.org/mozilla-central/annotate/4e4e0f502969/js/src/builtin/TestingFunctions.cpp#l24" onfocus="updateHgBlameHash(this, event)" onmouseover="updateHgBlameHash(this, event)">Hg Blame</a>
Comment 1•10 years ago
|
||
This is a really annoying papercut. I tried to look into fixing it, but I can't figure out (a) how to run dxr locally without running the indexing backend, and (b) how to cleanly add this because the 'navigation' box is in a plugin, and there are no plugins that provide js functionality, and so I'm not sure how to integrate it 'correctly'.
Comment 2•10 years ago
|
||
I just rewrite all the DXR documentation, including a good page on getting started developing. I think this is the bit you need: http://dxr.readthedocs.org/en/latest/development.html#running-a-test-index. (If you already found this and it was confusing, please let me know.) As for JS, feel free to edit the core JS files: panel.js is probably the most appropriate place to put nav panel changes. The easiest path forward is probably to have the omniglot plugin return "javascript:..." for the href of the blame link and have that call some panel.js code. Sorry for the delay getting back to you on this; your patches are most welcome.
Reporter | ||
Comment 3•10 years ago
|
||
Using "javascript:..." as the href won't play well with "Open link in new tab". mxr's approach (update onfocus / onmouseover) seems better to me.
Comment 4•10 years ago
|
||
Good point. You can just register the onwhatever listeners in navpanel.js; jQuery should make it easy to do nothing if the links aren't there.
Updated•9 years ago
|
Whiteboard: mxr-parity
Updated•9 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Assignee | ||
Comment 6•9 years ago
|
||
I forgot to take the bug before I started work on it; here's a link to my pull request. https://github.com/mozilla/dxr/pull/448
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → peter.elmers
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•8 years ago
|
||
Comment 9•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/dxr https://github.com/mozilla/dxr/commit/f30858983ff4e8a6baa142984a86a8125b54f319 Update blame links with selected line, fix bug 1007293
Updated•8 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•