CommunityToolkit / CommunityToolkit/Tooling-Windows-Submodule

Auto-format displayed XAML for sample source code

Open
#83 2 comments 0 reactions 0 assignees View on GitHub
enhancement sample app 🖼
Dominant language
C#
Stars
55
Forks
19
Avg merge
40m
Merged PRs (30d)
1

Description

# Problem

Source code for each sample is bundled into the final app output. This step is done manually, with one exception: UWP in release mode.

Under release mode, UWP already emits the XAML source files, but these files are slightly different than the original, with extra whitespace and an added `x:ConnectionId`.

The whitespace is especially problematic, as it breaks formatting and makes the XAML hard to read.

See this example: (click to expand)

![image](https://user-images.githubusercontent.com/9384894/160197346-3fc43c6e-5150-42a0-9c4b-5ab5e2cef936.png)

# Solution
Rather than spending the time trying to custom emit these files to a different location, we can simply use a XAML formatter to fix the whitespace issue while unifying the formatting for all samples.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named in the issue; start by locating the tooling step that bundles or emits sample source, especially the UWP release-mode XAML path. Done means the generated XAML for all samples uses a consistent formatter and no longer contains the problematic extra whitespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.