Commit b55f507
chore(apollo-react): add temp locale selector to Flow Default story
Adds a temporary Storybook control on `Flow > Default` that drives the
StickyNote formatting toolbar's locale via `ApI18nProvider`. Intended
purely as a dev-harness to verify the canvas i18n pipeline end-to-end
until a real ambient locale context exists.
- New optional `locale?: SupportedLocale` prop on `StickyNoteNode`,
threaded into the internal `ApI18nProvider`. Marked as storybook-only
in the JSDoc.
- New `stickyNoteLocale` storybook arg (select control, 5 translated
locales: en/es/fr/ja/de).
- `DefaultStory` rebuilds its `stickyNote` node type entry on locale
change so xyflow remounts the notes with the new prop — xyflow keys
its node type map by component identity, so a stable wrapper would
close over the initial value.
Remove the arg, the prop, and this commit once a real locale context
lands.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 429b7e2 commit b55f507
2 files changed
Lines changed: 53 additions & 7 deletions
File tree
- packages/apollo-react/src/canvas/components
- StickyNoteNode
Lines changed: 44 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
31 | 48 | | |
32 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
33 | 54 | | |
34 | 55 | | |
35 | 56 | | |
| |||
45 | 66 | | |
46 | 67 | | |
47 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
48 | 78 | | |
49 | 79 | | |
50 | 80 | | |
| 81 | + | |
51 | 82 | | |
52 | 83 | | |
53 | 84 | | |
| |||
159 | 190 | | |
160 | 191 | | |
161 | 192 | | |
162 | | - | |
163 | | - | |
164 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
165 | 205 | | |
166 | | - | |
167 | 206 | | |
168 | 207 | | |
169 | 208 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| |||
349 | 356 | | |
350 | 357 | | |
351 | 358 | | |
352 | | - | |
| 359 | + | |
353 | 360 | | |
354 | 361 | | |
355 | 362 | | |
| |||
0 commit comments