Hi Sean,Thanks for this! I wanted a widget like this for a long time.Indeed, Ben worked on a similar idea, but I think your rendering works much better and your code is at the Morphic level. It would certainly be interesting to join forces here.I reviewed a bit your code. Here is what I liked:- I like it that you have explicit models for each section.- I like the rendering of the sections.- I like the Announcements.- I like the fluent API for defining results.Here is what I think could be improved:- Computing the result list should not block the UI (it can take long).- The amount of items in a section should be limited and if there are more of them they should be seen in a separate list or something like that. The idea would be to limit the vertical size of the widget.- The input text should be a field (so, no enter should be allowed).- The widget should be dismissible with Esc.- The list of results should not allow editing (it now does so).- Pressing the up/down arrows should move in the list. Any other typed character should continue modifying the text field area.- The first element in the list should be selected all the time. Like this, you can type and then press Enter without using arrows and the mouse.- "SpotlightCompletionExample open" does not seem work.
What do you say? I would be happy to review more code.Cheers,Doru
--On Mon, Dec 30, 2013 at 3:23 PM, Sean DeNigris <sean@clipperadams.com> wrote:
I needed an entry completion with groups, like Mac's Spotlight. While I was at it, I figured it would also be useful as a UI for the existing Spotlight. So I made a SpotlightMorph, which is a very Mac-like stand-alone Morph, which is a textField + results morph, and an adaptor for EntryCompetion, SpotlightEntryCompletion, which can be passed to #entryCompletion:A short screencast will be available at�https://vimeo.com/82953583 in about 45 minutes.And here's a screenshot for the impatient ;)To load (tested in Pharo 2.0 latest):� � Gofer itsmalltalkhubUser: 'SeanDeNigris' project: 'SeansPlayground';package: 'Spotlight';load.Then try:SpotlightCompletionExample open.orSpotlightMorphExample�exampleFileSearch.orSpotlightMorphExample�exampleSmalltalkSearch."Every thing has its own flow"