Show breadcrumbs for untitled Markdown once outline exists#315386
Show breadcrumbs for untitled Markdown once outline exists#315386Copilot wants to merge 7 commits into
Conversation
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
|
@copilot This change will show empty line for files without symbols (see issues linked in the issue we are fixing). Can we avoid that (by checking for symbols?)? |
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Fixed in the latest commit. In |
|
@copilot will this make breadcrumb flash on an empty file? |
There was a problem hiding this comment.
Pull request overview
This PR enables breadcrumbs to work for unsaved untitled:// editors by allowing them through the IFileService.hasProvider(uri) guard so they can still participate in the breadcrumbs pipeline (primarily via outline/symbol breadcrumbs, since untitled resources have no file path crumbs).
Changes:
- Allow
untitled://URIs inBreadcrumbsControl.update()even when no file provider exists. - Adjust empty-breadcrumb behavior for untitled resources to hide the control until symbols are available.
- Add a unit test asserting untitled URIs produce no file-path breadcrumb elements in
BreadcrumbsModel.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts | Allows breadcrumbs for untitled:// resources and tweaks empty-state behavior. |
| src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts | Adds coverage for untitled URIs producing no file path crumbs. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 2
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
No flash. The previous code already avoided it — both |
|
@copilot seems like there are some comments on the PR |
…sposables; fix test URI path Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Both review comments addressed in the latest commit:
|
|
@copilot if I create untitled file, paste some markdown, switch language mode to Markdown -> I don't see a breadcrumb, but I see Outline populated |
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Untitled Markdown editors could show a populated Outline while breadcrumbs stayed hidden. The visibility logic treated all empty untitled breadcrumb states as “not displayable,” including the state after outline creation.
Behavioral change
Implementation
hasOutline()toBreadcrumbsModelas an explicit signal for outline availability.BreadcrumbsControlempty-items branch to gate untitled hiding on!model.hasOutline().Model coverage