GUI Reducer listing/calling with prefilled with the CLI-default server/identity (and module name, if cached from previously using the other "Publisher" tool).
Why?
With the Publisher tool, we took away numerous CLI burdens and tossed it into a GUI with persistence to remember your prefs.
The effort continues! Less CLI burdens, more GUI, easier onboarding/reducer testing.
Get default selected server/identity from CLI and load it into UI @ init
Get last-published module Name and load it into a TreeView UI @ init, if any
Parses spacetime describe into a model
Parses describe into an EntityInfo model with extra info, such as [formatted] syntax hints and more
Refresh button, in case we changed something after init
"Call Reducer" button for reducers with results shown below
UX: Local validation, btn enable/disables on ready/done, progressive UI reveal, btn status labels on click, window wrapped in ScrollView, result labels wrapped in ScrollView (in case of lengthy errs), can dock to editor UI as a tab
Minor Publish optimizations (since closely related and templated from)
Some fixes, some tweaks, some consistency.
Centralized some common elements back to /Common
EDIT: --as-identity support
Err handling:
Implicit #VisualElement name integrity
Refer to Publisher tool on server<>identity errs
⚙️ Editor tool only: This won't bloat builds.
⚙️ Tested in Unity 2022.3.20 LTS
Ideas for future PRs:
From Reducer window, have an "Open Publisher Tool" button on identity/server err
From Publisher window, have an "Open Reducers Tool" button on Publish success in the Result Foldout.
Since we parse the entire spacetime describe into a common model, there are likely other fun tools to be made from this.
TreeView supports sub elements, if we ever wanted to do something "extra" with a selected reducer, such as describing what each arg does (if we ever add arg docs within spacetime describe results, for example).
Caching last known set of reducers (but can cause confusion on desyncs).
Testing
Tested via Zeke's demo project, which includes pretty much everything- including custom types and deep nested.
Currently showing premade funcs like Init; unsure what to do with these:
TODO
Add this tool to the README with a GIF
Wrap short if() with if(){} (I learned this internal pref later)
Emulation support as a player ("bot").
Eg: Let's say I want to call the tutorial's chat_message - I get an err response "Player not found"
About
GUI Reducer listing/calling with prefilled with the CLI-default server/identity (and module name, if cached from previously using the other "Publisher" tool).
Why?
With the Publisher tool, we took away numerous CLI burdens and tossed it into a GUI with persistence to remember your prefs.
The effort continues! Less CLI burdens, more GUI, easier onboarding/reducer testing.
Prerequisites
Branched from https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/pull/17 - resolve this PR 1st
Feats
Get default selected server/identity from CLI and load it into UI @ init
Get last-published module Name and load it into a TreeView UI @ init, if any
Parses
spacetime describe
into a modelParses describe into an EntityInfo model with extra info, such as [formatted] syntax hints and more
Refresh button, in case we changed something after init
"Call Reducer" button for reducers with results shown below
UX: Local validation, btn enable/disables on ready/done, progressive UI reveal, btn status labels on click, window wrapped in ScrollView, result labels wrapped in ScrollView (in case of lengthy errs), can dock to editor UI as a tab
Minor Publish optimizations (since closely related and templated from)
--as-identity
supportErr handling:
#VisualElement
name integrity⚙️ Editor tool only: This won't bloat builds. ⚙️ Tested in Unity 2022.3.20 LTS
Ideas for future PRs:
spacetime describe
into a common model, there are likely other fun tools to be made from this.spacetime describe
results, for example).Testing
TODO
chat_message
- I get an err response"Player not found"