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.
The staged code introduces a new feature called "Metadata Diff" for the Power Platform VS Code extension.
What's Added?
Feature Gate (ecsFeatureGates.ts):
Adds a new feature flag EnableMetadataDiff to control the availability of the Metadata Diff feature.
Constants (Constants.ts):
Defines telemetry event names for initialization and error handling related to Metadata Diff.
Metadata Diff Initialization (MetadataDiff.ts):
Initializes the Metadata Diff feature based on the ECS feature flag.
Sets VS Code context (microsoft.powerplatform.pages.metadataDiffEnabled) to control UI visibility.
Logs telemetry events for initialization success or failure.
Tree Data Provider (MetadataDiffTreeDataProvider.ts):
Implements a VS Code Tree Data Provider to display file differences.
Recursively scans workspace files, creates backup copies, and mocks file changes for testing.
Builds a hierarchical tree structure representing changed files and folders.
Tree Items (MetadataDiffTreeItem.ts, MetadataDiffFileItem.ts, MetadataDiffFolderItem.ts):
Defines abstract and concrete classes for tree items representing files and folders.
Implements commands to open file diffs using VS Code's built-in diff viewer.
Extension Activation (extension.ts):
Registers the Metadata Diff Tree Data Provider with VS Code.
Initializes the Metadata Diff feature during extension activation.
Localization (package.nls.json, bundle.l10n.json):
Adds localized strings for the Metadata Diff feature.
Package Manifest (package.json):
Registers the new Metadata Diff view in the VS Code explorer.