First sneak peek of Runestone for Vision Pro 😃 👀
Just spent a bit of time making sure Runestone supports multiple windows on the Vision Pro 😃
It's unclear to me what the best practices are for opening multiple windows in a document-based app on the Vision Pro but this approach seems to work well. Users can open multiple document browser. Opening a document replaces the document browser and closing the document returns to the document browser.
Very happy to discover that I can resize ornaments when the associated view is resized. I think this works great for Runestone’s search ornament 😃
@simonbs this is the approach swift playgrounds takes and I think it's largely reasonable.
@simonbs But then there could be two document browsers open at the same time?
@knutknatter Yes. I don't think that's much different than having two Finder windows open at the same time on a Mac.
@simonbs that’s true. I was always thinking about mimicking the open window behaviour from macOS in document-based apps (command+O). It only allows one open window. For example, opening a document always opens in a new scene, the document browser scene is closed. Observe when all scenes closed and create doc browser scene. Not sure if this is more user friendly however.

@knutknatter I considered going that route but I can’t seem to make visionOS bring an existing scene to the foreground. Initializing an instance of UISceneSessionActivationRequest and using it to request scene activation does nothing. So if a document browser is already open, I choose open another one instead of doing nothing.

I’m also not sure if we should programmatically open new scenes on visionOS when the last scene is destroyed. I don’t think year will expect that.

@simonbs this looks very natural and exactly as I’d expect without thinking