Skip to content

Commit

Permalink
hof/tui: work on the help text a bit (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm authored Sep 11, 2023
1 parent 22f8c79 commit 37d23e2
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions lib/tui/modules/eval/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ const EvalHelpText = `
[lime]A-O[-] toggle item borders
[dodgerblue::bu]Navigation:[-::-]
(with mouse)
[darkgray](with mouse)[-]
[lime]click[-] to focus any box
(with arrows)
[darkgray](with arrows)[-]
[lime]C-<left>[-] focus item left
[lime]C-<down>[-] focus item down
[lime]C-<up>[-] focus item up
[lime]C-<right>[-] focus item right
(vim style)
[darkgray](vim style)[-]
[lime]A-h[-] focus item left
[lime]A-j[-] focus item down
[lime]A-k[-] focus item up
Expand All @@ -60,6 +60,8 @@ const EvalHelpText = `
Items contain widgets and data sources, and are
controlled through the command box ([lime]C-<space>[-]).
[darkgray]The [dodgerblue]Command Box[darkgray] will modify the [gold]Item[darkgray] currently or last focused.[-]
Currently, the following items are available, many more to come.
[gold]Value View[-] explore a single CUE value as a tree or code
Expand All @@ -70,6 +72,7 @@ const EvalHelpText = `
[violet]play[-] open a fresh [gold]Playground[-]
[violet]play (args)[-] open a [gold]Playground[-] with data
[violet]view (args)[-] open a [gold]Value View[-] with data
[violet]conn (args)[-] connect [gold]CUE Widget[-] values
[violet]help[-] open these help contents
[dodgerblue::bu]Items:[-::-]
Expand All @@ -89,24 +92,22 @@ const EvalHelpText = `
[gold]Playground[-] is a multi-widget Item for working with CUE.
You can edit CUE and see the results in real-time, with optional scope.
The widgets in the playground are:
1. a browser for the scope (if available)
2. an editor for the main value
3. a browser for the final value
[darkgray]1. [gold]viewer[-] for the [lightseagreen]scope[-] (if available)
[darkgray]2. [gold]editor[-] for the [lightseagreen]main[-] value
[darkgray]3. [gold]viewer[-] for the [lightseagreen]final[-] value
[lime]A-f[-] Rotate this item (lowercase of Panel hotkey)
[lime]A-R[-] Reload data source and refresh
[lime]A-S[-] Toggle scope usage
[lime]A-f[-] [lightseagreen]Rotate[-] this item (lowercase of Panel rotate hotkey)
[lime]A-R[-] [lightseagreen]Reload[-] data source and refresh
[lime]A-S[-] [lightseagreen]Toggle[-] scope usage and hide viewer
[gold]Scope[-] is extra CUE and/or data that your edited CUE value
will be evaluated with, as the scope or context. This is
often used to load your CUE and data, and then explore or
modify it with more CUE. This is especially helpful for
building CUE that will transform or collect larger values
into smaller or new values. You have full access to CUE.
will be evaluated with, as the scope or context. This is used to
load CUE and data, and then explore or modify it with more CUE.
The scope can come from any of the sources, including other widgets.
[dodgerblue::bu]Commands:[-::-]
Items and widgets are controlled through the command box ([lime]C-<space>[-]).
Items and widgets are controlled through the [dodgerblue]Command Box[-] ([lime]C-<space>[-]).
First, make sure the item you want to change is focused (by [lime]clicking[-] on it).
The general format for commands is as follows.
Expand All @@ -116,7 +117,7 @@ const EvalHelpText = `
[violet]<command> [lightseagreen]<eval args and flags> [-](same as cue and hof)
[violet]<command> [lightseagreen]https://... [-](any http json response)
[violet]<command> [lightseagreen]bash <args...> [-](any bash json output)
[violet]<command> [lightseagreen]item <panel.to.item> [-](dot path to item)
[violet]<command> [lightseagreen]conn <path> <expr> [-](dot path to item, optional expr)
[gold]Item Commands[-] [darkgray](these create new widgets)[-]
[violet]<item>[-] [lightseagreen]<data>[-] same as [violet]<item> value[-]
Expand Down

0 comments on commit 37d23e2

Please sign in to comment.