Repository navigation
ECS architecture maps: analysis, viewer and Vite plugin; ecs 0.8.0 - #289
Merged
Merged
Conversation
…m.exited; derived components removed - Query.create and Query.and make archetype queries (with, not, shared values) and row queries (any value, comparisons, partial structs); every matching site takes one: systems, lookups, render systems, indexes, tables, despawnWhere, entered and exited systems, ecs-persistence selections - Shared-value predicates are a system's filter - System.removed is System.exited; System.entered runs for entities that start matching - Component.derive and the derived trait are removed; within stays - The build follows queries through module-scope consts and imports - ecs-persistence 0.3.0, ecs-architecture 0.7.0 (query file kind) Co-Authored-By: OpenCode <noreply@opencode.ai>
… exported symbol; particles sample gets the architecture script
…run, their input and what they match
…on the left, its systems on the right
…resources by color
…nd read port, right
…s, and links systems to what they read, write, add and remove
…reading them apart
…cks each feature's model, elements and view, and keeps links outside modules until they turn in to a port
…a declaration, system or link brings its links to the front, thicker
…ery link stacked with it to the front
…k's hover area is wider
…p layer, following the pointer, finding stacked links as wide as a link's hover area
…resource, which ecs-architecture checks and the map draws; the map shows inputs without readonly
…, and each plugin with its systems, linked to the element properties they set
…component's, resource's or element property's doc and declaration, beside it
… a system's note in the bottom right corner
… on click until a click elsewhere or Escape
…ight, linked to the systems their handlers run
…which set, and links view systems to the element properties they read
…lers run systems only from a connect; the map shows each plugin's connect, its listeners between the events and the systems they run
…f their elements layer, which ecs-architecture checks; the map shows the constant a connect defines
…r, its source on click, and bolds the elements it names
- Used carries despawns, from the build's commands - a despawning system's deletes are the components its entities are found by: despawnWhere's query; for despawn, the lookup whose rows it despawns, its query or its index's, through the constants holding them, else the system's own query - tests: despawn by row, by an index lookup, despawnWhere in place and named, and the build's inference
…rows striped - a link's tip: a moment after the pointer is on a link, or a stacked spot or a port, a small translucent tip beside it lists each connection there once: toggleTodo writes done, todo-add fires → todosView todo-add listener, todosView todo-add listener calls addTodo - a system's deletes are links of their own, red, from its output into the deleted component's input, related and hot as the rest - every other row of a component, resource, element or outside box is striped across the box, reading across to its port
…ed, so the heading stands apart
…s listing rows with ports
…top left as the map scrolls beneath it
…rner, rounded only at its free corner
… keys and queries, and the systems' lookups on them
…what they're built from to the systems looking them up or watching them
…s listed, exported: false, and shown muted in its module
… gaps' midlines, and scroll to every link
… archetypes box under a module's components
…ut; hovered links march their dashes from source to target
…again as the map's geometry changes, from unrounded positions
…acks, a net to a track, widening gaps too narrow to hold them
… across; order tracks and trade them to cross less over the whole drawing
…d writes it with every build; link templates replace the source path
Co-Authored-By: OpenCode <noreply@opencode.ai>
Co-Authored-By: OpenCode <noreply@opencode.ai>
…aries do, so the viewer typechecks before the build Co-Authored-By: OpenCode <noreply@opencode.ai>
…as a watcher may still be starting Co-Authored-By: OpenCode <noreply@opencode.ai>
…s its Linux browser fails; a follow-up to fix them Co-Authored-By: OpenCode <noreply@opencode.ai>
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
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.
Architecture maps for apps built on
@adobe/ecs: an analysis in@adobe/ecs-architecturethat writes a normalized document of an app's architecture, a new viewer app,@adobe/ecs-architecture-viewer, that draws it, and one Vite plugin that keeps an app's map current in dev and writes it with every build.Includes
@adobe/ecs0.8.0's query refactor (also in #287), which this work builds on; #287's entity-generations commits to@adobe/dataare not included.Using it
/architecture/, regenerated as source changes; the open map reloads, keeping its view (which lives in the URL).dist/architecture/holds the viewer and the app's map; publish it with the app. Source links point to the file and line on GitHub at the built commit (frompackage.json'srepository); in dev they open VS Code.ecs-architecture map [--out <folder>] [--json [<file>]] [--web].The map
name(input)), elements (properties and events), plugins with theirconnect(defined elements, connected plugins, listenersevent → system({ fields })).publictrait's violations in red.@adobe/ecs-architecturearchitectureOf(...): the document (nodes for folders, components, resources, indexes, archetypes, systems, elements, properties, events, fields, plugins, connects, definitions, listeners), each system's accesses from the build's own inference.public-access(the newpublictrait on components and resources:true | false | "read" | "write"),connect-layer,run-in-connect,elements-defined(views define elements by their elements layer's constant).Architecture.plugin()in@adobe/ecs-architecture/vite.@adobe/ecspublictrait (meta; the build leaves it out of registration,ecs-architecturechecks it).Samples
Elements layers export their elements by tag (
<feature>Elements); views define them with it. All standard samples depend on the viewer and have anarchitecturescript; the todo sample usesArchitecture.plugin().Versions
@adobe/ecs0.8.0,@adobe/ecs-architecture0.7.0,@adobe/ecs-persistence0.3.0,@adobe/ecs-gpu0.0.5,@adobe/ecs-architecture-viewer0.1.0 (new).Tests
The ECS workspace builds, typechecks and lints; every package's tests pass (ecs 2076, ecs-architecture 156, viewer 147, guide 136, samples), and
check:workspacepasses. The viewer's browser tests check routing invariants (directions, clearances, tracks, crossings, zoom exactness) over the todo, particles, voxel editor and self maps.Follow-ups are in
ecs/packages/ecs-architecture/FOLLOWUPS.mdandecs/packages/ecs-architecture-viewer/FOLLOWUPS.md(notably a publicCompiler.describebefore the map's analysis is published, and publishing the samples' maps on the site).