Skip to content

Commit

Permalink
hook up navigation
Browse files Browse the repository at this point in the history
ok its kinda tied together now
  • Loading branch information
0xcaff committed Sep 25, 2024
1 parent 50054a2 commit 95cc573
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/viewer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,26 @@ impl SymbolDetailPane {
ui,
);

let mut pane_response = None;

let text_style = TextStyle::Body;
let row_height = ui.text_style_height(&text_style);
ScrollArea::vertical().show_rows(ui, row_height, matching.len(), |ui, row_range| {
ui.allocate_space(vec2(ui.available_width(), 0.));

for idx in row_range {
ui.label(format!("{:?}", idx));
let link_response = ui.link(format!("{:?}", idx));

if link_response.clicked() {
args.view_state.selected_span.replace(matching[idx].clone());

pane_response
.replace(PaneResponse::FocusPane(PaneKey::CurrentlySelectedSpanDetail));
}
}
});

None
pane_response
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/viewer/src/view_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl FoldSpansState {
}
}

#[derive(Clone)]
pub struct SelectedSpanMetadata {
pub thread_id: u64,
pub span_idx: usize,
Expand Down

0 comments on commit 95cc573

Please sign in to comment.