Add new hook points for adding entries to the header

Review Request #4624 — Created Sept. 21, 2013 and submitted

mike_conley
Review Board
master
reviewboard

Add HeaderActionHook and HeaderDropdownActionHook for putting items into the base page header (where the branding, search, account management and support links are).

Wrote some unit tests, and did manual testing with my TogetherJS extension.

Loading file attachments...

Description From Last Updated

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 66 W292 no newline at end of file

reviewbotreviewbot

Col: 5 E303 too many blank lines (2)

reviewbotreviewbot

Col: 5 E303 too many blank lines (2)

reviewbotreviewbot

Col: 1 W391 blank line at end of file

reviewbotreviewbot

Collapse these down to one load statement. It's faster.

chipx86chipx86

Trailing newline.

chipx86chipx86

Whoops - the comments that Christian brought up were for this file, not action_dropdown.html. Let me fix that.

mike_conleymike_conley

Indentation for template tags should go inside the {% .. %}, so: {% for action ... %} {% include ...

chipx86chipx86
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. reviewboard/extensions/hooks.py (Diff revision 1)
     
     

    Col: 1
    E302 expected 2 blank lines, found 1

  3. reviewboard/extensions/hooks.py (Diff revision 1)
     
     

    Col: 1
    E302 expected 2 blank lines, found 1

  4. Col: 1
    E302 expected 2 blank lines, found 1

  5. Col: 1
    E302 expected 2 blank lines, found 1

  6. Col: 66
    W292 no newline at end of file

  7. reviewboard/extensions/tests.py (Diff revision 1)
     
     

    Col: 5
    E303 too many blank lines (2)

  8. reviewboard/extensions/tests.py (Diff revision 1)
     
     

    Col: 5
    E303 too many blank lines (2)

  9. reviewboard/extensions/tests.py (Diff revision 1)
     
     

    Col: 1
    W391 blank line at end of file

  10. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
chipx86
  1. 
      
  2. Collapse these down to one load statement. It's faster.

  3. 
      
mike_conley
mike_conley
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
mike_conley
  1. 
      
  2. Whoops - the comments that Christian brought up were for this file, not action_dropdown.html. Let me fix that.

  3. 
      
mike_conley
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
mike_conley
  1. 
      
  2. I decided to keep this accidental change since it's ultimately faster to load things this way.

  3. 
      
chipx86
  1. 
      
  2. Indentation for template tags should go inside the {% .. %}, so:

    {% for action ... %}
    {%  include ... %}
    {% endfor %}
    
  3. 
      
mike_conley
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/extensions/templatetags/rb_extensions.py
    reviewboard/extensions/hooks.py
    reviewboard/extensions/tests.py
    Ignored Files:
    reviewboard/templates/extensions/action_dropdown.html
    reviewboard/templates/extensions/header_action_dropdown.html
    reviewboard/templates/base.html

  2. 
      
chipx86
  1. Ship It!

  2. 
      
mike_conley
Review request changed

Status: Closed (submitted)

Change Summary:

Landed as 33ed256007. Thanks!

Loading...