From 8f922c7b9ad9714d531409df16c50475bb9e2e84 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Sun, 28 Mar 2021 01:42:00 -0700 Subject: [PATCH] Update architecture diagram with fleshed out editor state flow --- docs/codebase/architecture-overview.nomnoml | 39 ++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/docs/codebase/architecture-overview.nomnoml b/docs/codebase/architecture-overview.nomnoml index 5c8d7ec8..1339aa85 100644 --- a/docs/codebase/architecture-overview.nomnoml +++ b/docs/codebase/architecture-overview.nomnoml @@ -11,9 +11,9 @@ #.document: fill=darkorange title=bold #.renderer: fill=gold title=bold -// Hierarchy +// Dependencies -[ Core Libraries| +[ Clients and Core Libraries| [ Frontend Editor Client] [ Headless Editor Client] [ Application Client @@ -35,7 +35,8 @@ One of many possible frontend implementations, such as the native or web client. ] -[Frontend Implementation] -> Event [Editor Event Dispatcher] +[Frontend Implementation] Response <-> Event [Dispatcher] +[Frontend Implementation] <-- Rendered Viewport [ From: Final Render Assembler] [ CLI Implementation| A possible text-based CLI program that @@ -50,17 +51,24 @@ // Editor -[ Editor Event Dispatcher| +[ Dispatcher| Convert all events from the frontend into Actions and Operations. Actions are diffs to update state stores. Operations are history events in a .gdd file. Operations and document-specific Actions include the document ID in the call. ] -[Editor Event Dispatcher] -> Action [Editor State Store] -[Editor Event Dispatcher] -> Action [Open Documents State Store] -[Editor Event Dispatcher] -> Update Bounds [Scheduler] -[Editor Event Dispatcher] -> Operation [Design Document Maintainer] +[Dispatcher] <-> Action [Editor State Store] +[Dispatcher] <-> Action [Open Documents State Store] +[Dispatcher] -> Update Bounds [Scheduler] +[Dispatcher] -> Operation [Design Document Maintainer] + +[ Open Documents State Store| + For each open document:| + [ Pan and zoom viewport bounds]| + [ Selected layers] +] +[Tool State Machine] <- [Open Documents State Store] [ Editor State Store| [ Panel Layout]| @@ -70,21 +78,12 @@ [ Modifier Key Input]| [ Currently Hovered Panel] ] -[Editor State Store] -> [Frontend Implementation] [Editor State Store] -> [Tool State Machine] -[ Open Documents State Store| - For each open document:| - [ Pan and zoom viewport bounds]| - [ Selected layers] -] -[Open Documents State Store] -> [Tool State Machine] -[Open Documents State Store] -> [Frontend Implementation] - [ Tool State Machine| - List possible operations in current context + List the possible operations in current context ] -[Tool State Machine] -> [Frontend Implementation] +[Tool State Machine] -> [Dispatcher] // Document @@ -162,4 +161,4 @@ Operates when woken up by the scheduler when root tiles or render bounds are updated. ] -[Final Render Assembler] --> Rendered Viewport [Frontend Implementation] \ No newline at end of file +[Final Render Assembler] --> Rendered Viewport [ To: Frontend Implementation] \ No newline at end of file