Extending Settings

Settings in DataMind Oda is a shell around surfaces. The shell draws the panel, its navigation and its shared seats; each surface adds a page, controls and cards of its own. Read this when you build a surface that should appear in Settings; Settings overview shows the reader's side of the panel.

Add a page to Settings

A page is one row in the panel's navigation, registered into the section seat (settings.section). The row carries:

The label and the description resolve in the running language when the navigation reads them, so a language switch updates the row without registering it again.

The seats the shell holds

The shell keeps named seats. A surface registers its interface into the seat it wants:

SeatWhat it holdsEntries
settings.launcherAn entry that sits beside the Settings trigger, such as an account launcher.One
settings.triggerThe control that opens Settings.One
settings.headerThe panel's title area.One
settings.actionFooter actions, seated with the trigger.A list
settings.closeThe close control.One
settings.sectionThe pages.A list
settings.onboardingThe first-run steps.A list

Worth knowing:

Open Settings at your page

A surface can ask the shell to open Settings and name the page to show. Each request carries a fresh number, so a request made while the panel is already open is still a new request. The Ctrl , shortcut (⌘ , on macOS) issues the same kind of request.

Open seats on your page

A page can open seats of its own, declared with the page's registration, so other surfaces add cards to it without editing it. The Models page opens two:

An area with no registrant renders nothing.

How registrations live and leave

Questions, answered

How do I add a page to Settings?

Register a row for it into the section seat: an id, an order, a label, and, as you like, an icon, a group, keywords and a description. Fields you leave out take their defaults; Settings overview shows what readers then see.

What are the defaults if I leave fields out of a page row?

A page that names no icon shows the settings gear, a page that names no group joins the Advanced group, the order is 0, and a missing label, keywords or description stays empty.

Does a page's text follow the app language?

Yes. The label and the description resolve in the running language when the navigation reads them, so a language switch updates the row without a new registration.

Can I register before the seat exists?

Yes. A registration waits for its seat and lands when the seat arrives, and a seat that is declared again collects its entries again. The order in which surfaces register does not matter.

What does the provider-card seat on the Models page pass to my entry?

The source's row from the model directory, whether the source is configured, and whether the key credential it references is confirmed. It fires once per source card, keyed by the card's settings namespace, and every card of the family is dispatched, shipped and deployment-added alike.

What goes in the Models page footer seat?

An ordered area after the source cards. The seat passes no details of its own; entries appear in the order you give them.

What happens when nothing registers into a seat?

The area renders nothing, so a page never shows an empty seat.

What happens to my registrations when my surface unloads?

Everything the surface added leaves with it: its page, its controls and its cards, down to each seat it opened, and everything it held is released. Nothing stays half-registered.

Do registrations survive a rebuild of the shell?

Yes. When the part of the app that owns the seat is rebuilt or reloaded, the registrations recover with it, and a teardown from the earlier build does not block the new ones.

How do I see which seats this installation exposes?

The inspection tools serve the live catalogue of the running app: the seats a surface can register into, and any registrations that failed. Read it rather than assuming a seat is there; availability can differ between installations. Inspect and manage extensions covers the tools.

Can another surface open Settings at my page?

Yes. An open request names the page to show, and each request carries a fresh number, so a request made while the panel is open is still a new one. The Ctrl , shortcut (⌘ , on macOS) issues the same kind of request.