mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-07-22 21:01:40 +00:00
Every rule here is something that has already gone wrong on this feature — mostly in core's own code, twice in the two plugins that adopted it first. They are cheap to get right up front and miserable to diagnose later, because a broken pane almost always LOOKS perfect. The traps, and why each one is easy to walk into: - Your code still runs in the main window. That is exactly why moving the element works at all — and exactly why `document.body.appendChild(tooltip)` inside a popped-out panel lands in the window the user is NOT looking at. - Don't hide your own panel when it pops out. Core hides it and leaves a stub. A plugin that also hides it hides the node that just moved — which is precisely how core's own chip shipped a blank pop-out window. - Use `hidden` or a class, not inline `display`, for show/hide. `.fb-paned` forces the panel visible while it is out; when it docks and that class is removed, an inline `display:none` reasserts itself and the panel returns invisible. - `isConnected` does not mean "docked". A panel in a pane window IS connected, just not to this document. The test you meant is `el.ownerDocument === document`. - `element` is a function so it can be resolved late: return the LIVE node, and re-attach the chip if you rebuild your panel (Camera Director rebuilds on every mode change). - rAF is throttled while the main window is backgrounded — which it is, whenever the user is looking at your pane. Event-driven panels don't care; continuously animating ones will stutter exactly when they are the only thing on screen. - Don't synchronise anything. One realm, one panel. Writing sync code means you have misunderstood the model. Also states what core guarantees back, including the one that cost the most to learn: the element is evacuated BEFORE the pane window's document is destroyed, so it comes home alive rather than as a photograph of a panel with every listener in its subtree silently gone. Signed-off-by: topkoa <topkoa@gmail.com> |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| diagnostics | ||
| skills | ||
| 3dhighway-open-string-double-sustain.jpg | ||
| capability-domains.md | ||
| capability-recipes.md | ||
| capability-review-preflight.md | ||
| capability-roadmap.md | ||
| capability-safety-matrix.md | ||
| diagnostics-bundle-spec.md | ||
| host-theme-contract.md | ||
| library.png | ||
| NOTE_FAILURE_PLAN.md | ||
| NOTE_FAILURE_SPEC.md | ||
| note-detect-tuning.md | ||
| perf-baseline.md | ||
| player-2d.jpg | ||
| player-3d.jpg | ||
| player-3d.webp | ||
| plugin-capability-inventory.md | ||
| plugin-manifest.schema.json | ||
| plugin-modules.md | ||
| plugin-panes.md | ||
| plugin-styles.md | ||
| plugin-v3-ui.md | ||
| size-exemptions.md | ||
| sloppak-hand-editing.md | ||
| sloppak-spec.md | ||
| working-tuning-on-device-tests.md | ||