Skip to content

Commit 4a7f2f5

Browse files
committed
AI: Update writing headers
1 parent d719e6d commit 4a7f2f5

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

ai/documentation/reference/target-audience.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,16 @@ This names what's painful, then positions the feature as a solution.
103103

104104
### Headings
105105

106-
**Capability headings:**
107-
- "Declarative Templating"
108-
- "Integrated Styling"
109-
- "Event Handling"
110-
111-
**Problem-solution headings:**
112-
- "Templating Without String Manipulation"
113-
- "Styling That Actually Scopes"
114-
- "Events Without Boilerplate"
106+
For gateway page technical tours, use **simple capability keywords**:
107+
- "Templating", "Styling", "Events", "Keys"
108+
109+
These are scannable and act as navigation to subsections. Problem-solution framing belongs in the prose beneath them, not in the headers.
110+
111+
**In section prose (good):**
112+
> Vanilla Web Components typically require string concatenation... The templating system replaces this with declarative syntax.
113+
114+
**In headers (keep simple):**
115+
> ### Templating
115116
116117
---
117118

docs/src/pages/docs/guides/components/index2.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ Components work natively in React, Vue, Angular, or any framework that supports
3535

3636
Components defined with [`defineComponent`](/docs/guides/components/create) can register a `tagName` for direct HTML use, or export without one for use as [subtemplates](/docs/guides/templates/subtemplates) within other components.
3737

38-
## Defining Components
38+
## Key Features
39+
40+
### Defining Components
3941

4042
[`defineComponent`](/docs/guides/components/create) registers a standard custom element. All features (templating, state, events, styling) are configured in a single definition object:
4143

@@ -53,7 +55,7 @@ defineComponent({
5355
});
5456
```
5557

56-
## Templates, Not Strings
58+
### Templating
5759

5860
Vanilla Web Components typically require string concatenation or verbose `document.createElement` calls to render dynamic content. The [templating system](/docs/guides/templates) replaces this with declarative syntax: [expressions](/docs/guides/templates/expressions), [conditionals](/docs/guides/templates/conditionals), [loops](/docs/guides/templates/loops), and [slots](/docs/guides/templates/slots). Templates compile to an AST for efficient updates.
5961

@@ -70,7 +72,7 @@ Vanilla Web Components typically require string concatenation or verbose `docume
7072
{/each}
7173
```
7274

73-
## Styling That Scopes
75+
### Styling
7476

7577
Global CSS in component-based applications leads to specificity wars, naming conventions (BEM, CSS Modules), or build-time extraction. Shadow DOM provides true encapsulation, but working with it requires understanding CSS variable inheritance and `:host` selectors. The [styling system](/docs/guides/components/styling) handles this integration:
7678

@@ -88,7 +90,7 @@ Global CSS in component-based applications leads to specificity wars, naming con
8890
}
8991
```
9092

91-
## Events, No Boilerplate
93+
### Events
9294

9395
The standard `addEventListener` / `removeEventListener` pattern requires manual cleanup, doesn't support delegation naturally, and scatters event logic across lifecycle methods. [Declarative events](/docs/guides/components/events) bind handlers to selectors, support delegation, and clean up automatically:
9496

@@ -123,7 +125,7 @@ const createComponent = ({state, dispatchEvent}) => ({
123125
});
124126
```
125127

126-
## Keys That Scale
128+
### Keys
127129

128130
Implementing keyboard shortcuts typically means parsing `event.key`, tracking modifier state, and managing focus. [Declarative key bindings](/docs/guides/components/keys) handle combinations and sequences with automatic scope management:
129131

0 commit comments

Comments
 (0)