Add a review stopwatch extension.

Review Request #7429 — Created June 15, 2015 and submitted

Information

rb-extension-pack
master
9ad612a...

Reviewers

This adds a new extension, the review stopwatch. The goal here is for reviewers
to be able to track the amount of time that they spend reviewing a change, and
have that information available in the API.

The stopwatch UI is shown in the lower-right corner of the page. Clicking it
will toggle on and off the timer. The resulting total seconds spent reviewing
is stored in the review extra_data field.

The one somewhat confusing thing here is that if a user opens up multiple tabs
related to the same review request (say, review request details, diff viewer,
and a couple file attachments), there will be timers on each page. If these are
run independently, they'll step on each other. We'll just have to document how
this should be used and hope that it doesn't become an issue.

  • Tested that toggle on/off worked correctly.
  • Tested that the current time was saved to the review's extra_data when
    toggling off.
  • Tested display of the time in the stopwatch overlay, review dialog, and
    review boxes for various different values.
  • Tested that the display in the review dialog updated when the stopwatch was
    still running.
  • Tested that publishing or discarding the review stopped the stopwatch
    correctly, and (in the case of publish), saved correctly.
  • Tested onbeforeunload handler.

Description From Last Updated

Some suggestions for the look: An off-black for the border (maybe #333) would look better. Maybe add a background that …

chipx86chipx86

'settings' imported but unused

reviewbotreviewbot

'patterns' imported but unused

reviewbotreviewbot

'include' imported but unused

reviewbotreviewbot

This file can be blank, no?

brenniebrennie

Same with this one.

brenniebrennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
  2. rbstopwatch/rbstopwatch/extension.py (Diff revision 1)
     
     
    Show all issues
     'settings' imported but unused
    
  3. rbstopwatch/rbstopwatch/extension.py (Diff revision 1)
     
     
    Show all issues
     'patterns' imported but unused
    
  4. rbstopwatch/rbstopwatch/extension.py (Diff revision 1)
     
     
    Show all issues
     'include' imported but unused
    
  5. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
  2. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
        rbstopwatch/LICENSE
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
        rbstopwatch/rbstopwatch/__init__.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
        rbstopwatch/LICENSE
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
    
    
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Some suggestions for the look:

    1. An off-black for the border (maybe #333) would look better.
    2. Maybe add a background that helps separate it out from the other content just a bit. A light green/yellow (maybe similar to diff colors) for running/paused would be neat.
    3. Maybe a box shadow too, like the new update bubbles have, just to help with the pop and separation from other content.
  3. 
      
brennie
  1. 
      
  2. rbstopwatch/rbstopwatch/__init__.py (Diff revision 3)
     
     
    Show all issues

    This file can be blank, no?

  3. Show all issues

    Same with this one.

  4. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/__init__.py
        rbstopwatch/LICENSE
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/__init__.py
        rbstopwatch/LICENSE
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/__init__.py
        rbstopwatch/LICENSE
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbstopwatch/rbstopwatch/templatetags/stopwatch_tags.py
        rbstopwatch/setup.py
        rbstopwatch/rbstopwatch/extension.py
    
    Ignored Files:
        rbstopwatch/rbstopwatch/__init__.py
        rbstopwatch/LICENSE
        rbstopwatch/rbstopwatch/static/js/stopwatch.js
        rbstopwatch/rbstopwatch/static/css/stopwatch.less
        rbstopwatch/rbstopwatch/templatetags/__init__.py
        rbstopwatch/README.md
        rbstopwatch/rbstopwatch/templates/rbstopwatch-review-header.html
    
    
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (28952a9)