Shared space for New Review Experience Developer Notes. This is a place for us to share out some "gotchas" that may need to be considered later down the road when we integrate our work together since many parts of our projects overlap. In addition, if there is anything that you find that could be helpful to the team working on the New Review Experience, drop those things in here as well!
$.funcQueue('reviewForm').add(() => {
const reviewBanner = RB.DraftReviewBannerView.instance;
this.close();
if (reviewBanner) {
if (publish) {
reviewBanner.hideAndReload();
} else if (this.model.isNew() && !madeChanges) {
reviewBanner.hide();
} else {
reviewBanner.show();
}
}
});
This section of the code right now is used to show/hide the banner, but eventually this will all be handled in the unified banner. Since this is becoming the new Review Composer this code might be going away, but we'll need to keep an eye on how we handle this between the Unified Banner and the Review Composer.
_onDiscardClicked: function _onDiscardClicked() {
...
var $discardButton = $('<input type="button">').val(gettext('Discard')).click(function () {
_this9.close();
_this9.model.destroy({
success: function success() {
return RB.DraftReviewBannerView.instance.hideAndReload();
}
});
});
...
}
(Similar to above)
This section of the code right now is used to show/hide the banner, but eventually this will all be handled in the unified banner. Since this is becoming the new Review Composer we'll need to keep an eye on how we handle this between the Unified Banner and the Review Composer.