diff --git a/website/content/docs/architecture.md b/website/content/docs/architecture.md index 801d1097..26f37de2 100755 --- a/website/content/docs/architecture.md +++ b/website/content/docs/architecture.md @@ -34,7 +34,7 @@ Selectors are functions defined within reducers used to compute derived data fro **selectEntries:** Selects all entries for a given collection. -**getAsset:** Selects a single AssetProxy object for the given URI. +**getAsset:** Selects a single AssetProxy object for the given path. ## Value Objects **AssetProxy:** AssetProxy is a Value Object that holds information regarding an asset file (for example, an image), whether it's persisted online or held locally in cache. @@ -59,7 +59,7 @@ The control component receives one (1) callback as a prop: `onChange`. * onChange (required): Should be called when the users changes the current value. It will ultimately end up updating the EntryDraft object in the Redux Store, thus updating the preview component. * onAddAsset & onRemoveAsset (optionals): Should be invoked with an `AssetProxy` value object if the field accepts file uploads for media (images, for example). `onAddAsset` will get the current media stored in the Redux state tree while `onRemoveAsset` will remove it. AssetProxy objects are stored in the `Medias` object and referenced in the `EntryDraft` object on the state tree. -Both control and preview widgets receive a `getAsset` selector via props. Displaying the media (or its URI) for the user should always be done via `getAsset`, as it returns an AssetProxy that can return the correct value for both medias already persisted on the server and cached media not yet uploaded. +Both control and preview widgets receive a `getAsset` selector via props. Displaying the media (or its URI) for the user should always be done via `getAsset`, as it returns a Promise that resolves to an AssetProxy that can return the correct value for both medias already persisted on the server and cached media not yet uploaded. The actual persistence of the content and medias inserted into the control component is delegated to the backend implementation. The backend will be called with the updated values and a list of assetProxy objects for each field of the entry, and should return a promise that can resolve into the persisted entry object and the list of the persisted media URIs. diff --git a/website/content/docs/customization.md b/website/content/docs/customization.md index e8c49a96..6f8f7ec0 100644 --- a/website/content/docs/customization.md +++ b/website/content/docs/customization.md @@ -71,20 +71,54 @@ Registers a template for a folder collection or an individual file in a file col ```html ``` ### Lists and Objects