• 
      

    Make the New Review Request page a class-based view and optimize it.

    Review Request #9052 — Created July 5, 2017 and submitted

    Information

    Review Board
    release-3.0.x
    a692a08...

    Reviewers

    This converts the New Review Request page to a class-based view,
    allowing us to more easily extend the functionality of the page down the
    road while keeping the view maintainable (which will be helpful when we
    eventually add file browsing). It also substantially improves load times
    by reducing the work needed to load information on each repository.

    Previously, we needed to instantiate an instance of each repository's
    SCMTool in order to determine the capabilities of the SCMTool, as those
    capabilities were hidden behind methods on the instance. This isn't true
    anymore, except in the case of one method that would only be implemented
    by older custom SCMTools.

    We now look up the capability flags from the class, falling back to
    creating an instance only if needed. This means we don't have to
    initialize the SCMTool (possibly performing an HTTP request or logging
    into some service) for any SCMTools we ship, speeding up load times.

    Tested that the New Review Request page fully works as it did before,
    and that the SCMTools aren't initialized when loading the page.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (48c107a)