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

Fix add missing docs formatting #975

Merged
merged 2 commits into from
Dec 10, 2018
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
190 changes: 96 additions & 94 deletions CHANGELOG.md

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ used in a browser environment using the JavaScript SDK.

Marketplace features included in Saunatime:

* **Location search** shows the user if there are saunas available in a given location.
* **The listing page** gives a detailed view about what a particular sauna offers.
* **Transaction process**: Saunatime uses nightly booking.
* **Notifications**: Emails are sent during the booking process to alert customers and providers
- **Location search** shows the user if there are saunas available in a given location.
- **The listing page** gives a detailed view about what a particular sauna offers.
- **Transaction process**: Saunatime uses nightly booking.
- **Notifications**: Emails are sent during the booking process to alert customers and providers
about changes in the booking state.
* **Inbox** lists **orders** and **sales**.
* **Reviews** can be given after a completed transaction.
* **User profiles** provide detailed information about a given user.
* **Extended data:** The listing and user data models are modified using extended data.
- **Inbox** lists **orders** and **sales**.
- **Reviews** can be given after a completed transaction.
- **User profiles** provide detailed information about a given user.
- **Extended data:** The listing and user data models are modified using extended data.

## How to customize this template

Expand All @@ -33,28 +33,28 @@ The easiest way to start a customization project is to read through the

Documentation for specific topics can be found in the following files:

