Add omnibar breadcrumb and search bar above the decompiled code#3786
Open
christophwille wants to merge 2 commits into
Open
Add omnibar breadcrumb and search bar above the decompiled code#3786christophwille wants to merge 2 commits into
christophwille wants to merge 2 commits into
Conversation
ILSpy showed the current location only implicitly in the tree selection and kept search in a separate docked pane. The omnibar, modelled on the Files community app and jiripolasek's EditorBar, puts an address-bar atop each decompiler document: a breadcrumb of the node (Assembly > Namespace > Type > Member) whose segments navigate and whose chevrons list child nodes, turning into a search box on typing that reuses the existing search engine. It coexists with the docked search pane and ships off by default behind the Options / Display 'Tab options' EnableOmnibar toggle, which applies live. Assisted-by: Claude:claude-opus-4-8:Claude Code
When a breadcrumb path was longer than the bar, the Simple theme's horizontal
scrollbar appeared in a reserved layout row inside the 28px bar: it shifted the
crumbs up when it showed and covered more than half the bar's height.
Three ways to handle the overflow were considered:
1. Collapse the head into an "..." overflow dropdown (leading crumbs fold into
a left button; the deepest crumbs stay visible) - the Windows Explorer / VS
nav-bar / Files behaviour.
2. Hide the scrollbar entirely and scroll the trail with the mouse wheel,
keeping the current-node end visible.
3. [CHOSEN] A thin, auto-hiding overlay scrollbar that draws over the content
(reserves no height, so nothing shifts) and fades in only when the path
overflows and the pointer is over the bar.
Avalonia's Simple ScrollViewer reserves an Auto grid row for the horizontal
scrollbar and its ScrollBar has no auto-hide, so the overlay is built here: the
breadcrumb's built-in bar is hidden (no reserved row, no shift) and a thin,
button-less ScrollBar is layered at the bottom, bound to the viewer's Offset,
ScrollBarMaximum, and Viewport via small Vector/Size converters. It fades in on
pointer-over and the mouse wheel scrolls the trail horizontally.
Assisted-by: Claude:claude-opus-4-8:Claude Code
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Want to test? Grab CI bits from https://github.com/icsharpcode/ILSpy/actions/workflows/build-ilspy.yml?query=branch%3Aomnibar
Omnibar
Adds an omnibar at the top of each decompiler document view: a breadcrumb of the current node that turns into a search box when you type. Modelled on the Files community app's omnibar and jiripolasek's EditorBar, but shaped for a decompiler rather than a generic file manager.
Behaviour
Assembly > Namespace > Type > Memberwith each node's real icon. Clicking a crumb selects that node in the tree. Each crumb that has children carries a chevron that opens a filterable dropdown of its child nodes for fast lateral navigation; leaf crumbs (methods, fields, ...) omit the chevron.Ctrl+L) switches to a query box with an inline suggestions dropdown. It reuses the existing search engine (RunningSearch, theICSharpCode.ILSpyX.Searchstrategies,AvaloniaSearchResultFactory), capped to the best matches.Down/Enter/Esckeyboard flow;Ctrl+Enter/middle-click open in a new tab. Activating a result navigates and returns to the breadcrumb.It coexists with the docked Search pane (which remains the place for the full, sortable result list).
Off by default
Ships behind a new Options / Display -> "Tab options" -> "Show omnibar (breadcrumb / search bar) above the decompiled code" toggle (
DisplaySettings.EnableOmnibar, default off). The toggle applies live (no re-decompile) and is classified inDisplaySettingReactionsso the coverage test stays green.Implementation
ILSpy/Controls/Omnibar/—OmnibarUserControl +OmnibarViewModel(per document tab, not MEF-shared) + smallBreadcrumbSegment/OmnibarModetypes. Services are resolved lazily from the composition host, mirroringSearchPaneModel.DecompilerTextView(docked above the editor); the view pushes its current node into the bar and gatesCtrl+L/ visibility on the setting.App.axamlfor light and dark.Tests
Headless
ILSpy.Tests/Controls/tests cover breadcrumb building (Assembly > Namespace > Type > Member, root excluded), leaf-vs-container chevron, segment navigation, search/breadcrumb mode toggling, and the default-off / live-reveal setting. FullILSpy.Testssuite is green.Screenshots
Breadcrumb and search faces (light theme):
Breadcrumb:
System.Linq > {} System.Linq > Enumerable > Empty<TResult>()with per-segment chevrons and a trailing search affordance; the trailing method crumb correctly has no chevron.Search: magnifier + query + clear button, with an inline suggestions list (icon, name, right-aligned location).
Note: it is off by default:
🤖 Generated with Claude Code