-
Notifications
You must be signed in to change notification settings - Fork 2
Dylan/publisher-editor-tool #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dylanh724
wants to merge
157
commits into
clockworklabs:master
Choose a base branch
from
dylanh724:dylan/publisher-editor-tool
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dylan/publisher-editor-tool #17
dylanh724
wants to merge
157
commits into
clockworklabs:master
from
dylanh724:dylan/publisher-editor-tool
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Runs cross-platform CLI commands in the background and parses them for friendly results - Features: * Detects and cross-platform installs SpacetimeDB CLI if !detected * View list of servers|identities * Add server|identity * Change server|identity * Ensure identities are bound to servers (refresh on server change) * FilePicker for publish/to/module path * Publish result with DateTime, Host, IsOptimizedBuild * Detection of `wasm-opt` for optimization; show install button if !found (in post-publish result cache) * Regenerate local|testnet servers if 0 servers found * Cleanly-exited Process via cancel token support * Progress bars and status labels * CLI Error handling * Some persistence cache, but we mostly get live updates from the CLI * UX: Prettified, responsive design, Local validation, groups, focus/selectAll when applicable, status labels, integrity checks, top banner click links to docs, body wraped in scrollView, fonts and colors match docs
5bfe0e8
to
6c62dcd
Compare
- For future Editor tools that may coincide with Publisher, I added a `Common` dir - Moved core CLI commands to a common `SpacetimeDbCli.cs` - Created a "common" USS stylesheet so future editor tools can utilize this with a core, templated style. - Set the non-common USS stylesheet as active at the top (custom one *must* be at top, as that's what's default set active) - Better USS/UXML naming - Added sanity checks for USS/UXML loading
eef0507
to
1d90411
Compare
- For future Editor tools that may coincide with Publisher, I added a `Common` dir - Moved core CLI commands to a common `SpacetimeDbCli.cs` - Created a "common" USS stylesheet so future editor tools can utilize this with a core, templated style. - Set the non-common USS stylesheet as active at the top (custom one *must* be at top, as that's what's default set active) - Better USS/UXML naming - Added sanity checks for USS/UXML loading - fix: HasIdentitiesButNoDefault + HasServersButNoDefault were resulting in opposite expectations
1d90411
to
9d27819
Compare
- Currently has the Publish window template UI; will strip this next commit (keeping what we need)
…ditor-tool # Conflicts: # Scripts/Editor/Common/SpacetimeDbCli/Models/GetIdentitiesResult.cs # Scripts/Editor/Common/SpacetimeDbCli/Models/PublishResult.cs # Scripts/Editor/Common/SpacetimeDbCli/Models/PublishResult.cs.meta # Scripts/Editor/Common/SpacetimeDbCli/Models/PublishServerModuleResult.cs # Scripts/Editor/Common/SpacetimeDbCli/Models/PublishServerModuleResult.cs.meta # Scripts/Editor/Common/SpacetimeDbCli/SpacetimeDbCli.cs # Scripts/Editor/Common/SpacetimeDbCli/SpacetimeDbPublisherCli.cs # Scripts/Editor/Common/SpacetimeMeta.cs # Scripts/Editor/SpacetimePublisher/PublisherWindowComponents.uxml # Scripts/Editor/SpacetimePublisher/Scripts/Models/PublishServerModuleResult.cs # Scripts/Editor/SpacetimePublisher/Scripts/Models/PublishServerModuleResult.cs.meta # Scripts/Editor/SpacetimePublisher/Scripts/PublisherWindowActions.cs
c4d0b9a
to
9965b88
Compare
9965b88
to
21bd9f9
Compare
…ditor-tool # Conflicts: # Scripts/Editor/Common/SpacetimeDbCli/Models/GetIdentitiesResult.cs # Scripts/Editor/Common/SpacetimeDbCli/SpacetimeDbPublisherCli.cs # Scripts/Editor/SpacetimePublisher/Scripts/PublisherWindowActions.cs
21bd9f9
to
1a686ec
Compare
if (!isSuccess)
return; rather than: if (!isSuccess)
{
return;
} |
9963cd2
to
ae3b801
Compare
- It turns out that WebAssembly/binaryen has a bug that won't detect Windows PATH for wasm-opt - The code is still there, since it's quite fancy, for when they fix their path bug.
# Conflicts: # README.md
# Conflicts: # Editor/Common/SpacetimeWindow.cs
Final form, unless told otherwise -- Went through aggressive testing and applied a bunch of fixes -- it's quite stable! Ready to review (undrafting) @jdetter , @cloutiertyler , @bfops |
- Prevents build errs. This is *technically* a workaround for a Unity bug, since /Editor is supposed to be ignored by build processes anyway.
- Unused, yet, with TODO notes! @john wanted to have this, so I got ya started
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About💡
New SpacetimeDB "Publisher" tool, acting as a SpacetimeDB GUI for creating/managing identities/servers, publishing, and viewing the last result cache of your previous publish [through the tool].
Designed in UI Builder with high-level and low-level scripts, this is designed to be scalable and intuitive to change.
More screenshots below.
Documentation
Why❓
The user could learn all the CLI commands and nuances, but automation and streamlining for an in-editor tool just feels amazing for both onboarding and veterans.
New users are already learning both the client and server side - potentially even learning Rust, on top of things. This tool should significantly lower onboarding friction and overall lower the learning curve.
On top of this, we can also workaround known bugs, such as auto-regenerating servers when they poof.
Merge Prerequisites 📦
Recommended to merge 1st, but not required:
testnet
SpacetimeDB#1078Features📜
wasm-opt
to show if a publish was optimized or notinstall silently via npmwasm-opt
has a bug that doesn't check global PATH-c
supportspacetime generate
support (post-publish)--skip_clippy --debug
)⚙️ Editor tool only: This won't bloat builds.
⚙️ Tested in Unity 2022.3.20 LTS
Flow➡️
New User
local
+ `testnetlowercase-dashified-swaps-client-with-server
) -> Browse path via FilePickerReturning User
Media🖼️
Reveal Media
Ready to Publish (Same UI as Returning User Init)
SpacetimeDB CLI !Detected
(Image broke - will replace next shift)
Add new server|identity
Choose a server
Publishing
Published, Optimized
Published, !Optimized
EDIT:
-c
supportEditor view from eagle eye perspective:
Generate Client Files
Advanced
Testing
spacetime init
vanilla Module using dark mode perspective.