Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal control of views through SDK #1889

Closed
3 of 5 tasks
jleibs opened this issue Apr 18, 2023 · 2 comments
Closed
3 of 5 tasks

Minimal control of views through SDK #1889

jleibs opened this issue Apr 18, 2023 · 2 comments
Assignees
Labels
🟦 blueprint The data that defines our UI 💬 discussion ⛃ re_datastore affects the datastore itself 🎄 tracking issue issue that tracks a bunch of subissues ui concerns graphical user interface

Comments

@jleibs
Copy link
Member

jleibs commented Apr 18, 2023

The long-term goal for controlling the UI is introduction of a blueprint store for most UI state: https://github.com/rerun-io/rerun/blob/main/design/blueprint_store.md

However, we can create immediate value for users (in particular in a notebook context) with just a subset of the functionality from the RFC.

In order of priority:

  • Specify panel state (collapsed or expanded) for the 3 panels
  • Specify selected timeline
  • Specify whether to enable auto-view creation (this should be one of the first things logged; probably part of init?)
  • Specify views to be created (view name, space root, and list of entity paths)
  • Specify entity properties

Notably this does not try to tackle:

  • View Layout
  • Data queries / filters
  • Data-overrides / defaults

Proposed API:

# Trivial
rr.view.Spatial2D(origin="world/camera")

# Implies
rr.view.Spatial2D(origin="world/camera", contents="$origin/**")

EntityPathExpressionLike: (str, Sequence[str], EntityPathExpression)
Spatial2D(origin: str, contents: EntityPathExpressoinLike = "$origin/**")

# Which is syntactic sugar for:
entities = rr.view.EntityPathExpression("$origin/**")
rr.view.Spatial2D(origin="world/camera", contents=entities)

# With extra data
rr.view.Spatial2D(origin="world/camera", contents="+$origin/** +/world/points")

# Or for python formatter clarity, allow lists:
rr.view.Spatial2D(
    origin="world/camera",
    contents=[
        "+$origin/**",
        "+/",
    ],
)
@jleibs jleibs added ui concerns graphical user interface ⛃ re_datastore affects the datastore itself labels Apr 18, 2023
@emilk
Copy link
Member

emilk commented Apr 18, 2023

Let's get started on the design of this ASAP

  • What is the "entity path" of the selection panel?
  • What is the "entity path" of a view?
  • What happens if the UI set blueprint conflicts with the one set by the recording?
  • Needs SDK design too
  • Can we map the whole blueprint store to a nice JSON-like structure?
  • How do we override entity components via the blueprint store

Current design outline: https://github.com/rerun-io/rerun/blob/main/design/blueprint_store.md

@emilk emilk added the 🎄 tracking issue issue that tracks a bunch of subissues label Apr 18, 2023
@jleibs jleibs self-assigned this Apr 28, 2023
@emilk emilk added the 🟦 blueprint The data that defines our UI label May 16, 2023
@Wumpf Wumpf self-assigned this Feb 29, 2024
@jleibs jleibs closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI 💬 discussion ⛃ re_datastore affects the datastore itself 🎄 tracking issue issue that tracks a bunch of subissues ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

3 participants