Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor fixes to documentation #1543

Merged
merged 1 commit into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/developer-guide/plugins-architecture.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Plugins Architecture

MapStore2 fully embraces both ReactJS and Redux concepts, enhancing them with the **plugin** concept.

A plugin in MapStore2 is a smart ReactJS component that is:

* **connected** to a Redux store, so that some properties are automatically wired to the standard MapStore2 state
* **wired** to standard actions for common events

In addition a plugin:
In addition a plugin:

* declares one or more **reducers** that need to be added to the Redux store
* declares some **reducers** that need to be added to the Redux store, if needed
* declares some **epics** that need to be added to the redux-observable middleare, if needed
* is fully **configurable** to be easily customized to a certain level

## Building an application using plugins
Expand Down Expand Up @@ -55,7 +58,7 @@ pluginsConfig.json:
```

### Declare a plugins compatible Redux Store
Create a store that properly initializes plugins reducers (see [standardStore.js](https://github.com/geosolutions-it/MapStore2/blob/master/web/client/stores/StandardStore.js)) :
Create a store that properly initializes plugins reducers and epics (see [standardStore.js](https://github.com/geosolutions-it/MapStore2/blob/master/web/client/stores/StandardStore.js)) :

store.js:

Expand Down
8 changes: 4 additions & 4 deletions web/client/plugins/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ToggleButton = require('./searchbar/ToggleButton');
* "withToggle": ["max-width: 768px", "min-width: 768px"]
* }
* }
* @class
* @class Search
* @memberof plugins
* @prop {object} cfg.searchOptions initial search options
* @prop {searchService[]} cfg.searchOptions.services a list of services to perform search.
Expand All @@ -91,7 +91,7 @@ const ToggleButton = require('./searchbar/ToggleButton');
* "type": "wfs",
* "priority": 2,
* "displayName": "${properties.propToDisplay}",
* "subTitle": " (subtitle of the results from this service)",
* "subTitle": " (a subtitle for the results coming from this service [ can contain expressions like ${properties.propForSubtitle}])",
* "options": {
* "url": "/geoserver/wfs",
* "typeName": "workspace:layer",
Expand All @@ -100,7 +100,7 @@ const ToggleButton = require('./searchbar/ToggleButton');
* "srsName": "EPSG:4326",
* "maxFeatures": 4
* },
* "nestedPlaceholder": "Digita numero civico o località",
* "nestedPlaceholder": "Write other text to refine the search...",
* "then": [ ... an array of services to use when one item of this service is selected]
* }
* ```
Expand All @@ -114,7 +114,7 @@ const ToggleButton = require('./searchbar/ToggleButton');
* }
* }
* ```
* **note** `searchTextTemplate` is useful to populate the search text input when a search result is selected, typically with "leaf" services.
* **note:** `searchTextTemplate` is useful to populate the search text input when a search result is selected, typically with "leaf" services.
* @prop {array|boolean} cfg.withToggle when boolean, true uses a toggle to display the searchbar. When array, e.g `["max-width: 768px", "min-width: 768px"]`, `max-width` and `min-width` are the limits where to show/hide the toggle (useful for mobile)
*/
const SearchPlugin = connect((state) => ({
Expand Down