• Robert Knight's avatar
    Handle search updates directly within `TopBar` component · 2b52a5ae
    Robert Knight authored
    Instead of passing a `searchController` prop into `TopBar` which is
    responsible for reading and updating the search query, from different
    sources depending on whether this is the sidebar or stream, handle
    reading/updating the search from within `TopBar` itself:
    
     - In the sidebar, read/update the filter query in the store
     - In the stream, render a `StreamSearchInput` control which
       reads/updates the "$q" param from the Angular `$location` service
    
    This removes some indirection and makes it easier to follow where the
    search input gets its data from and what happens when it is changed.
    
    Also fix a bug where existing annotations were not cleared after a route
    change from `/a/:id` to `/stream?q={query}`.
    2b52a5ae
stream-search-input-test.js 1.71 KB