• 
      

    Allow users to configure a Quick Access hotbar for actions.

    Review Request #14424 — Created May 4, 2025 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    Actions are a powerful feature for defining parts of the UI and for
    allowing extensions to customize it further. This change builds upon
    this framework by giving users their own control over which actions they
    want ready access to.

    The Unified Banner now defines an area for Quick Access actions. These
    are chosen from a menu to the right of the bar, and can allow users to
    place any Quick Access actions there.

    Quick Access actions are new action classes placed in a quick-access
    attachment point. They're generally buttons (though in theory, menus or
    other action types could also be placed), and contain some additional
    state used for RB.ActionView and RB.PageView.

    A QuickAccessActionMixin helps with defining these actions, and can be
    mixed in along with another action in order to convert it to a Quick
    Acccess action.

    There are currently four Quick Access actions defined: Create Review,
    Edit Review, Add General Comment, and Ship It. These will allow users
    to place any or all of these actions at the top of their browser window
    for easy access.

    Customization is done through the menu at the right of the bar,
    presented as a checklist of all available actions. Toggling these
    actions will put the actions (already technically present in the bar but
    hidden and disabled) into an enabled state, allowing normal visibility
    rules to take over. Upon closing the menu, the new list of actions will
    be saved to the user's settings. This makes customization really easy
    and fast.

    In the future, we'll be able to add optional actions for new features,
    such as a "Ship It and Archive" or similar.

    Unit tests pass. There's room for more tests to be written, but
    they'll be handled separately.

    Tested this with a user without any Quick Access settings, a user
    with settings, and anonymous users.

    Tested adding all the actions we currently supply, and verifying
    that they only showed up if enabled for the user, regardless of
    any state calculations done in JavaScript. Also verified that those
    state calculations were reflected properly when actions were enabled.

    Tested on small browser windows and mobile sizes. There is work that's
    needed for really optimizing on mobile, but it's beyond the scope of
    this work.

    Summary ID
    Allow users to configure a Quick Access hotbar for actions.
    Actions are a powerful feature for defining parts of the UI and for allowing extensions to customize it further. This change builds upon this framework by giving users their own control over which actions they want ready access to. The Unified Banner now defines an area for Quick Access actions. These are chosen from a menu to the right of the bar, and can allow users to place any Quick Access actions there. Quick Access actions are new action classes placed in a `quick-access` attachment point. They're generally buttons (though in theory, menus or other action types could also be placed), and contain some additional state used for `RB.ActionView` and `RB.PageView`. A `QuickAccessActionMixin` helps with defining these actions, and can be mixed in along with another action in order to convert it to a Quick Acccess action. There are currently four Quick Access actions defined: Create Review, Edit Review, Add General Comment, and Ship It. These will allow users to place any or all of these actions at the top of their browser window for easy access. Customization is done through the menu at the right of the bar, presented as a checklist of all available actions. Toggling these actions will put the actions (already technically present in the bar but hidden and disabled) into an enabled state, allowing normal visibility rules to take over. Upon closing the menu, the new list of actions will be saved to the user's settings. This makes customization really easy and fast. In the future, we'll be able to add optional actions for new features, such as a "Ship It and Archive" or similar.
    191fc4583af2504ac53b782c61ec5706c0597ee2

    Description From Last Updated

    Can you take a screenshot in mobile mode?

    daviddavid

    What does this look like when the menu isn't open?

    daviddavid

    'reviewboard.accounts.models.User' imported but unused Column: 5 Error code: F401

    reviewbotreviewbot

    line too long (81 > 79 characters) Column: 80 Error code: E501

    reviewbotreviewbot

    Property getters should just be documented like. attributes.

    daviddavid

    With the goal of reducing diff lines churn, I'd like to start formatting these as: ... SupportAction, SupportMenuAction, )

    daviddavid

    And here.

    daviddavid

    Swap these?

    daviddavid

    Typo: ofr

    maubinmaubin

    Since we're deprecating, should we use housekeeping's ClassDeprecatedMixin (or maybe ClassMovedMixin) here and for the other legacy actions.

    maubinmaubin

    The closing tag doesn't match the opening tag.

    maubinmaubin
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. 
        
    2. Show all issues

      Can you take a screenshot in mobile mode?

      1. The Testing Done talks about this a bit, but there's work that'd need to be done to make this UI better on smaller devices. It has warts that spill out into other areas. Much larger task, so being punted for this week's deployment. I'll add screenshots, though.

    3. Show all issues

      What does this look like when the menu isn't open?

    4. reviewboard/accounts/models.py (Diff revision 2)
       
       
      Show all issues

      Property getters should just be documented like. attributes.

    5. reviewboard/actions/registry.py (Diff revision 2)
       
       
      Show all issues

      With the goal of reducing diff lines churn, I'd like to start formatting these as:

          ...
          SupportAction,
          SupportMenuAction,
      )
      
    6. reviewboard/actions/registry.py (Diff revision 2)
       
       
      Show all issues

      And here.

    7. reviewboard/static/rb/css/ui/banners.less (Diff revision 2)
       
       
       
      Show all issues

      Swap these?

      1. We usually loosely group the things dependent on the display below the display:.

    8. 
        
    chipx86
    chipx86
    david
    1. Ship It!
    2. 
        
    maubin
    1. 
        
    2. reviewboard/actions/base.py (Diff revision 3)
       
       
      Show all issues

      Typo: ofr

    3. reviewboard/reviews/actions.py (Diff revision 3)
       
       
      Show all issues

      Since we're deprecating, should we use housekeeping's ClassDeprecatedMixin (or maybe ClassMovedMixin) here and for the other legacy actions.

      1. Not yet, because we still instantiate these for the registry, and would trigger those warnings every time. We likely won't be able to add this kind of warning for actions.

    4. Show all issues

      The closing tag doesn't match the opening tag.

    5. 
        
    chipx86
    maubin
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (6190ac8)