Open Wumpf opened 1 year ago
Me and @nikolausWest discussed this a bit more today. There are some thoughts:
space_view:3d add
(list of entities shown)$selection
(list of commands for the selection are shown).rrd
)..rrd
filesCommand
enum for basically every GUI interactionThis issue is just a VERY rough outline. There is much to figure out when it comes to syntax.
When you open the command palette, it should invite you to do one out of a few things:
There are many things we may want to be able to select:
world/foo:Color[#123]
world/3d
Some commands require multiple arguments, e.g. "add world/**
to space-view 3d
" should be expressible in the command palette.
How do we differentiate what is beeing selected? Do we prefix? E.g. DataStore:world/*
vs Blueprint:spaceviews/3d
? Put everything in the same entity path hierarchy ("everything is an entity path")?
Consider the command for adding entities to some space view.
It could be viewed as one function with two arguments: add_entities_to_space_view world/** 3d
. This will create a very large number of commands, with no context awareness of what is currently selected.
It is probably better with a more object-oriented design, where we have a list of functions that is dependent on the preceeding object (like obj.member()
functions in OO languages): space_view:3d add_entities world/**
. For symmetry, we should probably also support entity:world/** add_to space_view:3d
.
We should also allow using the current selection in any command, at least in the first position
$selection add_to space_view:3d
$selection add_entities world/**
We need to make the command pallete much more powerful and much easier to integrate in almost all aspects of the viewer. To achieve that we need to (among other things):
Command
in https://github.com/rerun-io/rerun/blob/main/crates/re_ui/src/command.rs)Stronger formalization of actions in the code like this will also make it easier in the future to add undo/redo!