* [Customization guide](customization-guide.md)
* [Folder structure](folder-structure.md)
* [Integration to map providers](map-providers.md)
* [Translations](translations.md)
* [Styling a marketplace](styling.md)
* [Static pages](static-pages.md)
* [Terms of Service and Privacy Policy](terms-of-service-and-privacy-policy.md)
* [Routing](routing.md)
* [Redux and duck files](redux.md)
* [Extended data](extended-data.md)
* [Extend the listing data model](extend-listing.md)
* [Search filters](search-filters.md)
* [Testing](testing.md)
* [Error logging with Sentry](sentry.md)
* [Analytics](analytics.md)
* [Continuous Integration (CI)](ci.md)
* [Content Security Policy (CSP)](content-security-policy.md)
* [Original create-react-app documentation](https://github.com/sharetribe/create-react-app/blob/master/packages/react-scripts/template/README.md)
* [Customization checklist](customization-checklist.md)
* [Icons](icons.md)
* [Improving performance](improving-performance.md)
* [Deploying to production](deploying-to-production.md)
- [Customization guide](customization-guide.md)
- [Folder structure](folder-structure.md)
- [Integration to map providers](map-providers.md)
- [Translations](translations.md)
- [Styling a marketplace](styling.md)
- [Static pages](static-pages.md)
- [Terms of Service and Privacy Policy](terms-of-service-and-privacy-policy.md)
- [Routing](routing.md)
- [Redux and duck files](redux.md)
- [Extended data](extended-data.md)
- [Extend the listing data model](extend-listing.md)
- [Search filters](search-filters.md)
- [Testing](testing.md)
- [Error logging with Sentry](sentry.md)
- [Analytics](analytics.md)
- [Continuous Integration (CI)](ci.md)
- [Content Security Policy (CSP)](content-security-policy.md)
- [Original create-react-app documentation](https://github.com/sharetribe/create-react-app/blob/master/packages/react-scripts/template/README.md)
- [Customization checklist](customization-checklist.md)
- [Icons](icons.md)
- [Improving performance](improving-performance.md)
- [Deploying to production](deploying-to-production.md)

The application was bootstrapped with a forked version of
[create-react-app](https://github.com/facebookincubator/create-react-app). While most of the
Expand Down
14 changes: 7 additions & 7 deletions docs/content-security-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The CSP is configured using the `REACT_APP_CSP` environment variable.

Possible values:

* not set: disabled
* `REACT_APP_CSP=report`: Enabled, but policy violations are only reported
* `REACT_APP_CSP=block`: Enabled. Policy violations are reported and requests that violate the
- not set: disabled
- `REACT_APP_CSP=report`: Enabled, but policy violations are only reported
- `REACT_APP_CSP=block`: Enabled. Policy violations are reported and requests that violate the
policy are blocked

If error logging with Sentry is enabled (See [Error logging with Sentry](sentry.md)), the reports
Expand All @@ -37,7 +37,7 @@ URL.

To understand what CSP is and how browsers work, here are some resources:

* https://content-security-policy.com/
* https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
* https://ponyfoo.com/articles/content-security-policy-in-express-apps
* https://helmetjs.github.io/docs/csp/
- https://content-security-policy.com/
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
- https://ponyfoo.com/articles/content-security-policy-in-express-apps
- https://helmetjs.github.io/docs/csp/
54 changes: 27 additions & 27 deletions docs/customization-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

Some generic things to update and check when starting to customize the template.

* [Marketplace colors](styling.md)
* [Generate app icons](icons.md)
* [Update translations](../src/translations/en.json) or [change the language](translations.md)
* [LandingPage](../src/containers/LandingPage/LandingPage.js): update and create branded sections
* [Footer](../src/components/Footer/Footer.js)
* [AboutPage](../src/containers/AboutPage/AboutPage.js)
* [Terms of Service](terms-of-service-and-privacy-policy.md#terms-of-service)
* [Privacy Policy](terms-of-service-and-privacy-policy.md#privacy-policy)
* [Social media sharing graphics](../src/components/Page/Page.js);
* [Logo](../src/components/Logo/Logo.js) Change and check that it works on Topbar, Footer, and
- [Marketplace colors](styling.md)
- [Generate app icons](icons.md)
- [Update translations](../src/translations/en.json) or [change the language](translations.md)
- [LandingPage](../src/containers/LandingPage/LandingPage.js): update and create branded sections
- [Footer](../src/components/Footer/Footer.js)
- [AboutPage](../src/containers/AboutPage/AboutPage.js)
- [Terms of Service](terms-of-service-and-privacy-policy.md#terms-of-service)
- [Privacy Policy](terms-of-service-and-privacy-policy.md#privacy-policy)
- [Social media sharing graphics](../src/components/Page/Page.js);
- [Logo](../src/components/Logo/Logo.js) Change and check that it works on Topbar, Footer, and
CheckoutPage
* [Default background image](../src/assets/background-1440.jpg)
* [Maps Marker icon](../src/components/Map/images/marker-32x32.png)
* [Config: update environment variables](../src/config.js)
* [Config: siteTitle](../src/config.js) for page schema (SEO)
* [Config: marketplace address](../src/config.js): contact details also improve SEO
* [Config: social media pages](../src/config.js)
* [Marketplace custom config](../src/marketplace-custom-config.js)
* Update [ListingPage](../src/containers/ListingPage/ListingPage.js) to show extended data (aka
- [Default background image](../src/assets/background-1440.jpg)
- [Maps Marker icon](../src/components/Map/images/marker-32x32.png)
- [Config: update environment variables](../src/config.js)
- [Config: siteTitle](../src/config.js) for page schema (SEO)
- [Config: marketplace address](../src/config.js): contact details also improve SEO
- [Config: social media pages](../src/config.js)
- [Marketplace custom config](../src/marketplace-custom-config.js)
- Update [ListingPage](../src/containers/ListingPage/ListingPage.js) to show extended data (aka
publicData attribute)
* Update [EditListingWizard](../src/components/EditListingWizard/EditListingWizard.js) and panels to
- Update [EditListingWizard](../src/components/EditListingWizard/EditListingWizard.js) and panels to
add extended data
* Update [SearchPage](../src/containers/SearchPage/SearchPage.js) to filter with extended data
* Update [routeConfiguration](../src/routeConfiguration.js) if needed
* Update [Email templates](../ext/default-mail-templates), all of them: .html, subject.txt, and
- Update [SearchPage](../src/containers/SearchPage/SearchPage.js) to filter with extended data
- Update [routeConfiguration](../src/routeConfiguration.js) if needed
- Update [Email templates](../ext/default-mail-templates), all of them: .html, subject.txt, and
text.txt
* Update [config: bookingUnitType](../src/config.js) if needed
* If `line-item/units` is used, add quantity handling to
- Update [config: bookingUnitType](../src/config.js) if needed
- If `line-item/units` is used, add quantity handling to
[BookingDatesForm](../src/forms/BookingDatesForm/BookingDatesForm.js),
[ListingPage](../src/containers/ListingPage/ListingPage.js),
[CheckoutPage](../src/containers/CheckoutPage/CheckoutPage.js)

## What else

* Do you need more [static pages](static-pages.md)?
* Changes to existing pages
* Changes to transaction process (API + Web app)
- Do you need more [static pages](static-pages.md)?
- Changes to existing pages
- Changes to transaction process (API + Web app)
20 changes: 10 additions & 10 deletions docs/customization-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ repository is the recommended way to proceed. Follow this guide for instructions

Install required tools:

* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
- [Node.js](https://nodejs.org/)
- [Yarn](https://yarnpkg.com/)

## Technologies

Expand All @@ -24,13 +24,13 @@ get-go.

Here are some main technologies that the template uses:

* JavaScript: programming language for the whole application
* CSS: styling the user interface using [CSS Modules](https://github.com/css-modules/css-modules)
* [React](https://reactjs.org/): library for creating user interfaces with components
* [Redux](https://redux.js.org/): state and data flow handling
* [Final Form](https://github.com/final-form/final-form): forms
* [React Router](https://reacttraining.com/react-router/): routing
* [Express](https://expressjs.com/): server
- JavaScript: programming language for the whole application
- CSS: styling the user interface using [CSS Modules](https://github.com/css-modules/css-modules)
- [React](https://reactjs.org/): library for creating user interfaces with components
- [Redux](https://redux.js.org/): state and data flow handling
- [Final Form](https://github.com/final-form/final-form): forms
- [React Router](https://reacttraining.com/react-router/): routing
- [Express](https://expressjs.com/): server

## Setup

Expand Down Expand Up @@ -109,7 +109,7 @@ To develop the application and to see changes live, start the frontend developme

**Known issues:**

* Adding/changing `import`s may not be synced properly with ESLint. You may see an error
- Adding/changing `import`s may not be synced properly with ESLint. You may see an error
`Unable to resolve path to module` even though the module existing in right path. Restarting the
server doesn't help. To solve the issue, you need to make a change to the file where the error
occurs.
Expand Down
20 changes: 10 additions & 10 deletions docs/deploying-to-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ Start the server:

## Deploying to Heroku

* [Forking the repository](#forking-the-repository)
* [Creating new app](#creating-new-app)
* [Connect GitHub to Heroku](#connect-github-to-heroku)
* [Heroku settings](#heroku-settings)
* [Updating enviroment variables](#updating-enviroment-variables)
* [Domains and certificates](#domains-and-certificates)
* [Heroku logs](#heroku-logs)
- [Forking the repository](#forking-the-repository)
- [Creating new app](#creating-new-app)
- [Connect GitHub to Heroku](#connect-github-to-heroku)
- [Heroku settings](#heroku-settings)
- [Updating enviroment variables](#updating-enviroment-variables)
- [Domains and certificates](#domains-and-certificates)
- [Heroku logs](#heroku-logs)

Before creating the app you need three accounts: [Heroku](https://heroku.com/),
[Stripe](https://stripe.com/fi) and [MapBox](https://www.mapbox.com/). Creating the accounts is free
Expand Down Expand Up @@ -100,7 +100,7 @@ from any branch in the repository.

Read more from Heroku docs:

* [GitHub Integration](https://devcenter.heroku.com/articles/github-integration)
- [GitHub Integration](https://devcenter.heroku.com/articles/github-integration)

### Heroku settings

Expand All @@ -123,8 +123,8 @@ SSH settings in the _Settings tab_.

Read more from Heroku docs:

* [Custom Domain Names for Apps](https://devcenter.heroku.com/articles/custom-domains)
* [Manually Acquiring an SSL/TLS Certificate](https://devcenter.heroku.com/articles/acquiring-an-ssl-certificate)
- [Custom Domain Names for Apps](https://devcenter.heroku.com/articles/custom-domains)
- [Manually Acquiring an SSL/TLS Certificate](https://devcenter.heroku.com/articles/acquiring-an-ssl-certificate)

![Heroku settings](./assets/deploying-to-production/heroku-domains.png)

Expand Down
8 changes: 4 additions & 4 deletions docs/extend-listing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Adding new attributes to the data model relies on a Flex concept called

Three main areas in extending the listing data model are:

* [Declare the attribute and it's possible values](#declare-the-attribute-and-its-possible-values)
* [Edit the listing wizard](#edit-the-listing-wizard)
* [Show the attribute on listing page](#show-the-attribute-on-listing-page)
* [Use the attribute as a search filter](#use-the-attribute-as-a-search-filter)
- [Declare the attribute and it's possible values](#declare-the-attribute-and-its-possible-values)
- [Edit the listing wizard](#edit-the-listing-wizard)
- [Show the attribute on listing page](#show-the-attribute-on-listing-page)
- [Use the attribute as a search filter](#use-the-attribute-as-a-search-filter)

In this guide we will extend the listing data model by adding a _capacity_ attribute.

Expand Down
16 changes: 8 additions & 8 deletions docs/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ API), and app icons. It also specifies placeholders for tags generated by

## src/

* `src/index.js` is the JavaScript entry point on the client-side (it also exports `renderApp`
- `src/index.js` is the JavaScript entry point on the client-side (it also exports `renderApp`
function to be used for server-side rendering).
* `src/app.js` creates ClientApp and ServerApp
* `src/routeConfiguration.js` defines logic between routes and page-level components
* `src/marketplace.css`, `src/marketplaceIndex.css`, `src/marketplaceIndex.css` define marketplace
- `src/app.js` creates ClientApp and ServerApp
- `src/routeConfiguration.js` defines logic between routes and page-level components
- `src/marketplace.css`, `src/marketplaceIndex.css`, `src/marketplaceIndex.css` define marketplace
level styling using [CSS Properties](http://cssnext.io/features/#custom-properties-var) and CSS
Property Sets.
* `src/translations/en.json` all English translations used in Saunatime template app. (A good place
- `src/translations/en.json` all English translations used in Saunatime template app. (A good place
to start customization.)

### `src/components/`
Expand All @@ -81,11 +81,11 @@ internal state, etc.

## server/

* `server/index.js` handles server-side rendering (SSR). Built with [Express](http://expressjs.com)
- `server/index.js` handles server-side rendering (SSR). Built with [Express](http://expressjs.com)
(Node.js framework).
* `server/csp.js` [Content Security Policy](https://content-security-policy.com), whitelist of
- `server/csp.js` [Content Security Policy](https://content-security-policy.com), whitelist of
domains that the application and loaded scripts are allowed to access from the browser.
* `server/sitemap.js` generates a minimal sitemap.xml for SEO purposes.
- `server/sitemap.js` generates a minimal sitemap.xml for SEO purposes.

## ext/default-mail-templates/

Expand Down
26 changes: 13 additions & 13 deletions docs/improving-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

When we think about page speed there are actually two different scenarios that we need to address:

* The speed of initial page load and possible reloads after that
* The speed of changing the page within Single page application (SPA)
- The speed of initial page load and possible reloads after that
- The speed of changing the page within Single page application (SPA)

The first one is usually a slower process. A browser needs to load all the HTML, CSS, JavaScript,
and images - and then it needs to understand and execute those files, calculate layout, paint
Expand All @@ -27,11 +27,11 @@ Read more about
We haven't yet implemented code splitting to reduce initial page rendering time, but there're other
improvements that could be done to improve both cases of page rendering.

* [Check page performance](#check-page-performance)
* [Optimize image sizes](#optimize-image-sizes)
* [Lazy load off-screen images and other components](#lazy-load-off-screen-images-and-other-components)
* [Use sparse fields](#use-sparse-fields)
* [About code-splitting](#about-code-splitting)
- [Check page performance](#check-page-performance)
- [Optimize image sizes](#optimize-image-sizes)
- [Lazy load off-screen images and other components](#lazy-load-off-screen-images-and-other-components)
- [Use sparse fields](#use-sparse-fields)
- [About code-splitting](#about-code-splitting)

## Check page performance

Expand All @@ -52,17 +52,17 @@ within your web app.

Quick checklist:

* Check that the actual dimensions of an image match with DOM element's dimensions.
* Lighthouse suggests that image compression level should be 85% or lower.
- Check that the actual dimensions of an image match with DOM element's dimensions.
- Lighthouse suggests that image compression level should be 85% or lower.
[Read more](https://developers.google.com/web/tools/lighthouse/audits/optimize-images)
* Good rule-of-thumb is that use JPEG for images and photos, where PNG is better for graphics, such
- Good rule-of-thumb is that use JPEG for images and photos, where PNG is better for graphics, such
as logos, graphs and illustrations.
* If you are using JPEG images, think about saving them as progressive JPEGs.
- If you are using JPEG images, think about saving them as progressive JPEGs.
[Read more](https://cloudinary.com/blog/progressive_jpegs_and_green_martians) +
[Photoshop guide](https://helpx.adobe.com/photoshop-elements/using/optimizing-images-jpeg-format.html)
* If you are using PNG images, consider running them through PNG optimizers to reduce file size.
- If you are using PNG images, consider running them through PNG optimizers to reduce file size.
Plenty of options available, one example is [TinyPNG.com](https://tinypng.com)
* Think about serving images and other static assets from some CDN.
- Think about serving images and other static assets from some CDN.
[Read more.](https://www.smashingmagazine.com/2017/04/content-delivery-network-optimize-images/)

## Lazy load off-screen images and other components
Expand Down
22 changes: 13 additions & 9 deletions docs/redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ level elements (unless you are modifying [a static page](static-pages.md)).
In the following subtopics, we assume that you know the
[basics of Redux](https://redux.js.org/basics) already.

* [Containers: Pages + TopbarContainer](#containers-pages--topbarcontainer)
* [Duck files](#duck-files)
* [Setting up Redux](#setting-up-redux)
* [Advanced Redux concepts: thunks](#advanced-redux-concepts-thunks)
- [Containers: Pages + TopbarContainer](#containers-pages--topbarcontainer)
- [Duck files](#duck-files)
- [Setting up Redux](#setting-up-redux)
- [Advanced Redux concepts: thunks](#advanced-redux-concepts-thunks)

## Containers: Pages + TopbarContainer

Expand All @@ -42,9 +42,13 @@ file. For example, `src/containers/TransactionPage/TransactionPage.js` connects
store with `mapStateToProps` and `mapDispatchToProps` functions:

```js
const TransactionPage = compose(connect(mapStateToProps, mapDispatchToProps), injectIntl)(
TransactionPageComponent
);
const TransactionPage = compose(
connect(
mapStateToProps,
mapDispatchToProps
),
injectIntl
)(TransactionPageComponent);
```

## Duck files
Expand Down Expand Up @@ -85,8 +89,8 @@ function (in `src/store.js`).
This setup creates a store structure that separates container specific state as well as global data
by their reducer names. Together with Ducks module naming schema, this means that:

* the state of the `ListingPage` can be found from `state.ListingPage` and
* the state of the global `user` object can be found from `state.user`.
- the state of the `ListingPage` can be found from `state.ListingPage` and
- the state of the global `user` object can be found from `state.user`.

## Advanced Redux concepts: thunks

Expand Down
Loading