-
Notifications
You must be signed in to change notification settings - Fork 366
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
Add selection hierarchy breadcrumbs #8319
Merged
Merged
Changes from 39 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
dffaeb1
Always show an item, even if it is not found
emilk ef61c69
Refactor `ItemTitle`
emilk 3fa7e02
Do not use Debug-formatting in user-facing strings
emilk 8406c68
Fix: make sure selected list items show up as such
emilk 3436f82
Implement selection heading contents manuallt
emilk 7e8886a
Better titles on hover
emilk 482d77b
Add breadcrumbs for containers and views
emilk 18a6983
Better file naming
emilk f593c82
Breadcrumbs for component paths
emilk a925b3f
Add bread crumbs for component paths and instance paths from streams
emilk 5d79a96
Better parenting
emilk 5e4c2d3
Break up long functions
emilk 509e058
Fix warnings
emilk 093f8f1
More niceties
emilk 671906b
Dimmer breadcrumb colors
emilk 9276e85
Move `DataResultNodeOrPath` into its own file
emilk 238d353
MOAR CRUMBS
emilk ad865bf
Fix origin-relative space view paths
emilk c56d4b1
Handle projections
emilk 5c21dfa
Cleanup
emilk a73f012
Cleanup
emilk ddd3ff4
fix spacing and add a TODO
emilk 6fd2d5a
Remove icon from final item
emilk 86c1ed8
Same separator icon for all crumbs
emilk 4744d65
Remove "in view" from data results (you can see it from the crumbs)
emilk 75bf9e6
Color tweaks
emilk d53baa2
Nicer tooltip
emilk 79bcc4e
Better tooltips
emilk 8b2ec7c
Make instance number clickable
emilk 60fcb3e
Show icons sometimes
emilk c558169
Fix extra indentation
emilk 06ed243
Change TODO
emilk 9b4998c
Update Cargo.lock
emilk 16635df
Merge branch 'main' into emilk/breadcrumbs
emilk 87964e3
Fix some TODOs
emilk 73a2bfe
Add incstance number to selected instance path
emilk 70b30da
Fix ListItem jitter when we change selections
emilk 3b0e7cc
Merge branch 'main' into emilk/breadcrumbs
emilk ab4c9bb
Merge branch 'main' into emilk/breadcrumbs
emilk 2b8ecb2
Remove ItemTitle re-export
emilk da81026
Better fix for selected listitem color
emilk 53b5687
Add TODO
emilk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,30 +62,43 @@ pub fn entity_path_parts_buttons( | |
space_view_id: Option<SpaceViewId>, | ||
entity_path: &EntityPath, | ||
) -> egui::Response { | ||
let with_icon = false; // too much noise with icons in a path | ||
let with_individual_icons = false; // too much noise with icons in a path | ||
|
||
ui.horizontal(|ui| { | ||
ui.spacing_mut().item_spacing.x = 2.0; | ||
{ | ||
ui.spacing_mut().item_spacing.x = 2.0; | ||
|
||
// Show one single icon up-front instead: | ||
let instance_path = InstancePath::entity_all(entity_path.clone()); | ||
ui.add(instance_path_icon(&query.timeline(), db, &instance_path).as_image()); | ||
// The last part points to the selected entity, but that's ugly, so remove the highlight: | ||
let visuals = ui.visuals_mut(); | ||
visuals.selection.bg_fill = egui::Color32::TRANSPARENT; | ||
visuals.selection.stroke = visuals.widgets.inactive.fg_stroke; | ||
} | ||
|
||
let mut accumulated = Vec::new(); | ||
for part in entity_path.iter() { | ||
accumulated.push(part.clone()); | ||
if !with_individual_icons { | ||
// Show one single icon up-front instead: | ||
let instance_path = InstancePath::entity_all(entity_path.clone()); | ||
ui.add(instance_path_icon(&query.timeline(), db, &instance_path).as_image()); | ||
} | ||
|
||
if entity_path.is_root() { | ||
ui.strong("/"); | ||
Comment on lines
+83
to
84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We used to show nothing if the root was selected |
||
instance_path_button_to_ex( | ||
ctx, | ||
query, | ||
db, | ||
ui, | ||
space_view_id, | ||
&InstancePath::entity_all(accumulated.clone().into()), | ||
part.syntax_highlighted(ui.style()), | ||
with_icon, | ||
); | ||
} else { | ||
let mut accumulated = Vec::new(); | ||
for part in entity_path.iter() { | ||
accumulated.push(part.clone()); | ||
|
||
ui.strong("/"); | ||
instance_path_button_to_ex( | ||
ctx, | ||
query, | ||
db, | ||
ui, | ||
space_view_id, | ||
&InstancePath::entity_all(accumulated.clone().into()), | ||
part.syntax_highlighted(ui.style()), | ||
with_individual_icons, | ||
); | ||
} | ||
} | ||
}) | ||
.response | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this scope serve a purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really - it is just a logical grouping, and reducing the scope of variables, thus lessoning the mental overhead