4 ms·
> But why, why, why? Why can't native dropdowns have an integrated search? Search filtering requires UX/biz logic: - Do you search only the beginning of the s
by radley 7y ago
> But why, why, why? Why can't native dropdowns have an integrated search?
Search filtering requires UX/biz logic:
- Do you search only the beginning of the string or look for contained substrings?
- How do you prioritize results: whole-word matches or position of the substring?
- Do you highlight/bold the matching portion of the string?
- Spaces: ignore or include? Or search all results to see if spaces are relevant and if so, then use them...?
> With just a little bit of intelligence we could have controls that adapt to the offered choices: for example if < N show radio buttons, else show a dropdown, if too many - show a search box with auto-complete. Why is this so difficult?
You'd have the overhead of a search component just to show a couple of radio buttons.
- SamuelAdams 7y agoAdditionally: do you allow for words to be spelled incorrectly? People fat-finger things all the time, more so on mobile devices. Many pieces of software have this to some degree, see robots.txt as an example: https://github.com/google/robotstxt/blob/bacd8ba94b6d066ff6c0eb622b46bf655490994d/robots.cc#L691 https://github.com/google/robotstxt/blob/bacd8ba94b6d066ff6c...
- deleted 7y ago[deleted]
- dsego 7y ago> Search filtering requires UX/biz logic: I don't buy that some specific biz/ux logic is ever needed for a list of textual entries. We're not talking about a general search engine here. I imagine a simple heuristic could cover most of the cases (eg whatever c-f does). Also, the control can have additional params passed in to configure it differently when needed. Stuff like hightlight/bold (and even the matching rules) are imho either configurable or a system-specific implementation detail - like how macos dropdowns center on the selected item, or how on mobile a dropdown shows a modal scrolling interface, and so on.
- wruza 7y ago>- - - - Delegation. A control has simple defaults but may consult you if you provide a specific method. You don’t have to describe a complex behavior of say NSTableView beforehand, you just set yourself as its delegate and then decide at beforedraw-time which rows will be group rows, how to patch cell’s colors and fonts, etc. It is a very good part of desktop ui design. Web controls never delegate anything beyond trivial onaction=f(event).