Skip to content

Commit fcb1775

Browse files
authored
[Blazor] Improve AGENTS.md for Components area (#64630)
* Renames AGENTS.MD to AGENTS.md (apparently the casing matters?) * Added a components.instructions.md to point to AGENTS.md as a fallback just in case.
1 parent c8d47d3 commit fcb1775

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@
4040
* On Linux/Mac: `source activate.sh` (from repository root)
4141
* If not in the repository root, navigate there first or use the full path to the activation script.
4242
* This ensures that the correct version of .NET SDK is used for the repository.
43+
44+
## ASP.NET Core Components Area
45+
* When working on issues under the src/Components area, follow the instructions in [./instructions/components.instructions.md](./instructions/components.instructions.md).
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description: Instructions for folder 'src\Components'
3+
applyTo: "src/Components/**"
4+
---
5+
6+
Follow the instructions in [src/Components/AGENTS.md](../../src/Components/AGENTS.md) when working on issues in the Components area.

src/Components/AGENTS.MD renamed to src/Components/AGENTS.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22

33
This guide provides step-by-step instructions for working on issues in the ASP.NET Core Components area.
44

5-
## Working on New Features
5+
## Working on issues
6+
7+
You MUST follow this workflow when implementing new features or fixing bugs in the Components area.
8+
* Add the workflow to your `todos` and follow it strictly.
9+
- Create a sample scenario.
10+
- If working on a bug, use playwright to reproduce the behavior/problem first.
11+
- You MUST have reproduced the problem before attempting to fix it.
12+
- Research the problem area using the microsoft docs, existing code, git history, and logging on the sample project.
13+
- Implement the fix or feature in the sample project first.
14+
- Test the fix or feature interactively using Playwright.
15+
- Once the fix or feature is validated in the sample, implement E2E tests for it.
16+
- When you create an E2E test. First execute it interactively with Playwright.
17+
- If an E2E test is failing, debug it by running the test server manually and navigating to the scenario in a browser.
18+
- Only after the E2E tests are passing, remove the sample code you added in the Samples projects.
19+
- Use `git checkout` and `git clean -fd` to remove the sample code.
620

721
### Overview
822

@@ -36,7 +50,7 @@ The `src/Components/Samples` folder contains several sample projects you can use
3650

3751
5. **Implement E2E tests** - Only after the sample is validated, implement E2E tests for it.
3852

39-
6. **Clean up sample code** - After your E2E tests are passing, remove the sample code you added to the Samples projects. The sample was only for development and interactive testing; the E2E tests now provide the permanent test coverage.
53+
6. **Clean up sample code** - After your E2E tests are passing, remove the sample code you added to the Samples projects. The sample was only for development and interactive testing; the E2E tests now provide the permanent test coverage. Use `git checkout -- src/Components/Samples` and `git clean -df -- src/Components/Samples` to remove the sample code.
4054

4155
## Build Tips
4256

0 commit comments

Comments
 (0)