Convert header actions to new actions framework.

Review Request #12762 — Created Jan. 5, 2023 and updated

david
Review Board
release-6.x
reviewboard

This change updates our existing header "actions" (the account menu,
support menu, and follow menu) to use the new actions framework.

Verified look and behavior of the header in both desktop and mobile
modes.

Summary
Convert header actions to new actions framework.
Description From Last Updated

Add a version added.

maubinmaubin

These should all have Version Added.

chipx86chipx86

This is so common that I wonder if we should have either a mixin or bake a flag into actions.

chipx86chipx86

Similarly, maybe it's worth having either a url_name property on the base action (which get_url can use along with local_site_reverse) …

chipx86chipx86

We're not really following via RSS, just giving a link to the news page. The naming might be best as …

chipx86chipx86

We should still give menus and menu items an explicit class name. We've been doing that for all spec'd parts …

chipx86chipx86

Extra blank line at the end of the file.

chipx86chipx86

To be safe, we should always use local_site_reverse for these, with the request/Local Site being passed in. There are some …

chipx86chipx86
maubin
  1. 
      
  2. reviewboard/accounts/actions.py (Diff revision 1)
     
     

    Add a version added.

  3. 
      
david
chipx86
  1. 
      
  2. reviewboard/accounts/actions.py (Diff revision 2)
     
     

    These should all have Version Added.

  3. reviewboard/accounts/actions.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    This is so common that I wonder if we should have either a mixin or bake a flag into actions.

  4. reviewboard/accounts/actions.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Similarly, maybe it's worth having either a url_name property on the base action (which get_url can use along with local_site_reverse) or a mixin, so actions are consistent in behavior by default?

  5. reviewboard/accounts/actions.py (Diff revision 2)
     
     
     
     
     
     
     
     
     

    We're not really following via RSS, just giving a link to the news page. The naming might be best as just FollowNewsAction or something.

  6. reviewboard/static/rb/css/pages/base.less (Diff revision 2)
     
     
     
     

    We should still give menus and menu items an explicit class name. We've been doing that for all spec'd parts of a component.

  7. Extra blank line at the end of the file.

  8. 
      
david
chipx86
  1. 
      
  2. reviewboard/actions/base.py (Diff revision 3)
     
     

    To be safe, we should always use local_site_reverse for these, with the request/Local Site being passed in. There are some normally top-level URLs on RBCommons that require a Local Site.

  3. 
      
david
Review request changed

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
chipx86
  1. Ship It!
  2. 
      
Loading...