Frontend changes for new `publish_and_archive` profile setting.

Review Request #14053 — Created July 24, 2024 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

When publishing reviews, we have an option for archiving the review request
after the review gets published.

These changes are part of a new profile setting which will allow user to have
their review requests automatically archived instead of having to click the
“… and archive the review request” button every time.

This means created a new class to standardize the different implementations
of the publish button and connecting it to backend changes to access the
publish_and_archive user setting.

New Jasmine tests were added to test publishButtonView functionality, checkboxes, and click actions.
Whole reviewboard test suite was run successfully.
Manually testing demonstrated that the changes looked and worked as intended.

Diff Revision 4

This is not the most recent revision of the diff. The latest diff is revision 7. See what's changed.

orig
1
2
3
4
5
6
7

Commits

First Last Summary ID Author
Created a new class to standardize the publish buttons across ReviewBoard.
Currently, there are 2 different versions of the publish review button in use. First, there is `UnifiedBannerView`, in which the publish button has its own class and includes dropdown checkboxes for archiving and sending emails. The second, in `ReviewDialogView`, the publish button is an html `MenuButtonView` that has dropdown buttons that are NOT checkboxes, which can publish and archive, or publish and send email, but not both. This new class will standardize the structure of the publish button, make it easily moddable, and make each publish button have checkboxes.
a387bdf247988d6692be9e92e2d41cfba6bf380e Daniel
Introduced new publishButton to reviewDialogView to add dropdown checkboxes.
These changes included making a new subclass of `PublishButtonView` called `RDPublishButtonView`, which obtains the reviewRequestEditor differently due to different models being passed into the `ReviewDialogView` and triggers a different function in `_action()` due to the previous publishing structure in `ReviewDialogView`. This new publish button replaces the old publish button, which did not have checkboxes, only action buttons. This change also meant that the arguments passed into `_saveReview()` could no longer be optional when saving and discarding.
29e3b4ce118d24d23a88479a42a7de946d916f22 Daniel
Created Jasmine Tests.
This commit has the new Jasmine Unit Tests for the PublishButtonView. They test each aspect of this new class, from appearance, to checkbox availablility, to actions.
0c3cee74dd14c9cd4c8d972cf74e5102cd81797b Daniel
This diff has been split across 5 pages: 1 2 3 4 5 >
reviewboard/staticbundles.py
reviewboard/accounts/managers.py
reviewboard/accounts/models.py
reviewboard/accounts/views.py
reviewboard/diffviewer/commit_utils.py
reviewboard/diffviewer/diffutils.py
reviewboard/diffviewer/filediff_creator.py
reviewboard/diffviewer/parser.py
reviewboard/diffviewer/views.py
reviewboard/diffviewer/tests/test_commit_utils.py
reviewboard/diffviewer/tests/test_diffutils.py
reviewboard/diffviewer/tests/test_filediff_creator.py
reviewboard/diffviewer/tests/test_forms.py
reviewboard/reviews/context.py
reviewboard/reviews/detail.py
reviewboard/reviews/managers.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/models/review_request_draft.py
reviewboard/reviews/templatetags/reviewtags.py
reviewboard/reviews/tests/test_file_attachment_review_ui.py
This diff has been split across 5 pages: 1 2 3 4 5 >
Loading...