adobe/brackets — pull request #3523 by njx (2013-04-21 01:39:38+00:00)
Title: Added search box to ExtensionManager dialog.

This adds filter-as-you-type functionality to the Extension Manager.

Some notes:
* Note that the view now has its own model (separate from Extension Manager) that manages the sorting and filtering of items within the view--this really seemed view-specific, not appropriate to go into the central Extension Manager code. The model still relies on the Extension Manager to do the actual fetching of the registry from the server.
* I didn't break the view model out as a separate file since it's really specific to the view--no one else should need to know much about it. Of course, I already broke that rule since the dialog knows about it :), but I think of the dialog as just a thin shell around the view. I'm happy to break the model out into a separate file if it's appropriate.
* I also didn't add unit tests for the dialog since the filtering functionality is tested on the model.
* This just does a full linear search on each keystroke. I added a task to the Trello card to stress-test this with a reasonable number of extensions. If it turns out to be slow, we can back it down to do the search on Enter instead.
* This doesn't highlight the found search string in each item. I wasn't clear on whether this was part of the criteria--need to check with @adrocknaphobia.
* The search box is actually in the outer dialog, not the view itself, just because it seemed to make more sense there in the current design. Once we get the final XD design, it's easy to move it wherever it needs to be, since it just calls a filter function on the view's model.