clockworklabs / com.clockworklabs.spacetimedbsdk-archive

The SpacetimeDB SDK for Unity clients (Unity Package Manager)
https://spacetimedb.com
Apache License 2.0
3 stars 2 forks source link

Dylan/feat/reducers editor tool #19

Open dylanh724 opened 8 months ago

dylanh724 commented 8 months ago

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).

image

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

⚙️ Editor tool only: This won't bloat builds. ⚙️ Tested in Unity 2022.3.20 LTS

Ideas for future PRs:

  1. From Reducer window, have an "Open Publisher Tool" button on identity/server err
  2. From Publisher window, have an "Open Reducers Tool" button on Publish success in the Result Foldout.
  3. Since we parse the entire spacetime describe into a common model, there are likely other fun tools to be made from this.
  4. 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).
  5. Caching last known set of reducers (but can cause confusion on desyncs).

Testing

TODO

dylanh724 commented 8 months ago

Added one more quick feat, "as identity": image