Fix our approach to mixing in classes in BaseResource and ReviewReply.

Review Request #12902 — Created March 21, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

RB.BaseResource and RB.ReviewReply both mix in other classes, but
were doing so after the call to .extend(). This meant that the mixin
wasn't part of the original state going into the prototype. While not a
problem in Backbone, it does impact Spina, as the wrong prototype ends
up being used.

This change fixes up these two classes to apply mixins the same way that
other classes do, inline in a call to .extend().

Unit tests pass.

Tested this with the in-progress Spina 2 work, which supports .extend().

Summary ID
Fix our approach to mixing in classes in BaseResource and ReviewReply.
`RB.BaseResource` and `RB.ReviewReply` both mix in other classes, but were doing so after the call to `.extend()`. This meant that the mixin wasn't part of the original state going into the prototype. While not a problem in Backbone, it does impact Spina, as the wrong prototype ends up being used. This change fixes up these two classes to apply mixins the same way that other classes do, inline in a call to `.extend()`.
5cf8ed18dbbbebb147b17b29a9b46d764650e908
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (e8b97d6)