Fix updates when publishing/discarding from the review dialog.

Review Request #12931 — Created April 3, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

The new review banner worked correctly when publishing or discarding
from the banner, but the page would fail to update correctly when
publishing or discarding from the review dialog.

This fix involved changes in two places:
1. In the unified banner, we listened to the destroyed signal for the
draft review instead of destroy. destroy is emitted too soon, and
gets handled before the model has reset its attributes.
2. In the review dialog, when publishing, we explicitly reload the page
at the end of the process.

Published and discarded reviews from the review dialog. Saw everything
update correctly.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix updates when publishing/discarding from the review dialog.
The new review banner worked correctly when publishing or discarding from the banner, but the page would fail to update correctly when publishing or discarding from the review dialog. This fix involved changes in two places: 1. In the unified banner, we listed to the `destroyed` signal for the draft review instead of `destroy`. `destroy` is emitted too soon, and gets handled before the model has reset its attributes. 2. In the review dialog, when publishing, we explicitly reload the page at the end of the process. Testing Done: Published and discarded reviews from the review dialog. Saw everything update correctly.
78b78509c41641c2b224d8a47e84fabbcbaf5fef David Trowbridge
reviewboard/static/rb/js/reviews/models/unifiedBanner.ts
reviewboard/static/rb/js/views/reviewDialogView.es6.js
Loading...