Commit 3cafc37
committed
Mobile UX polish, finish v2 SEO/OG, smooth Material Source curve
Mobile sliders
- Multi-row vertical layout (label | slider | info-row) that mirrors desktop;
no horizontal-overlap concerns.
- Slider track centered, fixed-but-responsive width (min(60vw, 220px)) so
every row has the same length and slider edges align across ingredients.
- Names left-aligned (consistent with the 'min' bound just below).
- Smaller 16px thumb on mobile; --thumb-half CSS var keeps the JS
slider-preview-marker math in sync with the rendered thumb size.
- Vertical alignment of name and value-input via 'align-items: center'
on the label flex container.
- Mobile font hierarchy bumped for legibility on touch devices and older
eyes: label 0.85rem, panel-body insight text 0.95rem, h2 0.95rem.
Hide W/B readout on mobile to keep GWP+Cost on one line.
- Replaced ingredient-name 'border-bottom: 1px dashed' with
'text-decoration: underline dashed' to save a few pixels of vertical
height per row (no descender expansion).
Click-to-edit composition values
- Type a number + Enter, blur, or unit-toggle commit; Escape reverts;
out-of-range clamps; non-numeric reverts. Material Source value is a
<span> (non-editable). Pre-toggle unit context preserved on commit.
- 'Temp' renamed to 'Temperature' in displayed labels (column name
unchanged so the model layer is untouched).
Material Source toggle
- Curve-level 350ms ease-in-out blend between pre/post-toggle posteriors
in drawStrengthCurve (avoids feeding fractional categorical input to
the GP). State exposed via window.__test for deterministic testing.
- scheduleInsightUpdate() on toggle so the Mix Insight no longer goes
stale when the new composition is outside the training set.
Finish v2: SEO + social
- robots.txt and sitemap.xml.
- README link to the deployed explorer.
- (Open Graph / Twitter Card / JSON-LD already in head.)
Bug fixes
- Filter min/max placeholders no longer clipped by Chromium spinner UI
('appearance: textfield' + zeroed -webkit spin pseudo-elements).
- Slider preview marker now offsets by slider.offsetLeft so it lands on
the visible track on mobile (and stays a no-op on desktop).
- displayPreviewComp now stays in sync with currentComposition on
Material Source toggle (no more dashed-preview ghosting).
Refactor / cleanup
- logSpacedTimes() and computeStds() helpers consolidate three duplicated
copies of the time-grid generator and the GP-noise std computation.
- Removed pre-existing dead declarations in updateMixInsight and
getParetoTag.
- Renamed unused @parameterized.expand 'name' params to '_name' in
test/test_utils.py so the linter no longer flags them.
Tests (10 new specs + extended sliders)
- preview-curve: displayPreviewComp sync, mix-insight refresh on toggle,
curve-transition state hook (deterministic, no screenshot timing race).
- font-uniformity: insight bodies share computed font-size.
- og-meta + seo: required tags present, og-image fetch in budget,
robots.txt and sitemap.xml reachable.
- mobile-slider-layout: multi-row no overlap, names left-aligned,
uniform slider widths, centered+narrower slider, vertical centerline,
text-decoration affordance, font hierarchy, value glyph aligns with
max bound, tap target via offsetHeight, preview marker on track.
- mobile-value-fit: no panel overflow at default, fractional, imperial,
imperial-max, and 320px viewports.
- scatter-filter: placeholders fit fully (no spinner clip).
- readouts-strip: desktop has all three, mobile hides W/B and stays on
one line.
- sliders.spec: extended with 7 click-to-edit cases.
- test/e2e/README.md invariants table updated.1 parent e6a189c commit 3cafc37
18 files changed
Lines changed: 1603 additions & 63 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 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 | + | |
8 | 73 | | |
9 | 74 | | |
10 | 75 | | |
| |||
154 | 219 | | |
155 | 220 | | |
156 | 221 | | |
157 | | - | |
| 222 | + | |
158 | 223 | | |
159 | 224 | | |
160 | 225 | | |
| |||
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
439 | | - | |
| 442 | + | |
440 | 443 | | |
441 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
442 | 452 | | |
443 | 453 | | |
444 | 454 | | |
445 | 455 | | |
446 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
447 | 494 | | |
448 | 495 | | |
449 | 496 | | |
| |||
481 | 528 | | |
482 | 529 | | |
483 | 530 | | |
484 | | - | |
485 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
486 | 545 | | |
487 | 546 | | |
488 | | - | |
489 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
490 | 551 | | |
491 | 552 | | |
492 | 553 | | |
493 | | - | |
| 554 | + | |
494 | 555 | | |
495 | 556 | | |
496 | 557 | | |
497 | | - | |
498 | | - | |
| 558 | + | |
| 559 | + | |
499 | 560 | | |
500 | 561 | | |
501 | 562 | | |
| |||
735 | 796 | | |
736 | 797 | | |
737 | 798 | | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
738 | 810 | | |
739 | 811 | | |
740 | 812 | | |
| |||
865 | 937 | | |
866 | 938 | | |
867 | 939 | | |
868 | | - | |
| 940 | + | |
869 | 941 | | |
870 | 942 | | |
871 | 943 | | |
| |||
1224 | 1296 | | |
1225 | 1297 | | |
1226 | 1298 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 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 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1230 | 1376 | | |
1231 | | - | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1232 | 1422 | | |
1233 | 1423 | | |
1234 | 1424 | | |
| |||
0 commit comments