Add a setting for controlling whether to confirm a Ship It! review.
Review Request #14409 — Created April 29, 2025 and submitted — Latest diff uploaded
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 asettings:json
JSON Merge Patch of settings.
RB.UserSession
provides an endpoint for this as well. These currently
only accept this newconfirm_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.
reviewboard/accounts/models.py |
---|
reviewboard/accounts/forms/pages.py |
---|
reviewboard/static/rb/js/common/models/userSessionModel.ts |
---|