settings ui: Add text field support to ui layer (#37868)

This is an initial implementation that isn't used for any settings yet,
but will be used once `Vec<String>` is implemented.

I also updated the window.with_state api to grant access to a
`Context<S>` app reference instead of just an App.

## Example

<img width="603" height="83" alt="Screenshot 2025-09-09 at 2 15 56 PM"
src="https://github.com/user-attachments/assets/7b3fc350-a157-431f-a4bc-80a1806a3147"
/>


Release Notes:

- N/A
This commit is contained in:
Anthony Eid
2025-09-09 18:48:22 +00:00
committed by GitHub
parent 46fb521333
commit 707d0e6ebd
7 changed files with 70 additions and 6 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ pub enum DebugPanelDockPosition {
Right,
}
#[derive(Serialize, Deserialize, JsonSchema, Clone, Copy, SettingsUi, SettingsKey)]
#[derive(Serialize, Deserialize, JsonSchema, Clone, SettingsUi, SettingsKey)]
#[serde(default)]
// todo(settings_ui) @ben: I'm pretty sure not having the fields be optional here is a bug,
// it means the defaults will override previously set values if a single key is missing