Hi, I'd like to continue working on refining this feature over the weekend, but don't want to add more to this already big patch. Is this patch ready to go into mainline ?
-h On 12 February 2014 00:34, Henner Zeller <[email protected]> wrote: > Hi, > Choosing components in the schematics editor is very cumbersome right now. > > Some examples: > - Search does a substring search, then shows a list of components that have > that substring. If you search for a capacitor 'C' or resistor 'R', this is > somewhere in a huge list you have to scroll through as the alphabetically > list has it somewhere in the middle. > > - The search-result is a separate window that distractingly pops up. If > there > was no match, no selection happens and we're silently dropped back in the > schematic editor. If you don't know the exact term you have to search for > or > have typos, these round-trips are very frustrating. > > - Keyword search is a separate button. Why not part of the search ? > > - It is almost impossible to discover components that are in the > library, as the > search and refine is not interactive and give very little clue about > description and keywords. > > Anyway, for me as a new user, this is very painful (probably you can get > used to it, but it will still slow you down). > > So I sat down and thought about how it _should_ be. > > This is what I came up with, see patch: > > - interactive search-as-you-type: a text input in which you can refine a > query by adding search terms and see the result-list narrow down. > The best match is at the top and can just be accepted with 'enter'. > (No wildcards necessary, just type space separated terms) > > - Scoring: the 'best' match is in the front. A search for 'C' or 'R' > brings up the > capacitor or resistor to the very top as it is an exact match for a > component in the library. Prefix-matches are scored higher than > substrings etc. This will give you most components you search for with > a couple of key-strokes interactively narrowing down the search. > > - Matches in Keywords and descriptions are part of the same search. > > - The result list contains part of the description of the component, for the > selected component, the full description and keywords are shown. This > helps to better choose components. > > - The 'history' functionality is very similar to like before, it is > just a toplevel > node (always unfolded) in the tree. It is improved as the last used > component is pre-selected, so you can just get it with 'enter'. > > - In general, it is easy to operate this dialog with the keyboard for quick > results. > > There is another feature I'd like to add in a separate patch: show a little > drawing of the currently selected component in the left bottom corner > (left blank right now) when selected with the mouse popping up the library > viewer. I left it as a dummy in this patch as I didn't want to make it too > big. > > Also choosing a sub-gate should be possible as well, but is not handled > in this ui yet. > > Anyway, just try it: patch this into your local source and play with it. > For instance, you want to see all flip-flops the 74er series has to offer ? > Your search term would narrow it down with '74 flip'. Press 'enter' to > select or navigate with the cursor keys to select the right one. > Search for a PLL in the 40er series ? Search for 'pll' (top result, just press > 'Enter' to select) or 'pll 40' to exacly narrow down to a single component. > > I tried to follow all style guide parts and let uncrustify have a look as > well, > so the patch should be fairly 'clean' regarding the style-guide. > Please be gentle with a newcomer-patch :) > Of course, you might have suggestions - let me know what to improve. > (Feature tweaks are probably better handled in smaller followup patches) > The patch looks quite big, but this is mostly due to wxbuilder-generated code. > But I should probably stop adding more stuff to it and iterate from here. > > View patch here: > https://github.com/hzeller/kicad/compare/master...component-chooser-experiment#files_bucket > > Download it here: > https://github.com/hzeller/kicad/compare/master...component-chooser-experiment.diff > > Thanks, > -henner _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

