Skip to content

Commit

Permalink
collapse panels on all view examples, add screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed May 13, 2024
1 parent ddbc6ee commit 95d9e02
Show file tree
Hide file tree
Showing 28 changed files with 158 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A bar chart view.
///
/// \example views/bar_chart title="Use a blueprint to create a BarChartView."
/// \example views/bar_chart title="Use a blueprint to create a BarChartView." image="https://static.rerun.io/bar_chart_view/74fa45af3c7310b51cd283c37439ed8f8ca9356d/1200w.png"
table BarChartView (
"attr.rerun.view_identifier": "BarChart"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A Spatial 2D view.
///
/// \example views/spatial2d title="Use a blueprint to customize a Spatial2DView."
/// \example views/spatial2d title="Use a blueprint to customize a Spatial2DView." image="https://static.rerun.io/spatial2d_view/71cee4d17d570d42e0d2be56d3e074d1f60f044c/1200w.png"
table Spatial2DView (
"attr.rerun.view_identifier": "2D"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A Spatial 3D view.
///
/// \example views/spatial3d title="Use a blueprint to customize a Spatial3DView."
/// \example views/spatial3d title="Use a blueprint to customize a Spatial3DView." image="https://static.rerun.io/spatial3d_view/9f21738776c759e6c6ef2fd0732333509ecbbcc5/1200w.png"
table Spatial3DView (
"attr.rerun.view_identifier": "3D"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A tensor view.
///
/// \example views/tensor title="Use a blueprint to create a TensorView."
/// \example views/tensor title="Use a blueprint to create a TensorView." image="https://static.rerun.io/tensor_view/3b452ace3cdb29ada1a613eae8e8e8e165a1d396/1200w.png"
table TensorView (
"attr.rerun.view_identifier": "Tensor"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A text document view.
///
/// \example views/text_document title="Use a blueprint to show a text document."
/// \example views/text_document title="Use a blueprint to show a text document." image="https://static.rerun.io/text_document_view/309a6ee6fe2b22335bc1ce06492e34f9f72179da/1200w.png"
table TextDocumentView (
"attr.rerun.view_identifier": "TextDocument"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A text log view.
///
/// \example views/text_log title="Use a blueprint to show a TextLogView."
/// \example views/text_log title="Use a blueprint to show a TextLogView." image="https://static.rerun.io/text_log_view/f9ad7f3346605fdfe8ddf920d730907ac7f73900/1200w.png"
table TextLogView (
"attr.rerun.view_identifier": "TextLog"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace rerun.blueprint.views;

/// A time series view.
///
/// \example views/timeseries title="Use a blueprint to customize a TimeSeriesView."
/// \example views/timeseries title="Use a blueprint to customize a TimeSeriesView." image="https://static.rerun.io/timeseries_view/c87150647feb413627fdb8563afe33b39d7dbf57/1200w.png"
table TimeSeriesView (
"attr.rerun.view_identifier": "TimeSeries"
) {
Expand Down
8 changes: 8 additions & 0 deletions docs/content/reference/types/views/bar_chart_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/spatial2d_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/spatial3d_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/tensor_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/text_document_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/text_log_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/content/reference/types/views/time_series_view.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/snippets/all/views/bar_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
rr.log("tensor", rr.Tensor([8, 4, 0, 9, 1, 4, 1, 6, 9, 0]))

# Create a bar chart view to display the chart.
blueprint = rrb.Blueprint(rrb.BarChartView(origin="/bar_chart", name="Bar Chart"))
blueprint = rrb.Blueprint(rrb.BarChartView(origin="tensor", name="Bar Chart"), collapse_panels=True)

rr.send_blueprint(blueprint)
3 changes: 2 additions & 1 deletion docs/snippets/all/views/spatial2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
# Note that this range is smaller than the range of the points,
# so some points will not be visible.
visual_bounds=rrb.VisualBounds(x_range=[-5, 5], y_range=[-5, 5]),
)
),
collapse_panels=True,
)

rr.send_blueprint(blueprint)
6 changes: 4 additions & 2 deletions docs/snippets/all/views/spatial3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
rrb.Spatial3DView(
origin="/points",
name="3D Points",
background=[80, 80, 80],
)
# Set the background color to light blue.
background=[100, 149, 237],
),
collapse_panels=True,
)

rr.send_blueprint(blueprint)
4 changes: 2 additions & 2 deletions docs/snippets/all/views/tensor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Use a blueprint to show a tensor view."""

import numpy as np
import rerun as rr
import rerun.blueprint as rrb
import numpy as np

rr.init("rerun_example_tensor", spawn=True)

Expand All @@ -12,6 +12,6 @@
rr.log("tensors/two", rr.Tensor(tensor_two))

# Create a tensor view that displays both tensors (you can switch between them inside the view).
blueprint = rrb.Blueprint(rrb.TensorView(origin="/tensors", name="Tensors"))
blueprint = rrb.Blueprint(rrb.TensorView(origin="/tensors", name="Tensors"), collapse_panels=True)

rr.send_blueprint(blueprint)
2 changes: 1 addition & 1 deletion docs/snippets/all/views/text_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
)

# Create a text view that displays the markdown.
blueprint = rrb.Blueprint(rrb.TextDocumentView(origin="markdown", name="Markdown example"))
blueprint = rrb.Blueprint(rrb.TextDocumentView(origin="markdown", name="Markdown example"), collapse_panels=True)

rr.send_blueprint(blueprint)
7 changes: 4 additions & 3 deletions docs/snippets/all/views/text_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
rr.log("log/status", rr.TextLog("Application started.", level=rr.TextLogLevel.INFO))
rr.set_time_sequence("time", 5)
rr.log("log/other", rr.TextLog("A warning.", level=rr.TextLogLevel.WARN))
rr.set_time_sequence("time", 10)
rr.log("log/status", rr.TextLog("Application ended.", level=rr.TextLogLevel.INFO))
for i in range(10):
rr.set_time_sequence("time", i)
rr.log("log/status", rr.TextLog(f"Processing item {i}.", level=rr.TextLogLevel.INFO))

# Create a text view that displays all logs.
blueprint = rrb.Blueprint(rrb.TextLogView(origin="/log", name="Text Logs"))
blueprint = rrb.Blueprint(rrb.TextLogView(origin="/log", name="Text Logs"), collapse_panels=True)

rr.send_blueprint(blueprint)
3 changes: 2 additions & 1 deletion docs/snippets/all/views/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
end=rrb.TimeRangeBoundary.infinite(),
),
],
)
),
collapse_panels=True,
)

rr.send_blueprint(blueprint)
11 changes: 10 additions & 1 deletion rerun_py/rerun_sdk/rerun/blueprint/views/bar_chart_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion rerun_py/rerun_sdk/rerun/blueprint/views/spatial2d_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions rerun_py/rerun_sdk/rerun/blueprint/views/spatial3d_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions rerun_py/rerun_sdk/rerun/blueprint/views/tensor_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion rerun_py/rerun_sdk/rerun/blueprint/views/text_document_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions rerun_py/rerun_sdk/rerun/blueprint/views/text_log_view.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 95d9e02

Please sign in to comment.