Commit 25d2ca7
committed
Simplify and refocus map step documentation (#242)
Simplifies and refocuses map step documentation based on the plan in `PLAN_simplify-map-step-docs.md`:
- **Renamed page**: `array-and-map-steps.mdx` → `map-steps.mdx` with redirect
- **Reduced duplication**: Consolidated 3 separate handler constraint explanations into one
- **Improved clarity**: Added terminology note, code markers, and task execution details
- **Removed noise**: Deleted verbose examples and common patterns that belonged elsewhere
- **Enhanced concepts**: Clarified step/task distinction and layer separation of concerns
## Key Changes
### Map Steps Concepts (`concepts/map-steps.mdx`)
- Reduced from 411 to 249 lines (40% reduction)
- Added terminology Aside explaining `.array()` vs `.map()`
- Consolidated handler input constraints into single section with clear code examples
- Added explicit statement: "Each map task is a separate function execution in the worker"
- Removed "Common Patterns" section (belongs in how-to guides)
- Simplified NULL handling and limitations sections
- Ensured all array names are plural (e.g., `users` not `userData`)
### Batch Processing How-To (`how-to/batch-process-with-map.mdx`)
- Reduced from 365 to 295 lines
- Added "Understanding Map Step Flavors" opening section
- Promoted context enrichment pattern to main section with problem/solution code markers
- Added debugging examples with task index logging
- Removed duplicate "Passing Additional Context" from gotchas
- Removed verbose notification batching example
### Concepts Architecture Docs
**`concepts/how-pgflow-works.mdx`:**
- Added task explanation: tasks are user-visible for map steps (performance/retry)
- Added layer independence paragraph explaining separation of concerns
**`concepts/index.mdx`:**
- Enhanced core concepts explanation (flows/runs/steps/tasks/dependencies)
- Clarified steps vs tasks distinction
- Removed architecture details (covered thoroughly in "How pgflow Works")
- Kept focus on data model concepts only
### Other Changes
- Added redirect in `astro.config.mjs` for renamed page
- Fixed all array names to use plural forms throughout examples
## Impact
Documentation is now:
- **More focused**: Each page has a clear purpose
- **Less redundant**: Handler constraints explained once, referenced elsewhere
- **More accurate**: Consistent terminology and plural array names
- **Easier to navigate**: Index focuses on concepts, details in appropriate guides
- **Better for learning**: Progressive disclosure with clear conceptual boundaries1 parent ce9169f commit 25d2ca7
File tree
6 files changed
+114
-392
lines changed- pkgs/website
- src/content/docs
- concepts
- how-to
6 files changed
+114
-392
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | | - | |
84 | | - | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
25 | 29 | | |
26 | | - | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
0 commit comments