mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-06 07:11:55 +09:00
With slots there can be same ids in one tree so we need new way to address instances. Here I propose the list from target instance to the root. Now instead of computing parents by normalized tree (one instance of slot can have many parents) we just access already computed list from rendered tree. This address can be computed when user click in dom which can be traversed or it can be passed top-down with props. The main con of this approach is collaboration. Reparanted instances on by one user makes "selected address" stale. Though we have similar situation with single id when instance is deleted. Isolated mode for slots/components will make this problem less noticable.