• 
      

    Add DiffViewerDropdownActionHook Hook

    Review Request #8157 — Created May 12, 2016 and discarded

    Information

    Review Board

    Reviewers

    Adding a DiffViewerDropdownActionHook will allow Review Board developer to add dropdown menus to the "diff view", much the way they can add dropdowns to the "review request view".

    Added unit test like others.

    Description From Last Updated

    Pinging on this....

    DA davidwalsh

    Col: 32 E128 continuation line under-indented for visual indent

    reviewbotreviewbot

    We're trying to flesh out our codebase docs. Can you have the docs correspond to our new guide? https://www.reviewboard.org/docs/codebase/dev/docs/writing-codebase-docs/ You …

    chipx86chipx86

    Single quotes for strings.

    chipx86chipx86

    """ on the next line. (The others with """ on the same line are incorrect, and were missed during review.)

    chipx86chipx86

    Can you switch this to single quotes for strings?

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/extensions/templatetags/rb_extensions.py
          reviewboard/extensions/hooks.py
          reviewboard/extensions/tests.py
      
      Ignored Files:
          reviewboard/templates/diffviewer/view_diff.html
          docs/manual/extending/extensions/hooks/action-hooks.rst
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/extensions/templatetags/rb_extensions.py
          reviewboard/extensions/hooks.py
          reviewboard/extensions/tests.py
      
      Ignored Files:
          reviewboard/templates/diffviewer/view_diff.html
          docs/manual/extending/extensions/hooks/action-hooks.rst
      
      
    2. reviewboard/extensions/tests.py (Diff revision 1)
       
       
      Show all issues
      Col: 32
       E128 continuation line under-indented for visual indent
      
    3. 
        
    DA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/extensions/templatetags/rb_extensions.py
          reviewboard/extensions/hooks.py
          reviewboard/extensions/tests.py
      
      Ignored Files:
          reviewboard/templates/diffviewer/view_diff.html
          docs/manual/extending/extensions/hooks/action-hooks.rst
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/extensions/templatetags/rb_extensions.py
          reviewboard/extensions/hooks.py
          reviewboard/extensions/tests.py
      
      Ignored Files:
          reviewboard/templates/diffviewer/view_diff.html
          docs/manual/extending/extensions/hooks/action-hooks.rst
      
      
    2. 
        
    chipx86
    1. Hey David,

      I want to give you a heads up that action registration is completely being rewritten for 3.0, and I'm going to be landing that shortly. We'll end up needing a counterpart for this for the release-3.0.x branch to go along with this change, so we can land that first and sanely merge this. I'll update you when that's in.

      1. Okay, that's finally been landed (been meaning to get around to that). You can see what the new ReviewRequestDropdownActionHook looks like. It's mostly going to be copy and paste for that, but based on DiffViewerActionHook.

      2. So would you like me to check out the release-3.0.x branch and create the likewise hook on that branch?

      3. Just wanted to ping in on this -- can I get more guidance on a way forward? Can we land this in 2.5.x and 3.0.x?

    2. 
        
    DA
    1. After looking at the 3.0.x branch, it looks as though ReviewRequestDropdownActionHook's apply_to would take the place of this new class. Am I reading the code properly?

      1. Yes, you are correct. Sorry this has gone unnoticed.

    2. 
        
    DA
    1. 
        
    2. Show all issues

      Pinging on this....

    3. 
        
    chipx86
    1. Can you set the branch to indicate what version this applies to?

      From what I can tell, this should be limited to 2.5, and that's good information to have in the description.

    2. Show all issues

      We're trying to flesh out our codebase docs. Can you have the docs correspond to our new guide? https://www.reviewboard.org/docs/codebase/dev/docs/writing-codebase-docs/

      You can see an example of what we want at https://github.com/djblets/djblets/blob/master/djblets/util/templatetags/djblets_utils.py

    3. Show all issues

      Single quotes for strings.

    4. reviewboard/extensions/tests.py (Diff revision 2)
       
       
      Show all issues

      """ on the next line.

      (The others with """ on the same line are incorrect, and were missed during review.)

    5. reviewboard/extensions/tests.py (Diff revision 2)
       
       
       
      Show all issues

      Can you switch this to single quotes for strings?

    6. 
        
    DA
    1. 
        
    2. Closing this for https://reviews.reviewboard.org/r/8301/

    3. 
        
    DA
    Review request changed
    Status:
    Discarded