rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
5.98k stars 271 forks source link

Command pallete should have access to almost all ui actions #1132

Open Wumpf opened 1 year ago

Wumpf commented 1 year ago

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):

Stronger formalization of actions in the code like this will also make it easier in the future to add undo/redo!

emilk commented 7 months ago

Me and @nikolausWest discussed this a bit more today. There are some thoughts:

Summary

This issue is just a VERY rough outline. There is much to figure out when it comes to syntax.

The blank command palette

When you open the command palette, it should invite you to do one out of a few things:

Selections

There are many things we may want to be able to select:

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")?

Command order

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