|
2 | 2 | alwaysApply: true |
3 | 3 | --- |
4 | 4 |
|
| 5 | +## Naming Convention |
| 6 | + |
| 7 | +Files: `YYYY-MM-DD-vX.Y-short-description.md` |
| 8 | + |
| 9 | +## Frontmatter |
| 10 | + |
| 11 | +- Title format: `vX.Y: Feature1, Feature2, Feature3` or `vX.Y Feature-focused Title` |
| 12 | +- Include `releases` tag plus relevant feature tags from [tags.yml](./tags.yml) |
| 13 | +- `draft: true` for unpublished/WIP posts |
| 14 | + |
5 | 15 | ## Structure |
6 | 16 |
|
7 | | -1. **Summary section** (before `<!--truncate-->`) |
8 | | - - Lead with most impactful changes |
9 | | - - Group related items into logical sections |
10 | | - - List breaking changes with links to migration sections |
11 | | - - Use bullet lists for quick scanning |
| 17 | +1. **Summary section** (before `<!-- truncate -->`) |
| 18 | + - Lead with most impactful changes (new platforms, major features) |
| 19 | + - Group related items using conceptual categories (see below) |
| 20 | + - End with **Breaking Changes** as labeled section with anchor links to migration |
| 21 | + - Use bullet lists and `<Link>` button to migration guide |
| 22 | + - Include short code snippet if it demonstrates the key feature |
12 | 23 |
|
13 | | -2. **`<!--truncate-->`** - Marks preview cutoff |
| 24 | +2. **`<!-- truncate -->`** - Marks preview cutoff |
14 | 25 |
|
15 | 26 | 3. **Detailed sections** (after truncate) |
16 | | - - Expand on summary items with examples |
17 | | - - Group related changes under shared headers |
18 | | - - End with Migration Guide for breaking changes |
19 | | - - Close with "Upgrade support" linking to Discord/GitHub issues |
| 27 | + - Choose organizational strategy based on release scope: |
| 28 | + - **By Category**: For platform/ecosystem releases (e.g., Platforms → API → Types → Migration) |
| 29 | + - **By Concept**: For API-focused releases (e.g., Queryable → schema.Query → controller.get → useQuery) |
| 30 | + - **By Package**: For multi-package coordinated changes (e.g., @data-client/react → @data-client/rest) |
| 31 | + - Within each section: explanation → code example → PR/commit links |
| 32 | + - End with Migration Guide, then "Upgrade support" |
| 33 | + |
| 34 | +## Conceptual Categories |
| 35 | + |
| 36 | +Align content with the repo's layered architecture: |
| 37 | + |
| 38 | +| Category | Package Layer | Examples | |
| 39 | +|----------|--------------|----------| |
| 40 | +| **Platforms/Environments** | Integration | NextJS, Expo, React Native, Vue, React versions | |
| 41 | +| **Hooks/Composables** | react, vue | useSuspense, useQuery, useLive, useCache | |
| 42 | +| **Controller Methods** | core | controller.fetch, controller.set, controller.get | |
| 43 | +| **Schema/Data Modeling** | normalizr, endpoint | Entity, Collection, Query, Queryable, Union | |
| 44 | +| **REST/Endpoint** | rest | Resource, RestEndpoint, path patterns | |
| 45 | +| **Performance** | core | Benchmarks, caching, memoization | |
| 46 | +| **Package Consolidation** | any | Subpath exports replacing separate packages | |
| 47 | +| **Internal/Low-level** | normalizr, core | State structure, normalization internals | |
| 48 | +| **Typing** | all | TypeScript improvements | |
| 49 | +| **Fixes** | all | Bug fixes | |
| 50 | + |
| 51 | +## Section Ordering |
| 52 | + |
| 53 | +**Summary (before truncate):** |
| 54 | +1. Platforms/major features (highest visibility) |
| 55 | +2. Package consolidations (import path changes) |
| 56 | +3. New APIs (hooks, controller methods) |
| 57 | +4. Other Improvements (bulleted list) |
| 58 | +5. Breaking Changes (with migration anchor links) |
| 59 | + |
| 60 | +**Details (after truncate):** |
| 61 | +1. Major features (with demos: `<StackBlitz>`, `<HooksPlayground>`) |
| 62 | +2. New/changed APIs (with `<TypeScriptEditor>` examples) |
| 63 | +3. Performance (with mermaid charts if benchmarked) |
| 64 | +4. Other improvements (grouped subsection) |
| 65 | +5. Migration guide |
20 | 66 |
|
21 | 67 | ## Imports |
22 | 68 |
|
23 | | -Place after frontmatter, before content: |
| 69 | +Place after frontmatter, before content. Only import what's used: |
24 | 70 |
|
25 | 71 | ```tsx |
| 72 | +// Common |
26 | 73 | import Link from '@docusaurus/Link'; |
| 74 | + |
| 75 | +// Migration/upgrade |
| 76 | +import PkgTabs from '@site/src/components/PkgTabs'; |
27 | 77 | import DiffEditor from '@site/src/components/DiffEditor'; |
| 78 | + |
| 79 | +// Code examples |
28 | 80 | import TypeScriptEditor from '@site/src/components/TypeScriptEditor'; |
29 | | -import PkgTabs from '@site/src/components/PkgTabs'; |
| 81 | + |
| 82 | +// Demos |
| 83 | +import HooksPlayground from '@site/src/components/HooksPlayground'; |
30 | 84 | import StackBlitz from '@site/src/components/StackBlitz'; |
| 85 | +import Embed from '@site/src/components/Embed'; |
| 86 | + |
| 87 | +// Media |
| 88 | +import AutoPlayVideo from '@site/src/components/AutoPlayVideo'; |
| 89 | +import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 90 | + |
| 91 | +// Layout |
| 92 | +import Grid from '@site/src/components/Grid'; |
31 | 93 | ``` |
32 | 94 |
|
| 95 | +Note: Some imports (like `PkgTabs`) may appear after truncate if only used in Migration section. |
| 96 | + |
33 | 97 | ## Code Examples |
34 | 98 |
|
35 | 99 | **Before/After changes:** Use `<DiffEditor>` with two code blocks titled "Before" and "After" |
@@ -62,6 +126,14 @@ import StackBlitz from '@site/src/components/StackBlitz'; |
62 | 126 | As usual, if you have any troubles or questions, feel free to join our [](https://discord.gg/wXGV27xm6t) or [file a bug](https://github.com/reactive/data-client/issues/new/choose) |
63 | 127 | ``` |
64 | 128 |
|
65 | | -## Naming Convention |
66 | | - |
67 | | -Files: `YYYY-MM-DD-vX.Y-short-description.md` |
| 129 | +## Component Usage Patterns |
| 130 | + |
| 131 | +| Scenario | Component | Notes | |
| 132 | +|----------|-----------|-------| |
| 133 | +| Full interactive demo | `<HooksPlayground>` | For showcasing complete features with fixtures | |
| 134 | +| Embedded app demo | `<StackBlitz>` | For real app examples (todo-app, coin-app) | |
| 135 | +| Live coding demo | `<Embed>` | For deployed demos (vercel apps) | |
| 136 | +| Type-safe code example | `<TypeScriptEditor>` | Shows TS errors, collapsed sections with `collapsed` | |
| 137 | +| Before/After migration | `<DiffEditor>` | Two code blocks titled "Before" and "After" | |
| 138 | +| Performance comparison | Mermaid `xychart-beta` | Bar charts comparing versions/operations | |
| 139 | +| Video demo | `<AutoPlayVideo>` | For SSR/navigation demos | |
0 commit comments