docs: improve architecture.md grammar (#1677)
This commit is contained in:
parent
caa34686e3
commit
8c2217720f
@ -1041,6 +1041,15 @@
|
||||
"bug",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "g-hodges",
|
||||
"name": "Glendon Hodges",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/22135379?v=4",
|
||||
"profile": "https://github.com/g-hodges",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"repoType": "github"
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Netlify CMS
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-117-orange.svg)](#contributors)
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-119-orange.svg)](#contributors)
|
||||
[![Open Source Helpers](https://www.codetriage.com/netlify/netlify-cms/badges/users.svg)](https://www.codetriage.com/netlify/netlify-cms)
|
||||
[![](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/netlify/netlifycms)
|
||||
|
||||
@ -78,7 +78,7 @@ These wonderful folks are responsible for developing and maintaining Netlify CMS
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/26639499?v=4" width="100px;"/><br /><sub><b>David Ko</b></sub>](https://github.com/daveyko)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=daveyko "Code") | [<img src="https://avatars3.githubusercontent.com/u/440562?v=4" width="100px;"/><br /><sub><b>Iñaki García</b></sub>](http://www.txorua.com)<br />[🎨](#design-igarbla "Design") | [<img src="https://avatars3.githubusercontent.com/u/27162255?v=4" width="100px;"/><br /><sub><b>Sam</b></sub>](https://github.com/gazebosx3)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gazebosx3 "Code") | [<img src="https://avatars1.githubusercontent.com/u/174777?v=4" width="100px;"/><br /><sub><b>Josh Dzielak</b></sub>](https://dzello.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=dzello "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/2193?v=4" width="100px;"/><br /><sub><b>Jeremy Bise</b></sub>](http://thosegeeks.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=jeremybise "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/13282103?v=4" width="100px;"/><br /><sub><b>terrierscript</b></sub>](https://terrierscript.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=terrierscript "Code") | [<img src="https://avatars0.githubusercontent.com/u/3949335?v=4" width="100px;"/><br /><sub><b>Christopher Geary</b></sub>](https://twitter.com/crgeary)<br />[🔌](#plugin-crgeary "Plugin/utility libraries") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/23248886?v=4" width="100px;"/><br /><sub><b>Brian Macdonald</b></sub>](https://github.com/brianlmacdonald)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=brianlmacdonald "Code") | [<img src="https://avatars1.githubusercontent.com/u/15092?v=4" width="100px;"/><br /><sub><b>John Vandenberg</b></sub>](https://jayvdb.github.io/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=jayvdb "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/24911956?v=4" width="100px;"/><br /><sub><b>MarkZither</b></sub>](https://github.com/MarkZither)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=MarkZither "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/9257284?v=4" width="100px;"/><br /><sub><b>Rob Phoenix</b></sub>](https://www.robphoenix.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=robphoenix "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/3028764?v=4" width="100px;"/><br /><sub><b>Steve Lathrop</b></sub>](https://www.SteLa.io)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=slathrop "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=slathrop "Documentation") [💡](#example-slathrop "Examples") | [<img src="https://avatars0.githubusercontent.com/u/10004167?v=4" width="100px;"/><br /><sub><b>Maciej Matuszewski</b></sub>](https://github.com/maciejmatu)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=maciejmatu "Code") | [<img src="https://avatars0.githubusercontent.com/u/36023898?v=4" width="100px;"/><br /><sub><b>Eko Eryanto</b></sub>](https://github.com/ekoeryanto)<br />[🔌](#plugin-ekoeryanto "Plugin/utility libraries") |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/366688?v=4" width="100px;"/><br /><sub><b>Taylor D. Edmiston</b></sub>](http://blog.tedmiston.com/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=tedmiston "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1088089?v=4" width="100px;"/><br /><sub><b>Daniel Mahon</b></sub>](https://www.mahonstudios.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=danielmahon "Code") | [<img src="https://avatars1.githubusercontent.com/u/16711653?v=4" width="100px;"/><br /><sub><b>Evan Hennessy</b></sub>](https://www.hennessyevan.com)<br />[🔌](#plugin-hennessyevan "Plugin/utility libraries") | [<img src="https://avatars1.githubusercontent.com/u/3259517?v=4" width="100px;"/><br /><sub><b>Hasan Azizul Haque</b></sub>](https://hasanavi.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Documentation") [🤔](#ideas-hasanavi "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/5166612?v=4" width="100px;"/><br /><sub><b>Robert Karlsson</b></sub>](https://github.com/robertkarlsson)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Arobertkarlsson "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/3484527?v=4" width="100px;"/><br /><sub><b>Gil Greenberg</b></sub>](http://gilgreenberg.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gil-- "Code") | [<img src="https://avatars0.githubusercontent.com/u/649890?v=4" width="100px;"/><br /><sub><b>Tyler Ipson</b></sub>](http://loremipson.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=loremipson "Documentation") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/1061992?v=4" width="100px;"/><br /><sub><b>Jake Rayson</b></sub>](https://www.growdigital.org/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=growdigital "Code") [📝](#blog-growdigital "Blogposts") [💡](#example-growdigital "Examples") | [<img src="https://avatars1.githubusercontent.com/u/29014463?v=4" width="100px;"/><br /><sub><b>Yashu Mittal</b></sub>](https://mittalyashu.now.sh/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=mittalyashu "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/1061992?v=4" width="100px;"/><br /><sub><b>Jake Rayson</b></sub>](https://www.growdigital.org/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=growdigital "Code") [📝](#blog-growdigital "Blogposts") [💡](#example-growdigital "Examples") | [<img src="https://avatars1.githubusercontent.com/u/42543284?v=4" width="100px;"/><br /><sub><b>Kurt collins</b></sub>](https://github.com/kurtgcollins)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=kurtgcollins "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1516558?v=4" width="100px;"/><br /><sub><b>Cory Williamson-Cardneau</b></sub>](http://cory.williamson-cardneau.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=cory-wc "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/31967674?v=4" width="100px;"/><br /><sub><b>Casey Schroeder</b></sub>](https://github.com/cdschroeder)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=cdschroeder "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/8009243?v=4" width="100px;"/><br /><sub><b>Mitchell Cash</b></sub>](https://mitchellcash.com)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3AMitchellCash "Bug reports") [📖](https://github.com/netlify/netlify-cms/commits?author=MitchellCash "Documentation") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/1061992?v=4" width="100px;"/><br /><sub><b>Jake Rayson</b></sub>](https://www.growdigital.org/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=growdigital "Code") [📝](#blog-growdigital "Blogposts") [💡](#example-growdigital "Examples") | [<img src="https://avatars1.githubusercontent.com/u/29014463?v=4" width="100px;"/><br /><sub><b>Yashu Mittal</b></sub>](https://mittalyashu.now.sh/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=mittalyashu "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/42543284?v=4" width="100px;"/><br /><sub><b>Kurt collins</b></sub>](https://github.com/kurtgcollins)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=kurtgcollins "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1516558?v=4" width="100px;"/><br /><sub><b>Cory Williamson-Cardneau</b></sub>](http://cory.williamson-cardneau.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=cory-wc "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/31967674?v=4" width="100px;"/><br /><sub><b>Casey Schroeder</b></sub>](https://github.com/cdschroeder)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=cdschroeder "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/8009243?v=4" width="100px;"/><br /><sub><b>Mitchell Cash</b></sub>](https://mitchellcash.com)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3AMitchellCash "Bug reports") [📖](https://github.com/netlify/netlify-cms/commits?author=MitchellCash "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/22135379?v=4" width="100px;"/><br /><sub><b>Glendon Hodges</b></sub>](https://github.com/g-hodges)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=g-hodges "Documentation") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
@ -6,7 +6,7 @@ group: contributing
|
||||
|
||||
Netlify CMS is a React application, using Redux for state management with immutable data structures (immutable.js).
|
||||
|
||||
The core abstractions for content editing are `collections`, `entries` and `widgets`.
|
||||
The core abstractions for content editing are `collections`, `entries`, and `widgets`.
|
||||
|
||||
Each `collection` represents a collection of entries. This can either be a collection of similar entries with the same structure, or a set of entries where each has its own structure.
|
||||
|
||||
@ -51,13 +51,13 @@ For either updating an existing entry or creating a new one, the `EntryEditor` i
|
||||
|
||||
* When mounted, the `EntryPage` container component dispatches the `createDraft` action, setting the `entryDraft` state to a blank state (in case of a new entry) or to a copy of the selected entry (in case of an edit).
|
||||
* The `EntryPage` will also render widgets for each field type in the given entry.
|
||||
* Widgets are used for editing entry fields. There are different widgets for different field types, and they are always defined in a pair containing a `control` and a `preview` component. The control component is responsible for presenting the user with the appropriate interface for manipulating the current field value, while the preview component is responsible for displaying the value with the appropriate styling.
|
||||
* Widgets are used for editing entry fields. There are different widgets for different field types, and they are always defined in a pair containing a `control` component and a `preview` component. The control component is responsible for presenting the user with the appropriate interface for manipulating the current field value. The preview component is responsible for displaying the value with the appropriate styling.
|
||||
|
||||
#### Widget components implementation
|
||||
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): If the field accepts file uploads for media (images, for example), these callbacks should be invoked with a `AssetProxy` value object. `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.
|
||||
* 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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user