Event is fired after a `RendererInstance::init()` is called. | +| PluginsChanged | RendererInstance | Internal | Called while Configuring, when the Settings have changed to add/remove Plugins.This should only occur in `configure` Render Mode from the `ConfigurationRenderer`.| +| SchemaChanged | SettingsManager | Internal | Called while Configuring, when a Plugin overrides a Schema Entry.This should only occur in `configure` Render Mode from the `ConfigurationRenderer`.| + + +## Plugin + +| Event Name | Source | Scope | Note | +| ----------------- | ------ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| SyncSettings | Plugin | Plugin -> Internal | Called by a Plugin when it updates Form/Settings Data for the User (i.e., Auth Flows, etc).Handled by the `ConfigurationRenderer`.| +| MiddlewareExecute | Plugin | Plugin -> Internal | Called from a Plugin when it wants to execute a Middleware Chain.Note: Only the *first* Plugin to Register against the Chain Name will be able to Execute the Chain.Handled by the `BusManager`.| diff --git a/.github/docs/plugin_integration.excalidraw.svg b/.github/docs/plugin_integration.excalidraw.svg new file mode 100644 index 0000000..9792d93 --- /dev/null +++ b/.github/docs/plugin_integration.excalidraw.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b7c8ca1 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Debug App", + "url": "http://localhost:5173", + "webRoot": "${workspaceFolder}/src", + "runtimeArgs": ["--remote-debugging-port=9222"] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..88c7e8a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{ "editor.wordWrapColumn": 105 } diff --git a/README.md b/README.md index c32b268..36d3b62 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,13 @@ -# HangoutHere Overlay: Chat +# HangoutHere | Project COAP -## TODO +* [Lifecycle Diagram](.github/docs/app_lifecycle.excalidraw.svg) +* [Events](.github/docs/events.md) -### Default Settings +### Default Settings Thinkery -* Need `RendererInstanceEvents.SETTINGS_STALE` to re-init settings - * Necessary for when a Plugin/etc changes settings/schema - * Should this trigger an entire re-`init` of the `SettingsRenderer` or can we get away with re-Deserializing the Form Data? * All Inputs * Needs REQUIRED set * Needs READONLY set -* Single Inputs - * Default Value - Should be working * Multi Inputs * Needs per-value constraints * Default Value - I don't think exists @@ -30,40 +26,32 @@ ### General TODO -#### Lifecycle Events: - * Do they all have common namespace? I.E., `Core::EventName` - -| Event Name | Note | -| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PluginManager::PluginsLoaded` | Called after all plugins are loaded, should re-mask settings
* But *why* do we want to re-mask settings *THEN*? | -| `PluginManager::PluginsUnloaded` | Called after all plugins are unloaded, which resets the environment (mostly Bus). | -| `Renderer::PluginsChanged` | Called when Configuring, when the settings have changed to add/remove Plugins. Ideally, should never occur at app/run-time.
* Replaces the `RendererInstanceEvents.PLUGINS_STALE` event. | -| `Renderer::SyncCache` | Called when the state of the Form is out of sync with the `ProcessedFormSchema` cache and needs to be re-processed against the current Form Settings. Generally, this is called when a `FormSchemaGroupingList` adds a new Entry through user interaction.
* I think this might need to be re-broadcasted on the Renderer for the `LifecycleManager` to listen to and then reprocess plugin schemas. | -| `AppBootstrapper::RendererStart` | `'app' \| 'configure'` - The Renderer has started in some. Plugins should listen to this and do their kick offs. Currently, we're explicitly calling a `render*` functions. | -| `Plugin::SyncSettings` | Called when something (generally a plugin, but could be `Form::Interactions`) updates the state of the Form/Settings/Schema and needs everything to come into sync. | +#### TODO * Refactor: - * REVIEW ALL DOCUMENTATION NOW!!!! + * Plugins: + * should `ref` be generated by the engine? * Forms: * For multi-select items, need separation between value/label * See info above - * Default/Required/Readonly Values for both single/multi/group Entries + * Default/Required/Readonly Values for both ~~single~~/multi/group Entries + * Need `