Semantic Pattern Authoring
Use when
- A recurring migrated page shape needs a post-transform rewrite.
- The change should stay in
src/BlazorWebFormsComponents.Cli/SemanticPatterns/. - You need targeted tests instead of broad pipeline edits.
Pattern
- Match on post-transform markup/code-behind, not original Web Forms syntax.
- Keep wrapper extraction and markup surgery in subsystem-local helpers.
- Preserve explicit TODO markers for app-specific behavior that the CLI cannot safely infer.
- Prefer compile-safe SSR output over preserving non-runnable validator/postback trees.
- Add isolated tests that assert both pattern IDs and rewritten markup shape.
- For query-bound data pages, prefer
SelectMethod→SelectItemsscaffolds plus[SupplyParameterFromQuery]/[Parameter]component properties when the original Web Forms method relied on model-binding attributes. - For blank action pages, generate an SSR handler scaffold (
NavigationManager, query-bound properties, redirect target,OnParametersSetTODO) instead of leaving inert migrated HTML.
Current examples
pattern-query-details— rewrites query-string / route-dataSelectMethodpages to query-boundSelectItemsstubs withTODO(bwfc-query-details).pattern-action-pages— rewrites action-only redirect pages to SSR handler scaffolds withTODO(bwfc-action-pages).