Commit 34dc8cf
committed
bitmap 3D PFP: bypass Angular CD entirely with classList toggles
Two days of "controls don't show" debugging finally converged on
"Angular's class binding update isn't reaching the host element on the
user's device". Theories ruled out:
- The classProp call IS compiled into the bundle (verified via grep
on the deployed main.js: AVh("touch-ui", showTouchUi) is there)
- showTouchUi IS getting set true (no path sets it back to false in
the failure case)
- The CSS selectors ARE correct (.bitmap3d-host.touch-ui ...)
- The deploy IS landing (build artifact matches local SHA)
What remains: Angular's CD chain inside zone.run inside an
outside-the-zone rAF callback is silently not propagating the class
binding on at least one mobile browser. Reproducing it requires the
exact device; I can't from here.
Fix: stop relying on Angular's binding system for this. The host's
classList is now toggled by direct DOM manipulation
(host.classList.toggle('pfp-on', ...)) at the same state-machine
transition points. CSS gates visibility on `.bitmap3d-host.pfp-on.touch-on`.
Same effect, but the path from "state transitions to pfp" to "class
appears on the DOM" is now one synchronous classList call -- no
zone.run, no detectChanges, no OnPush walking. Can't be lost.
Kept showTouchUi as a state tracker (setLastInput still reads it for
the if-no-change-skip optimisation), but it no longer drives the
template binding.1 parent 13d11bf commit 34dc8cf
1 file changed
Lines changed: 27 additions & 21 deletions
File tree
- frontend/src/app/components/_ordpool/digital-artifact-viewer/bitmap-viewer
Lines changed: 27 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| |||
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
59 | | - | |
60 | | - | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | | - | |
63 | | - | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
459 | 474 | | |
460 | 475 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 476 | + | |
467 | 477 | | |
468 | 478 | | |
469 | 479 | | |
| |||
919 | 929 | | |
920 | 930 | | |
921 | 931 | | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
| 932 | + | |
| 933 | + | |
926 | 934 | | |
927 | 935 | | |
928 | 936 | | |
929 | | - | |
930 | | - | |
931 | | - | |
| 937 | + | |
| 938 | + | |
932 | 939 | | |
933 | 940 | | |
934 | | - | |
935 | | - | |
936 | | - | |
| 941 | + | |
| 942 | + | |
937 | 943 | | |
938 | 944 | | |
939 | 945 | | |
| |||
0 commit comments