• 
      

    Add a setting for controlling whether to confirm a Ship It! review.

    Review Request #14409 — Created April 29, 2025 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    With the modern location for the Ship It action (in the Review menu),
    it's much harder to accidentally post a Ship It review. This makes the
    confirmation prompt less important than it once was.

    We now have a setting for controlling whether to prompt for
    confirmation. This is managed in My Account -> Settings.

    The confirmation dialog itself now uses an Ink modal dialog, with some
    additional text to help guide users. It also includes a "Do not ask
    again" checkbox, which will turn off the confirmation setting as well.
    This is a sort of prototype for a suppression dialog that we may want in
    Ink.

    The setting is managed through the User Session resource, which now
    accepts a HTTP PUT with a settings:json JSON Merge Patch of settings.
    RB.UserSession provides an endpoint for this as well. These currently
    only accept this new confirm_ship_it setting, and they're marked as
    for internal use only, but it provides a path for more dynamic settings
    down the road.

    Python and JavaScript unit tests passed.

    Tested the Ship It flow with confirmation turned on and off.

    Tested the "Do not ask again" checkbox in the confirmation dialog,
    verifying that it turned off the confirmation setting.

    Summary ID
    Add a setting for controlling whether to confirm a Ship It! review.
    With the modern location for the Ship It action (in the Review menu), it's much harder to accidentally post a Ship It review. This makes the confirmation prompt less important than it once was. We now have a setting for controlling whether to prompt for confirmation. This is managed in My Account -> Settings. The confirmation dialog itself now uses an Ink modal dialog, with some additional text to help guide users. It also includes a "Do not ask again" checkbox, which will turn off the confirmation setting as well. This is a sort of prototype for a suppression dialog that we may want in Ink. The setting is managed through the User Session resource, which now accepts a HTTP PUT with a `settings:json` JSON Merge Patch of settings. `RB.UserSession` provides an endpoint for this as well. These currently only accept this new `confirm_ship_it` setting, and they're marked as for internal use only, but it provides a path for more dynamic settings down the road.
    2c03cc3ba8e0fe231e320cbe120a75a1804668f3

    Description From Last Updated

    Unrelated, but shouldn't this be an icon instead of a blue square?

    daviddavid

    'djblets.util.decorators.augment_method_from' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    'djblets.util.json_utils.JSONPatchError' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    Can you type this?

    maubinmaubin

    Missing documentation and typing.

    maubinmaubin

    We can use user here instead of request.user.

    maubinmaubin

    Can you type this as a Mapping?

    daviddavid

    Since setters are just documented like methods, this needs an "Args" section.

    daviddavid

    Here too.

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

    flake8

    chipx86
    maubin
    1. 
        
    2. reviewboard/webapi/resources/session.py (Diff revision 2)
       
       
      Show all issues

      Can you type this?

    3. reviewboard/webapi/resources/session.py (Diff revision 2)
       
       
      Show all issues

      Missing documentation and typing.

    4. reviewboard/webapi/resources/session.py (Diff revision 2)
       
       
      Show all issues

      We can use user here instead of request.user.

    5. 
        
    chipx86
    david
    1. 
        
    2. Show all issues

      Unrelated, but shouldn't this be an icon instead of a blue square?

      1. It was just a local issue. You can ignore this.

    3. reviewboard/accounts/forms/pages.py (Diff revision 3)
       
       
      Show all issues

      Can you type this as a Mapping?

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

      Since setters are just documented like methods, this needs an "Args" section.

    5. reviewboard/accounts/models.py (Diff revision 3)
       
       
      Show all issues

      Here too.

    6. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (9b137c5)