Commit 9593e71
authored
ENG-1716: Bug fix: Template does not render from block props (#1016)
* ENG-1716: Render template settings from block props
When the new settings store flag is on, materialize the block-props
template into an ephemeral Template-Block-props block as the last
child of node.type, render that, and delete it on unmount. Flag-off
behavior is unchanged.
* ENG-1716: Dual-write template edits back to legacy Template block
When the new settings store flag is on, edits in the buffer
Template-Block-props block are mirrored to the legacy Template block
via position-walked block.update calls. On length mismatch (only
expected during testing/manual divergence) the mirror logs a warning
and skips that subtree.
* ENG-1716: Extend buffer->legacy mirror to handle add/delete
Mirror now creates legacy children when buffer has extras and deletes
legacy children when buffer has fewer, in addition to in-place
block.update for matching positions. Replaces the prior length-match
guard which caused dual-write to silently skip whenever the user
added or removed template lines.
* ENG-1716: Guard render effect against stale async continuation
The ensureChildren promise resolves asynchronously, so its .then
callback could run after the effect's cleanup fired - re-registering
a pull watch on a stale renderUid and stomping pullWatchArgsRef.
Add a cancelled flag (same pattern as the buffer-lifecycle effect)
so the continuation aborts after teardown.
* ENG-1716: Mirror heading and open alongside string
The mirror only pushed block string to legacy, so a heading-level
or collapse-state change in the buffer never propagated. Update
the same block.update call to include heading and open whenever
any of the three differ between buffer and legacy.
Also drops uid from the buffer-creation effect's dependency array
since the body no longer references it.
* ENG-1716: Rename useNewStore -> isNewStore
useNewStore reads like a React hook (use* convention) but is a
boolean. Rename to isNewStore so the name matches the type.1 parent e84cc2d commit 9593e71
1 file changed
Lines changed: 107 additions & 11 deletions
Lines changed: 107 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
31 | 92 | | |
32 | 93 | | |
33 | 94 | | |
| |||
44 | 105 | | |
45 | 106 | | |
46 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
47 | 132 | | |
| 133 | + | |
48 | 134 | | |
49 | 135 | | |
50 | | - | |
| 136 | + | |
51 | 137 | | |
52 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
53 | 143 | | |
54 | | - | |
| 144 | + | |
55 | 145 | | |
56 | 146 | | |
57 | 147 | | |
58 | | - | |
| 148 | + | |
59 | 149 | | |
| 150 | + | |
60 | 151 | | |
61 | | - | |
| 152 | + | |
62 | 153 | | |
63 | 154 | | |
64 | 155 | | |
| |||
67 | 158 | | |
68 | 159 | | |
69 | 160 | | |
70 | | - | |
| 161 | + | |
71 | 162 | | |
72 | 163 | | |
73 | 164 | | |
74 | 165 | | |
75 | | - | |
| 166 | + | |
76 | 167 | | |
77 | 168 | | |
78 | | - | |
| 169 | + | |
79 | 170 | | |
80 | 171 | | |
81 | 172 | | |
| 173 | + | |
82 | 174 | | |
83 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
84 | 179 | | |
85 | 180 | | |
86 | 181 | | |
87 | 182 | | |
| 183 | + | |
88 | 184 | | |
89 | 185 | | |
90 | 186 | | |
91 | 187 | | |
92 | 188 | | |
93 | 189 | | |
94 | | - | |
| 190 | + | |
95 | 191 | | |
96 | 192 | | |
97 | 193 | | |
| |||
0 commit comments