Convert the sidebar to react.
Review Request #9557 — Created Jan. 31, 2018 and submitted
This change converts the SidebarView to use react internally. This is
mostly a very straightforward change.
The only unusual part of this change is the shim between react-router
and Backbone.Router. For now, we're using react-router's
components, but intercepting click events and redirecting them back to
window.application.go()function. This triggers the existing
routes properly. We also have a handler for when the route changes in
Backbone to mirror that back into react-router's history object. Once
the other views have been converted (or at least wrapped), the
<Router>component can be moved into the application view, and we can
get rid of the special route handling and just rely on react for all of
- Verified that the sidebar items loaded correctly for a variety of
- Checked that the correct item was highlighted based on the route.
- Checked that item highlighting updated correctly even when routes were
triggered from elsewhere in the UI (such as the "All Users" list).