Add folding ranges for documentation directives - #85725
Open
davidwengier wants to merge 2 commits into
Open
davidwengier wants to merge 2 commits into
davidwengier wants to merge 2 commits into
Conversation
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
akhera99
previously approved these changes
Sep 21, 2026
dibarbet
previously approved these changes
Sep 21, 2026
davidwengier
force-pushed
the
davidwengier/razor-doc-folding
branch
from
September 28, 2026 22:21
25d7979 to
e8bdcae
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation follows existing patterns and has adequate regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds folding support for Razor @documentation directives using the existing folding infrastructure.
Changes:
- Adds and exports a documentation folding provider.
- Adds standalone and combined directive endpoint tests.
| File | Description |
|---|---|
CohostFoldingRangeEndpointTest.cs |
Tests documentation folding in both hosts. |
RazorDocumentationFoldingProvider.cs |
Produces folding ranges for documentation directives. |
davidwengier
force-pushed
the
davidwengier/razor-doc-folding
branch
from
September 30, 2026 00:02
e8bdcae to
007d7cc
Compare
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: None
Copilot stopped reviewing on behalf of
davidwengier due to an error
September 30, 2026 00:23
davidwengier
force-pushed
the
davidwengier/razor-doc-folding
branch
from
October 4, 2026 21:30
007d7cc to
ebc6c7c
Compare
davidwengier
removed this pull request from stack #85729
October 4, 2026 21:37
Documentation blocks need their own folding behaviour without changing code-block folding. A dedicated provider follows the existing syntax-node provider pattern.
Exercise documentation and code blocks together so the new provider cannot quietly change existing folding. Run the same endpoint cases in both editor hosts.
davidwengier
force-pushed
the
davidwengier/razor-doc-folding
branch
from
October 4, 2026 22:16
ebc6c7c to
dd271dc
Compare
davidwengier
changed the base branch from
davidwengier/razor-doc-classification
to
main
October 4, 2026 22:19
davidwengier
dismissed stale reviews from dibarbet and akhera99
October 4, 2026 22:19
The base branch was changed.
Member
Author
This branch has not been deployed
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.
Adds a dedicated
RazorDocumentationFoldingProviderusing the existing syntax-node folding base.RazorCodeBlockFoldingProvideris unchanged.Based on #85724 (
davidwengier/razor-doc-classification). The first commit adds the provider; the second adds endpoint coverage for documentation on its own and alongside code blocks.The Remote project built with analysers before the test changes were added. The complete
CohostFoldingRangeEndpointTestclass passed in VS Code (net10.0, 28/28) and Visual Studio (net472, 28/28), with both new cases confirmed in the TRX results. Both changed files were formatted and exactly match the reviewed source.Microsoft Reviewers: Open in CodeFlow