Commit graph

4 commits

Author SHA1 Message Date
Profpatsch
50cf1e1a88 chore(users/Profpatsch/struct-edit): factor out non-val enumeration
This will be needed to factor the current cursor position into vals.

Change-Id: I73635b13c29b6b8925c68005c8db1c4dda93f15d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2865
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-04-23 18:30:06 +00:00
Profpatsch
77840fba2c fix(users/Profpatsch/struct-edit): change arrow keys
Since items are aligned per-line, it makes more intuitive sense to use
up/down for previous/next item, and left to go up and right to go
down.

Change-Id: I6bc33bd4e6e8f9fb245d252ca063dfabf972147d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2864
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-04-23 18:30:06 +00:00
Profpatsch
f57f1e4489 feat(users/Profpatsch/struct-edit): add support for maps
This makes it possible to pipe json dicts to the program and fully
navigate them.

Change-Id: I18dd8683d6f00c8ea967eb0c8dc89d1e0735fbcb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2863
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-04-23 18:30:06 +00:00
Profpatsch
22a8bf93f7 feat(users/Profpatsch/struct-edit): initial version
A take at a TUI-based structural editor, which should eventually read
a type definition of a structure and some values, and build a GUI to
edit it.

So far you can only pipe it some restricted json (lists, strings and
floats) and “navigate” through the structure with the arrow keys.

Change-Id: I7c8546459ff86c766fc03723f732c7d9f863ceaa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2862
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-04-23 18:30:06 +00:00