decred / dcrdex

The Decred Decentralized Exchange (DEX), powered by atomic-swaps.
Other
187 stars 97 forks source link

client: console-based UI ideas #80

Closed chappjc closed 3 years ago

chappjc commented 5 years ago

The client app will need a reasonably powerful UI to be useful. This means:

  1. one or more menus for choosing actions
  2. a subdivided terminal window
  3. tables (buy and sell book, user's own orders, market trade history)
  4. charts (rudimentary text-based depth chart, and perhaps a market history).

Some resources for accomplishing this:

Note that zkclient uses some kind of terminal UI, but I have not looked to see what it is.

chappjc commented 4 years ago

Some screen captures from several different projects for inspiration:

image

image

image

image

image

image

chappjc commented 4 years ago

Regarding dependencies of the UI packages, fewer dependencies are better of course, but I do not care about test-only dependencies, only the dependencies that are used in the product.

JoeGruffins commented 4 years ago

anyway, deps:

https://github.com/gizak/termui ``` github.com/gizak/termui/v3 |-fmt |-errors |-internal/reflectlite |-runtime |-internal/bytealg |-internal/cpu |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-unsafe |-internal/fmtsort |-sort |-io |-sync/atomic |-os |-internal/oserror |-internal/poll |-internal/syscall/unix |-internal/testlog |-syscall |-internal/race |-time |-strconv |-math/bits |-unicode/utf8 |-github.com/gizak/termui/v3/drawille |-github.com/mattn/go-runewidth |-regexp |-bytes |-regexp/syntax |-unicode |-github.com/mitchellh/go-wordwrap |-github.com/nsf/termbox-go |-encoding/binary |-encoding/hex |-io/ioutil |-path/filepath |-os/signal |-image |-bufio |-image/color |-math |-reflect |-strings |-sync ```
https://github.com/mum4k/termdash ``` github.com/mum4k/termdash |-context |-internal/reflectlite |-runtime |-internal/bytealg |-internal/cpu |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-unsafe |-errors |-fmt |-internal/fmtsort |-sort |-io |-sync/atomic |-math |-math/bits |-os |-internal/oserror |-internal/poll |-internal/syscall/unix |-internal/testlog |-syscall |-internal/race |-reflect |-unicode |-strconv |-unicode/utf8 |-github.com/mum4k/termdash/container |-github.com/mum4k/termdash/align |-github.com/mum4k/termdash/cell |-github.com/mum4k/termdash/internal/alignfor |-github.com/mum4k/termdash/internal/runewidth |-github.com/mattn/go-runewidth |-regexp |-bytes |-regexp/syntax |-github.com/mum4k/termdash/internal/wrap |-github.com/mum4k/termdash/internal/canvas/buffer |-strings |-github.com/mum4k/termdash/internal/area |-github.com/mum4k/termdash/internal/numbers |-github.com/mum4k/termdash/internal/button |-github.com/mum4k/termdash/internal/canvas |-github.com/mum4k/termdash/internal/draw |-github.com/mum4k/termdash/internal/canvas/braille |-github.com/mum4k/termdash/internal/numbers/trig |-github.com/mum4k/termdash/linestyle |-github.com/mum4k/termdash/mouse |-github.com/mum4k/termdash/widgetapi |-image |-bufio |-image/color |-github.com/mum4k/termdash/internal/event |-github.com/mum4k/termdash/internal/event/eventqueue |-github.com/mum4k/termdash/terminal/terminalapi |-github.com/mum4k/termdash/keyboard |-sync |-time ```
https://github.com/gcla/gowid ``` github.com/gcla/gowid |-fmt |-errors |-internal/reflectlite |-runtime |-internal/bytealg |-internal/cpu |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-unsafe |-internal/fmtsort |-sort |-math |-math/bits |-reflect |-unicode |-github.com/gcla/gowid/gwutil |-runtime/pprof |-bufio |-bytes |-compress/gzip |-compress/flate |-hash/crc32 |-hash |-context |-encoding/binary |-io/ioutil |-text/tabwriter |-github.com/gdamore/tcell |-github.com/gdamore/encoding |-github.com/gdamore/tcell/terminfo |-github.com/gdamore/tcell/terminfo/base |-github.com/gdamore/tcell/terminfo/a/ansi |-github.com/gdamore/tcell/terminfo/v/vt100 |-github.com/gdamore/tcell/terminfo/v/vt102 |-github.com/gdamore/tcell/terminfo/v/vt220 |-github.com/gdamore/tcell/terminfo/x/xterm |-github.com/gdamore/tcell/terminfo/dynamic |-os/exec |-github.com/gdamore/tcell/terminfo/extended |-github.com/gdamore/tcell/terminfo/a/adm3a |-github.com/gdamore/tcell/terminfo/a/aixterm |-github.com/gdamore/tcell/terminfo/a/alacritty |-github.com/gdamore/tcell/terminfo/a/aterm |-github.com/gdamore/tcell/terminfo/b/beterm |-github.com/gdamore/tcell/terminfo/b/bsdos_pc |-github.com/gdamore/tcell/terminfo/c/cygwin |-github.com/gdamore/tcell/terminfo/d/d200 |-github.com/gdamore/tcell/terminfo/d/d210 |-github.com/gdamore/tcell/terminfo/d/dtterm |-github.com/gdamore/tcell/terminfo/e/emacs |-github.com/gdamore/tcell/terminfo/e/eterm |-github.com/gdamore/tcell/terminfo/g/gnome |-github.com/gdamore/tcell/terminfo/h/hpterm |-github.com/gdamore/tcell/terminfo/h/hz1500 |-github.com/gdamore/tcell/terminfo/k/konsole |-github.com/gdamore/tcell/terminfo/k/kterm |-github.com/gdamore/tcell/terminfo/l/linux |-github.com/gdamore/tcell/terminfo/p/pcansi |-github.com/gdamore/tcell/terminfo/r/rxvt |-github.com/gdamore/tcell/terminfo/s/screen |-github.com/gdamore/tcell/terminfo/s/simpleterm |-github.com/gdamore/tcell/terminfo/s/sun |-github.com/gdamore/tcell/terminfo/t/termite |-github.com/gdamore/tcell/terminfo/t/tvi910 |-github.com/gdamore/tcell/terminfo/t/tvi912 |-github.com/gdamore/tcell/terminfo/t/tvi921 |-github.com/gdamore/tcell/terminfo/t/tvi925 |-github.com/gdamore/tcell/terminfo/t/tvi950 |-github.com/gdamore/tcell/terminfo/t/tvi970 |-github.com/gdamore/tcell/terminfo/v/vt320 |-github.com/gdamore/tcell/terminfo/v/vt400 |-github.com/gdamore/tcell/terminfo/v/vt420 |-github.com/gdamore/tcell/terminfo/v/vt52 |-github.com/gdamore/tcell/terminfo/w/wy50 |-github.com/gdamore/tcell/terminfo/w/wy60 |-github.com/gdamore/tcell/terminfo/w/wy99_ansi |-github.com/gdamore/tcell/terminfo/x/xfce |-github.com/gdamore/tcell/terminfo/x/xnuppc |-github.com/gdamore/tcell/terminfo/x/xterm_kitty |-golang.org/x/sys/unix |-golang.org/x/text/encoding |-golang.org/x/text/encoding/internal/identifier |-golang.org/x/text/transform |-os/signal |-syscall |-internal/oserror |-internal/race |-github.com/hashicorp/golang-lru |-github.com/hashicorp/golang-lru/simplelru |-container/list |-github.com/lucasb-eyer/go-colorful |-database/sql/driver |-image/color |-math/rand |-github.com/mattn/go-runewidth |-github.com/pkg/errors |-path |-github.com/sirupsen/logrus |-encoding/json |-encoding |-encoding/base64 |-unicode/utf16 |-log |-sync/atomic |-io |-os |-internal/poll |-internal/syscall/unix |-internal/testlog |-path/filepath |-regexp |-regexp/syntax |-runtime/debug |-strconv |-strings |-sync |-time |-unicode/utf8 ```
https://github.com/marcusolsson/tui-go ``` github.com/marcusolsson/tui-go |-bytes |-errors |-internal/reflectlite |-runtime |-internal/cpu |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-unsafe |-internal/bytealg |-io |-sync |-internal/race |-sync/atomic |-unicode |-fmt |-internal/fmtsort |-sort |-math |-math/bits |-os |-internal/oserror |-internal/poll |-internal/syscall/unix |-internal/testlog |-syscall |-time |-reflect |-github.com/gdamore/tcell |-github.com/gdamore/encoding |-github.com/gdamore/tcell/terminfo |-github.com/gdamore/tcell/terminfo/base |-github.com/gdamore/tcell/terminfo/a/ansi |-github.com/gdamore/tcell/terminfo/v/vt100 |-github.com/gdamore/tcell/terminfo/v/vt102 |-github.com/gdamore/tcell/terminfo/v/vt220 |-github.com/gdamore/tcell/terminfo/x/xterm |-github.com/gdamore/tcell/terminfo/dynamic |-os/exec |-context |-path/filepath |-regexp |-regexp/syntax |-github.com/gdamore/tcell/terminfo/extended |-github.com/gdamore/tcell/terminfo/a/adm3a |-github.com/gdamore/tcell/terminfo/a/aixterm |-github.com/gdamore/tcell/terminfo/a/alacritty |-github.com/gdamore/tcell/terminfo/a/aterm |-github.com/gdamore/tcell/terminfo/b/beterm |-github.com/gdamore/tcell/terminfo/b/bsdos_pc |-github.com/gdamore/tcell/terminfo/c/cygwin |-github.com/gdamore/tcell/terminfo/d/d200 |-github.com/gdamore/tcell/terminfo/d/d210 |-github.com/gdamore/tcell/terminfo/d/dtterm |-github.com/gdamore/tcell/terminfo/e/emacs |-github.com/gdamore/tcell/terminfo/e/eterm |-github.com/gdamore/tcell/terminfo/g/gnome |-github.com/gdamore/tcell/terminfo/h/hpterm |-github.com/gdamore/tcell/terminfo/h/hz1500 |-github.com/gdamore/tcell/terminfo/k/konsole |-github.com/gdamore/tcell/terminfo/k/kterm |-github.com/gdamore/tcell/terminfo/l/linux |-github.com/gdamore/tcell/terminfo/p/pcansi |-github.com/gdamore/tcell/terminfo/r/rxvt |-github.com/gdamore/tcell/terminfo/s/screen |-github.com/gdamore/tcell/terminfo/s/simpleterm |-github.com/gdamore/tcell/terminfo/s/sun |-github.com/gdamore/tcell/terminfo/t/termite |-github.com/gdamore/tcell/terminfo/t/tvi910 |-github.com/gdamore/tcell/terminfo/t/tvi912 |-github.com/gdamore/tcell/terminfo/t/tvi921 |-github.com/gdamore/tcell/terminfo/t/tvi925 |-github.com/gdamore/tcell/terminfo/t/tvi950 |-github.com/gdamore/tcell/terminfo/t/tvi970 |-github.com/gdamore/tcell/terminfo/v/vt320 |-github.com/gdamore/tcell/terminfo/v/vt400 |-github.com/gdamore/tcell/terminfo/v/vt420 |-github.com/gdamore/tcell/terminfo/v/vt52 |-github.com/gdamore/tcell/terminfo/w/wy50 |-github.com/gdamore/tcell/terminfo/w/wy60 |-github.com/gdamore/tcell/terminfo/w/wy99_ansi |-github.com/gdamore/tcell/terminfo/x/xfce |-github.com/gdamore/tcell/terminfo/x/xnuppc |-github.com/gdamore/tcell/terminfo/x/xterm_kitty |-github.com/lucasb-eyer/go-colorful |-database/sql/driver |-image/color |-math/rand |-golang.org/x/sys/unix |-encoding/binary |-golang.org/x/text/encoding |-golang.org/x/text/encoding/internal/identifier |-golang.org/x/text/transform |-os/signal |-github.com/marcusolsson/tui-go/wordwrap |-github.com/mattn/go-runewidth |-github.com/mitchellh/go-wordwrap |-image |-bufio |-io/ioutil |-log |-strconv |-strings |-unicode/utf8 ```
https://github.com/jroimartin/gocui ``` github.com/jroimartin/gocui |-bytes |-internal/bytealg |-internal/cpu |-unsafe |-unicode |-unicode/utf8 |-errors |-internal/reflectlite |-runtime |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-github.com/nsf/termbox-go |-encoding/binary |-math |-math/bits |-reflect |-sync |-internal/race |-sync/atomic |-encoding/hex |-fmt |-internal/fmtsort |-sort |-github.com/mattn/go-runewidth |-regexp |-regexp/syntax |-io/ioutil |-path/filepath |-os |-internal/oserror |-internal/poll |-internal/syscall/unix |-internal/testlog |-os/signal |-syscall |-time |-io |-strconv |-strings ```
https://github.com/rivo/tview ``` github.com/rivo/tview |-bytes |-errors |-internal/reflectlite |-runtime |-internal/cpu |-runtime/internal/atomic |-runtime/internal/math |-runtime/internal/sys |-unsafe |-internal/bytealg |-unicode |-fmt |-internal/fmtsort |-os |-internal/oserror |-internal/poll |-internal/syscall/unix |-internal/testlog |-sync/atomic |-syscall |-internal/race |-time |-reflect |-github.com/gdamore/tcell |-github.com/gdamore/encoding |-github.com/gdamore/tcell/terminfo |-github.com/gdamore/tcell/terminfo/base |-github.com/gdamore/tcell/terminfo/a/ansi |-github.com/gdamore/tcell/terminfo/v/vt100 |-github.com/gdamore/tcell/terminfo/v/vt102 |-github.com/gdamore/tcell/terminfo/v/vt220 |-github.com/gdamore/tcell/terminfo/x/xterm |-github.com/gdamore/tcell/terminfo/dynamic |-os/exec |-context |-path/filepath |-github.com/gdamore/tcell/terminfo/extended |-github.com/gdamore/tcell/terminfo/a/adm3a |-github.com/gdamore/tcell/terminfo/a/aixterm |-github.com/gdamore/tcell/terminfo/a/alacritty |-github.com/gdamore/tcell/terminfo/a/aterm |-github.com/gdamore/tcell/terminfo/b/beterm |-github.com/gdamore/tcell/terminfo/b/bsdos_pc |-github.com/gdamore/tcell/terminfo/c/cygwin |-github.com/gdamore/tcell/terminfo/d/d200 |-github.com/gdamore/tcell/terminfo/d/d210 |-github.com/gdamore/tcell/terminfo/d/dtterm |-github.com/gdamore/tcell/terminfo/e/emacs |-github.com/gdamore/tcell/terminfo/e/eterm |-github.com/gdamore/tcell/terminfo/g/gnome |-github.com/gdamore/tcell/terminfo/h/hpterm |-github.com/gdamore/tcell/terminfo/h/hz1500 |-github.com/gdamore/tcell/terminfo/k/konsole |-github.com/gdamore/tcell/terminfo/k/kterm |-github.com/gdamore/tcell/terminfo/l/linux |-github.com/gdamore/tcell/terminfo/p/pcansi |-github.com/gdamore/tcell/terminfo/r/rxvt |-github.com/gdamore/tcell/terminfo/s/screen |-github.com/gdamore/tcell/terminfo/s/simpleterm |-github.com/gdamore/tcell/terminfo/s/sun |-github.com/gdamore/tcell/terminfo/t/termite |-github.com/gdamore/tcell/terminfo/t/tvi910 |-github.com/gdamore/tcell/terminfo/t/tvi912 |-github.com/gdamore/tcell/terminfo/t/tvi921 |-github.com/gdamore/tcell/terminfo/t/tvi925 |-github.com/gdamore/tcell/terminfo/t/tvi950 |-github.com/gdamore/tcell/terminfo/t/tvi970 |-github.com/gdamore/tcell/terminfo/v/vt320 |-github.com/gdamore/tcell/terminfo/v/vt400 |-github.com/gdamore/tcell/terminfo/v/vt420 |-github.com/gdamore/tcell/terminfo/v/vt52 |-github.com/gdamore/tcell/terminfo/w/wy50 |-github.com/gdamore/tcell/terminfo/w/wy60 |-github.com/gdamore/tcell/terminfo/w/wy99_ansi |-github.com/gdamore/tcell/terminfo/x/xfce |-github.com/gdamore/tcell/terminfo/x/xnuppc |-github.com/gdamore/tcell/terminfo/x/xterm_kitty |-golang.org/x/sys/unix |-encoding/binary |-golang.org/x/text/encoding |-golang.org/x/text/encoding/internal/identifier |-golang.org/x/text/transform |-os/signal |-github.com/lucasb-eyer/go-colorful |-database/sql/driver |-image/color |-math/rand |-github.com/mattn/go-runewidth |-github.com/rivo/uniseg |-io |-math |-math/bits |-regexp |-regexp/syntax |-sort |-strconv |-strings |-sync |-unicode/utf8 ```
JoeGruffins commented 4 years ago

I think that we should go with termdash. Reasons being:

chappjc commented 4 years ago

Great!. termdash should work, although "newest comment ~ 6 months" generally doesn't count as a good sign in my book. Let's just refrain from using those horrible buttons in termdash. :)

JoeGruffins commented 4 years ago

buttons....

buck54321 commented 4 years ago

Resolved by #100.

JoeGruffins commented 4 years ago

@chappjc can be closed?