Files
gods-eye-view/docs
Sameh KhamisandManjunath Paparaju ec4a5b6afe Vue kit: UiDialog for the Data Library and scene sharing dialogs
UiDialog is a native <dialog> its owner opens and closes with open: true
opens it with showModal() (on mount, for one mounted open), false closes
it, and unmounting closes it. Each change is applied once the content has
rendered and then emitted as opened or closed, so the Data Library still
focuses its search field on open and returns focus to Browse on close.
Escape's cancel is prevented and emitted as dismiss; backdropDismiss makes
a click on the dialog itself a dismiss too, as the Data Library's was. When
the browser closes the dialog on its own while open is still true,
browserClose tells the owner, as the Data Library's close listener did;
closing on unmount reports nothing. A DOM without showModal() leaves it
closed. Attributes, classes, styles and listeners go to the dialog, and
element is exposed.

The two dialogs share no declarations, so there are no kit rules.
dialogs.test.mjs fails if a view writes a <dialog> by hand; the panels drawn
as role="dialog" are other controls.

Co-authored-by: Manjunath Paparaju <[email protected]>
2026-11-19 01:16:46 -08:00
..