piker icon indicating copy to clipboard operation
piker copied to clipboard

Symbol search polish

Open goodboy opened this issue 4 years ago • 1 comments

#164 is our initial mult-provider search system that's faf, simple, and leverages our async machinery to da max 🏄🏼

Despite this being a good first draft there's still lots to fine tune. Consider this a follow up issue to that PR where we can discuss while testing further refinements mostly to UX and style.

Manual

Yeah we need to get this into the UI soon (for multiple modes not just search) but here's the low down:

  • to open the search list: ctl-space or ctrl-l
    • the state from last open will be maintained
  • to close the search list: ctrl-space (aka toggle) or ctrl-c
  • once open, type a pattern to match to provider symbols, they will appear in a per-provider results tree
  • to navigate search results use either ctrl-up/down arrow keys or ctrl-j/k (like in vim)
  • to nav search result provider-sections you can use ctrl-u/d for up/down
  • to select an entry (if it's not in the cache in which case it will switching automatically) use enter
    • feeds which are already cached in the chart's memory will automatically switch on selection
  • editting the search bar should be mostly as expected in default text editors (for now)
  • you can use the mouse press to select a result from the CompleterView

Wishlist

UX and style
  • [ ] would love to get a ctr-<mouse scroll> style going when the chart view has focus for that tru "gaming" feel 🕶️
  • [ ] character pattern highlighting in results entries
  • [ ] make QLineEdit cursor a rectangle with a nice contrasting color (like our bracket gray)
  • [ ] hotlists for personal positions across all assets/instruments
  • [ ] default hotlist from config (save this across chart sessions?)
  • [ ] hotlist for all instruments with active clearing engine triggers/orders/alerts
  • [ ] double the CompleterView as both watch list and scanner outputs that can be switched by searching appropriate user defined settings
  • [ ] man page embedded somehow in the UI
  • [ ] support for a meta section, likely splittered below the results output
backend specific
  • [ ] for ib unfortunately we need an ad-hoc futures / commodities / forex symbol set defined in the backend since they don't provide search for it; this needs to be added as a separate search task in ib's search routine
  • [ ] better cross-provider sorting? right now i'm thinking provider order should be determined from a provider.toml?
  • [ ] we need better sorting for some providers (eg. in kraken adausd will make a list with that exact match not at the top slot)

goodboy avatar May 27 '21 13:05 goodboy

url dump just in case:

https://doc.qt.io/qt-5/model-view-programming.html#handling-selections-in-item-views https://doc.qt.io/qt-5/modelview.html#3-2-working-with-selections https://doc.qt.io/qt-5/qabstractitemview.html#setCurrentIndex https://doc.qt.io/qt-5/qitemselectionmodel.html https://doc.qt.io/qt-5/qmodelindex.html https://doc.qt.io/qt-5/qitemselectionmodel.html#currentIndex https://doc.qt.io/qt-5/qstandarditem.html#index https://doc.qt.io/qt-5/qabstractitemmodel.html https://doc.qt.io/qt-5/model-view-programming.html#using-drag-and-drop-with-item-views https://stackoverflow.com/questions/28802763/highlight-item-with-mouse-hover-in-qtreeview https://doc.qt.io/qt-5/qsyntaxhighlighter.html https://github.com/qutebrowser/qutebrowser/blob/master/qutebrowser/completion/completiondelegate.py https://forum.qt.io/topic/61343/highlight-matched-substrings-in-qstyleditemdelegate/8

goodboy avatar May 27 '21 16:05 goodboy