Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ applyTo: '**/*'

## Repository Overview

FAST (`@microsoft/fast`) is a Microsoft open-source monorepo for building W3C-standards-compliant Web Components. The core package is `@microsoft/fast-element` — a lightweight, performant Web Component authoring library. Additional packages provide routing and declarative HTML support.
FAST (`@microsoft/fast`) is a Microsoft open-source monorepo for building W3C-standards-compliant Web Components. The core package is `@microsoft/fast-element` — a lightweight, performant Web Component authoring library with a declarative HTML entrypoint. Additional packages provide routing plus declarative build and test tooling.

## Packages

Each package includes a DESIGN.md file, read that to gain a general understanding of the code for that package.

| Package | Status | Purpose |
|---|---|---|
| `@microsoft/fast-element` | Stable (v2) | Core Web Component library |
| `@microsoft/fast-html` | Alpha | Declarative HTML parser |
| `@microsoft/fast-element` | Stable (v2) | Core Web Component library, including declarative HTML via `@microsoft/fast-element/declarative.js` |
| `@microsoft/fast-router` | Alpha | Web Component router |
| `@microsoft/fast-build` | Prerelease | Declarative HTML server side renderer |
| `@microsoft/fast-test-harness` | Prerelease | Testing utilities for FASTElement components |
Expand Down
2 changes: 1 addition & 1 deletion .github/skills/shipping/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Use [conventional commit](https://www.conventionalcommits.org/) format for PR ti
Common types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `perf`.

Examples:
- `feat: add shadow DOM support to fast-html parser`
- `feat: add shadow DOM support to declarative templates`
- `fix: resolve memory leak in template binding`
- `chore: update dev dependencies`

Expand Down
26 changes: 13 additions & 13 deletions .github/skills/testing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ All commands are run from the **monorepo root**. Use `-w` to target a specific p
|---|---|
| Run all tests (all browsers) | `npm run test` |
| Run all tests (Chromium only) | `npm run test:chromium` |
| Test a single package (all browsers) | `npm run test -w @microsoft/fast-html` |
| Test a single package (Chromium only) | `npm run test:chromium -w @microsoft/fast-html` |
| Test a single package (all browsers) | `npm run test -w @microsoft/fast-element` |
| Test a single package (Chromium only) | `npm run test:chromium -w @microsoft/fast-element` |
| Test changed packages only | `npx lage test:node test:chromium --since origin/main` |

#### Interactive / debug workflows

For `@microsoft/fast-html`, these additional scripts are available:
For FAST declarative tests in `@microsoft/fast-element`, these additional scripts are available:

| Task | Command |
|---|---|
| Playwright UI mode | `npm run test:ui -w @microsoft/fast-html` |
| Start Vite dev server only | `npm run test-server -w @microsoft/fast-html` |
| Dev mode (watch + server) | `npm run dev -w @microsoft/fast-html` |
| Rebuild fixtures | `npm run build:fixtures -w @microsoft/fast-html` |
| Build fixtures with webui | `npm run build:fixtures:webui -w @microsoft/fast-html` |
| Run webui integration tests | `npm run test:webui-integration -w @microsoft/fast-html` |
| Playwright UI mode | `npm run test:ui:declarative -w @microsoft/fast-element` |
| Start Vite dev server only | `npm run test-server:declarative -w @microsoft/fast-element` |
| Dev mode (watch + server) | `npm run dev:declarative -w @microsoft/fast-element` |
| Rebuild fixtures | `npm run build:fixtures -w @microsoft/fast-element` |
| Build fixtures with webui | `npm run build:fixtures:webui -w @microsoft/fast-element` |
| Run webui integration tests | `npm run test:webui-integration -w @microsoft/fast-element` |

**Playwright UI mode** (`test:ui`) starts a visual test runner where you can select and debug individual tests, view traces, and inspect DOM snapshots.

Expand Down Expand Up @@ -80,7 +80,7 @@ A dedicated workflow for validating FAST's integration with `@microsoft/webui`.
The workflow builds all packages, installs Playwright Chromium, and runs:

```bash
npm run test:webui-integration -w @microsoft/fast-html
npm run test:webui-integration -w @microsoft/fast-element
```

This builds each fixture with `webui build --plugin=fast`, renders the protocol with the fixture's `state.json`, and runs the same Playwright specs against the webui-rendered output.
Expand All @@ -105,13 +105,13 @@ FAST tests are [Playwright](https://playwright.dev/) integration tests that run
- Fixture tests live inside their fixture directory: `test/fixtures/<category>/<feature>/<feature>.spec.ts`.
- Source-level tests are co-located next to the code they test: `src/<feature>/<feature>.pw.spec.ts`.

### Writing fixture tests for fast-html
### Writing declarative fixture tests

Fixture tests for `@microsoft/fast-html` are the primary way to verify declarative template features. Each fixture is a self-contained test case with its own HTML, state, templates, and component definitions.
Fixture tests in `@microsoft/fast-element/test/declarative/fixtures` are the primary way to verify declarative template features. Each fixture is a self-contained test case with its own HTML, state, templates, and component definitions.

For a complete guide on creating fixtures — including how to write `entry.html`, `state.json`, `templates.html`, `main.ts`, and spec files — see:

📄 **[Writing Fixtures](../../../packages/fast-html/test/fixtures/WRITING_FIXTURES.md)**
📄 **[Writing Fixtures](../../../packages/fast-element/test/declarative/fixtures/WRITING_FIXTURES.md)**

### Quick example

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-webui-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
run: npx playwright install --with-deps chromium

- name: Run WebUI integration tests
run: npm run test:webui-integration -w @microsoft/fast-html
run: npm run test:webui-integration -w @microsoft/fast-element
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Update fast-build documentation to reference the fast-element declarative HTML docs.",
"packageName": "@microsoft/fast-build",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Simplify fast-element declarative package documentation and test configuration without changing the published API.",
"packageName": "@microsoft/fast-element",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
7 changes: 7 additions & 0 deletions change/@microsoft-fast-element-move-declarative-html.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "Move declarative HTML APIs into @microsoft/fast-element/declarative.js and remove the @microsoft/fast-html package.",
"packageName": "@microsoft/fast-element",
"dependentChangeType": "none",
"email": "7559015+janechu@users.noreply.github.com"
}
7 changes: 0 additions & 7 deletions change/@microsoft-fast-html-1776500147.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 6 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/fast-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ All keys are optional. Only the following keys are allowed: `entry`, `state`, `o

## Template syntax

Template syntax follows the FAST declarative HTML format. See the [`@microsoft/fast-html` README](../fast-html/README.md) for full documentation on bindings, conditionals, repeats, and directives.
Template syntax follows the FAST declarative HTML format. See the
[`@microsoft/fast-element` declarative documentation](../fast-element/DECLARATIVE_HTML.md)
for full documentation on bindings, conditionals, repeats, and directives.
Loading
Loading