Repository navigation
Commit fe88de3
Make every setting a field type declares reachable from the builder (#2)
A field type says what it supports; the inspector decides what to draw.
Nothing joined those two, and the result was not a bug anybody could see:
thirty-two supported settings had no control anywhere. The heading level on
a heading. The markup in an HTML block. The file types a file field accepts.
How many rows a repeater allows. The words on the ends of a scale. The
button at the bottom of a page break — which is where this started, because
a multi-page form in any language other than English shipped a button
saying "Next" and there was nothing to be done about it.
Every one of them worked perfectly once set, which is exactly why nobody
noticed: the renderer honoured them, the schema stored them, the tests
passed, and the only way to set one was to export the form as JSON, edit it
by hand, and import it back.
The join is now a table — one line per setting — and a test that reads the
PHP registrations and fails when a flag has no control and no stated reason
to lack one. A hand-kept list here would have agreed with itself forever
while disagreeing with the plugin.
On the canvas, the settings that are visible parts of the field are edited
where they appear: the hint under any control that offers one, the page
break's own Next and Back buttons, the repeater's Add button, the name of
the step. Both panes stay in step by naming the property they edit rather
than by two hand-kept lists of keys, which is one list fewer to forget.
Also fixed, all found while doing the above:
- `prevLabel` never rendered. A page's Back button read the break that
*closes* that page, but the wording belongs to the break that opened it —
the same one whose Next brought the visitor there. On a two-page form the
setting was unreachable by construction.
- The form title sat outside `.atf-form`, where the theme's tokens are
scoped, so every `var( --atf-* )` on it was invalid — taking its font,
size, colour and bottom margin with them. It had been wearing the site
theme's `h2` and sitting flush against the step indicator. The tokens are
now scoped to the wrapper, which is what the instance id is on anyway.
- A switch rendered as a tick box. It now draws a switch, and the preview
tells the two apart the same way the front end does.
- A toggle drew its label twice, once as the field label and once beside
the control.
- The hint sat above the control on the canvas and below it on the page.
- `calc`, `confirm`, `counter`, `searchable`, `disabledays`,
`defaultcountry`, `explanation` and a rating `icon` were declared and
read by nothing. Removed rather than given controls that would do
nothing.
Likert statements are edited as one per line, and a row's key is what its
answers are stored against — so keys survive rewording. Correcting a typo
in a statement must not detach every answer already given to it.
Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 0c68b61 commit fe88de3
19 files changed
Lines changed: 4907 additions & 233 deletions
File tree
- assets
- css
- js
- docs
- includes
- src
- tests
- phpunit/tests
- vitest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2246 | 2246 | | |
2247 | 2247 | | |
2248 | 2248 | | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
2249 | 2313 | | |
2250 | 2314 | | |
2251 | 2315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
926 | 969 | | |
927 | 970 | | |
928 | 971 | | |
| |||
1254 | 1297 | | |
1255 | 1298 | | |
1256 | 1299 | | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
0 commit comments