Skip to content

Commit

Permalink
Fix secondary plot components ignoring blueprint defaults (#7302)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored Aug 28, 2024
1 parent dc462a8 commit cfdb233
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ impl SeriesLineSystem {
})
}

if let Some(all_color_chunks) = results.get_required_chunks(&Color::name()) {
{
let all_color_chunks = results.get_optional_chunks(&Color::name());
if all_color_chunks.len() == 1 && all_color_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let color = all_color_chunks[0]
.iter_primitive::<u32>(&Color::name())
Expand Down Expand Up @@ -337,12 +338,12 @@ impl SeriesLineSystem {

debug_assert_eq!(StrokeWidth::arrow_datatype(), ArrowDatatype::Float32);

if let Some(all_stroke_width_chunks) =
results.get_required_chunks(&StrokeWidth::name())
{
let all_stroke_width_chunks = results.get_optional_chunks(&StrokeWidth::name());

if all_stroke_width_chunks.len() == 1 && all_stroke_width_chunks[0].is_static()
{
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let stroke_width = all_stroke_width_chunks[0]
.iter_primitive::<f32>(&StrokeWidth::name())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ impl SeriesPointSystem {
})
}

if let Some(all_color_chunks) = results.get_required_chunks(&Color::name()) {
{
let all_color_chunks = results.get_optional_chunks(&Color::name());

if all_color_chunks.len() == 1 && all_color_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let color = all_color_chunks[0]
.iter_primitive::<u32>(&Color::name())
Expand Down Expand Up @@ -353,11 +355,11 @@ impl SeriesPointSystem {

debug_assert_eq!(MarkerSize::arrow_datatype(), ArrowDatatype::Float32);

if let Some(all_marker_size_chunks) =
results.get_required_chunks(&MarkerSize::name())
{
let all_marker_size_chunks = results.get_optional_chunks(&MarkerSize::name());

if all_marker_size_chunks.len() == 1 && all_marker_size_chunks[0].is_static() {
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let marker_size = all_marker_size_chunks[0]
.iter_primitive::<f32>(&MarkerSize::name())
Expand Down Expand Up @@ -401,13 +403,14 @@ impl SeriesPointSystem {
{
re_tracing::profile_scope!("fill marker shapes");

if let Some(all_marker_shapes_chunks) =
results.get_required_chunks(&MarkerShape::name())
{
let all_marker_shapes_chunks =
results.get_optional_chunks(&MarkerShape::name());

if all_marker_shapes_chunks.len() == 1
&& all_marker_shapes_chunks[0].is_static()
{
re_tracing::profile_scope!("override fast path");
re_tracing::profile_scope!("override/default fast path");

let marker_shape = all_marker_shapes_chunks[0]
.iter_component::<MarkerShape>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ def blueprint() -> rrb.BlueprintLike:
),
]
),
rrb.BlueprintPanel(state="collapsed"),
rrb.TimePanel(state="collapsed"),
rrb.SelectionPanel(state="collapsed"),
# NOTE: It looks nice but it's very annoying when going through several checklists.
# rrb.BlueprintPanel(state="collapsed"),
# rrb.TimePanel(state="collapsed"),
# rrb.SelectionPanel(state="collapsed"),
)


Expand Down
7 changes: 4 additions & 3 deletions tests/python/release_checklist/check_range_partial_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def blueprint() -> rrb.BlueprintLike:
],
grid_columns=3,
),
rrb.BlueprintPanel(state="collapsed"),
rrb.TimePanel(state="collapsed"),
rrb.SelectionPanel(state="collapsed"),
# NOTE: It looks nice but it's very annoying when going through several checklists.
# rrb.BlueprintPanel(state="collapsed"),
# rrb.TimePanel(state="collapsed"),
# rrb.SelectionPanel(state="collapsed"),
)


Expand Down

0 comments on commit cfdb233

Please sign in to comment.