gridview-templatefield-regression
Protect BWFC GridView TemplateField migrations from collapsing into BoundField output or losing nested controls
适合你,如果正在迁移 BWFC GridView 模板字段并担心输出退化
/ 通过 npx 安装 校验哈希
npx oh-my-skill add fritzandfriends/blazorwebformscomponents/gridview-templatefield-regression/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- fritzandfriends/blazorwebformscomponents/gridview-templatefield-regression/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify fritzandfriends/blazorwebformscomponents/gridview-templatefield-regression安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
449GitHub stars
~368上下文体积 · 单文件
索引托管
怎么用
技能原文 SKILL.md
Context
Use this when changing the Web Forms to Blazor CLI markup pipeline anywhere near GridView column transforms, template context handling, data-binding expression rewrites, or asp-prefix stripping. TemplateField preservation is a cross-transform behavior, so regressions can appear even when each individual transform still looks correct in isolation.
Patterns
- Treat
TemplateFieldpreservation as an ordered pipeline contract: DisplayExpressionTransformAspPrefixTransformDataBindingAttributeTransformAttributeStripTransformGridViewColumnItemTypeTransformTemplateContextTransform- Keep regression coverage at two levels:
- Transform-only markup assertions through
TestHelpers.CreateDefaultPipeline(). - Full-file migration assertions through
MigrationPipeline.ExecuteAsync(). - Cover these GridView shapes explicitly:
- TemplateField with inner
TextBox - TemplateField with inner
CheckBox - TemplateField with inline display expression only
- Mixed
BoundField+TemplateFieldsiblings - GridView with only TemplateField columns
- Assert both preservation and non-regression:
- Expected
<TemplateField ...>count remains stable - Inner controls survive as BWFC components (
<TextBox>,<CheckBox>) ItemTemplate Context="Item"is present- No unexpected fallback
<BoundField>appears for template-only columns
Examples
tests/BlazorWebFormsComponents.Cli.Tests/TransformUnit/GridViewColumnItemTypeTransformTests.cstests/BlazorWebFormsComponents.Cli.Tests/PipelineIntegrationTests.cs
Anti-Patterns
- Testing only
GridViewColumnItemTypeTransformin isolation after changing template-related transforms. - Verifying only the first GridView column and assuming later TemplateField siblings survived.
- Accepting output that preserves the
TemplateFieldshell but drops nested controls or display expressions. - Changing transform order in
Program.cswithout mirroring the same coverage throughtests/BlazorWebFormsComponents.Cli.Tests/TestHelpers.cs.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…