Skip to content

fix: scope portal and measurements to each Layman view - #31

Open
ddebowczyk wants to merge 1 commit into
Jeshwin:mainfrom
ddebowczyk:fix/isolate-layman-views
Open

ddebowczyk wants to merge 1 commit into
Jeshwin:mainfrom
ddebowczyk:fix/isolate-layman-views

Conversation

@ddebowczyk

Copy link
Copy Markdown

Summary

  • give each rendered Layman root a generated or supplied data-layman-view identity
  • keep its drag-border portal, measurements, and CSS-token reads inside that root
  • subscribe the resize observer once per root and disconnect it on unmount

Validation

  • npx vitest run tests/viewIsolation.test.ts --pool=threads --maxWorkers=1
  • NODE_OPTIONS="--localstorage-file=/tmp/react-layman-vitest-localstorage" npm test (71 passed)
  • npm run lint -- --max-warnings=0
  • npx tsc --noEmit
  • npm run build:lib

Dependency

Plain Node 26 npm test becomes portable when #29 lands. This PR is otherwise independently applicable to main and does not expose DOM handles through the public API.

@ddebowczyk
ddebowczyk force-pushed the fix/isolate-layman-views branch 2 times, most recently from 21e0b9e to 5014c8e Compare August 12, 2026 13:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant