Port FloatingBannerView and ReviewReplyDraftBannerView to spina.

Review Request #12810 — Created Jan. 26, 2023 and submitted

david
Review Board
release-6.x
reviewboard

In order to be able to subclass the FloatingBannerView for the new
unified banner, we first need to update it to use TypeScript and spina.
This also required updating the ReviewReplyDraftBannerView to match.

  • Verified that review reply banners worked correctly.
  • Ran js-tests.
Summary
Port FloatingBannerView and ReviewReplyDraftBannerView to spina.
Description From Last Updated

Space before {

chipx86chipx86

This can use modelEvents: modelEvents = { 'saving destroying': ..., 'saved': ..., 'publishError': ..., }; Works just like events, so …

chipx86chipx86

Do we want to maybe move general UI stuff into a RB.UI namespace?

chipx86chipx86
david
chipx86
  1. 
      
  2. This can use modelEvents:

    modelEvents = {
        'saving destroying': ...,
        'saved': ...,
        'publishError': ...,
    };
    

    Works just like events, so it should be mappable to a function or to a () => ... if you want.

  3. reviewboard/static/rb/js/ui/index.ts (Diff revision 2)
     
     

    Do we want to maybe move general UI stuff into a RB.UI namespace?

    1. I was thinking about that, but we theoretically need to maintain compatibility with third parties who might rely on the existing RB.X names. I guess we could alias them?

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-6.x (2a2ae06)
Loading...