Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 5685057: Add shortcut (arrow up/down) to focus on next/previous line in side-by-side view. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by Andi
Modified:
13 years, 10 months ago
Reviewers:
gvrpython, techtonik, GvR, M-A
CC:
codereview-list_googlegroups.com
Visibility:
Public.

Description

I often use "n" to jump to a hook ("hunk" in diff terms) but then Rietveld lacks a shortcut to move the indicator line-by-line. So I have to fall back to use the mouse to double-click a line to add comments. This change adds a/d shortcuts to move the indicator to the next/prev line in side-by-side view. The difficulty here is that I had to add "temporary" hooks on the JavaScript side that become "real" hooks when a comment is added. This is to not break the n/p movement between hooks. This version is live here: http://rvtests.appspot.com (Don't forget to reload to get the latest script.js and to login to leave comments by pressing enter.)

Patch Set 1 #

Patch Set 2 : Changed keys to arrow keys. #

Patch Set 3 : Update scroll position, restore n/p behavior #

Patch Set 4 : Handle edge cases, less scrolling #

Patch Set 5 : Wrapped lines at 80 cols. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -3 lines) Patch
M static/script.js View 1 2 3 4 10 chunks +115 lines, -1 line 0 comments Download
M templates/base.html View 1 chunk +3 lines, -0 lines 2 comments Download
M templates/diff.html View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19
Andi Albrecht
14 years, 3 months ago (2012-02-20 18:39:52 UTC) #1
gvrpython
Hmmm... In Mondrian we used up/down arrows for this. It would move the blue line ...
14 years, 3 months ago (2012-02-20 19:08:16 UTC) #2
Andi Albrecht
Initially I thought about using the arrow keys too, but then I didn't want to ...
14 years, 3 months ago (2012-02-20 19:21:09 UTC) #3
Andi Albrecht
14 years, 3 months ago (2012-02-21 04:50:06 UTC) #4
Andi Albrecht
On 2012/02/21 04:50:06, Andi Albrecht wrote: hm, it seems that upload.py's "-m" flag doesn't work ...
14 years, 3 months ago (2012-02-21 04:52:46 UTC) #5
Andi Albrecht
Is the version with arrow keys better? -- Andi On Tue, Feb 21, 2012 at ...
14 years, 3 months ago (2012-02-22 18:40:48 UTC) #6
GvR
Looking at the test site I see two problems: 1. When you hit DOWN enough ...
14 years, 3 months ago (2012-02-24 04:19:24 UTC) #7
Andi Albrecht
On Fri, Feb 24, 2012 at 5:19 AM, <gvanrossum@gmail.com> wrote: > Looking at the test ...
14 years, 3 months ago (2012-02-24 05:03:21 UTC) #8
gvrpython
On Thu, Feb 23, 2012 at 9:03 PM, Andi Albrecht <albrecht.andi@googlemail.com> wrote: > On Fri, ...
14 years, 3 months ago (2012-02-24 15:46:41 UTC) #9
Andi Albrecht
Thanks for the thorough testing! On Fri, Feb 24, 2012 at 4:46 PM, Guido van ...
14 years, 3 months ago (2012-02-25 17:25:17 UTC) #10
gvrpython
Looks great, except the viewport now no longer adjusts when you move the blue line. ...
14 years, 3 months ago (2012-02-26 03:10:55 UTC) #11
Andi Albrecht
On Sun, Feb 26, 2012 at 4:10 AM, Guido van Rossum <guido@python.org> wrote: > Looks ...
14 years, 3 months ago (2012-02-26 07:32:26 UTC) #12
gvrpython
On Sat, Feb 25, 2012 at 11:32 PM, Andi Albrecht <albrecht.andi@googlemail.com> wrote: > On Sun, ...
14 years, 3 months ago (2012-02-26 15:38:59 UTC) #13
M-A
FTR, I don't feel qualified to review javascript/html. I don't have an opinion on the ...
14 years, 3 months ago (2012-03-02 18:20:19 UTC) #14
Andi Albrecht
14 years, 3 months ago (2012-03-03 21:06:55 UTC) #15
Andi Albrecht
How to proceed with this issue? Adding codereview-discuss in the hope that there's someone on ...
14 years, 2 months ago (2012-03-17 07:53:21 UTC) #16
gvrpython
So just check it in! On Sat, Mar 17, 2012 at 12:53 AM, Andi Albrecht ...
14 years, 2 months ago (2012-03-17 14:58:44 UTC) #17
techtonik
I am not a user for this feature, neither do I have time to give ...
14 years, 2 months ago (2012-03-17 16:48:46 UTC) #18
Andi Albrecht
14 years, 2 months ago (2012-03-18 07:12:21 UTC) #19
Thanks for the review!

This version is now live.

http://codereview.appspot.com/5685057/diff/15001/templates/base.html
File templates/base.html (right):

http://codereview.appspot.com/5685057/diff/15001/templates/base.html#newcode107
templates/base.html:107: <td class="shortcut"><span class="letter">a</span> /
<span class="letter">d</span> <b>:</b></td><td>next / previous line</td>
On 2012/03/17 16:48:46, techtonik wrote:
> Did you forget to change this to Up/Down?

hmpf, yes... In the first iteration this was a/d... Thanks!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b