microsoft / microsoft/WinAppVSCE
Refactor: Consider DOM-backed XML context detection for IntelliSense
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 3
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 11
Description
Summary
src/manifest-schema/xml-context.ts uses a large hand-rolled regex/state-machine XML parser for cursor context detection, while the rest of the codebase uses @xmldom/xmldom for DOM-based parsing.
Recommendation
Consider a hybrid approach: use DOM-backed context builder for the completed document prefix, and keep regex only for the incomplete current tag suffix where DOM parsing would fail.
Context
Found during PR review of #68 (AppxManifest IntelliSense feature). Note: the hand-rolled approach was chosen because IntelliSense needs to work with incomplete/malformed XML at the cursor position, which DOM parsers reject. A full rewrite is not trivial.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/manifest-schema/xml-context.ts and review PR #68 for the existing AppxManifest IntelliSense context-detection requirements. Understand how the current regex/state-machine handles incomplete XML and how @xmldom/xmldom is used elsewhere; done requires an agreed, validated hybrid design that preserves cursor-context detection for malformed or incomplete input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100