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

Add the styleguide docs #62

Merged
merged 1 commit into from
Jul 1, 2019
Merged

Add the styleguide docs #62

merged 1 commit into from
Jul 1, 2019

Conversation

oscarpolanco
Copy link
Contributor

Add the styleguide docs

Close issue: #47

Steps for testing the site locally:

  • Go to the website folder
  • Install all dependencies using npm install
  • Start your local server using npm run start
  • Test locally at localhost

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7a577c9 on styleguide into 22e5b9a on master.

@coveralls
Copy link

coveralls commented May 4, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 7cc0f26 on styleguide into 3aeccd1 on master.

docs/style.md Outdated
---


On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theres a double space after data

Suggested change
On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This state
On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site

My guess is that you wanted to say This site instead of This state

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!!

docs/style.md Outdated

## Get component variations

Using the site name; `amphora-html` build the specific style path that we need to have all stylesheet that we need:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Using the site name; `amphora-html` build the specific style path that we need to have all stylesheet that we need:
Using the site name, `amphora-html` builds the specific style path that we need to have all the required stylesheets:

docs/style.md Outdated
Using the site name; `amphora-html` build the specific style path that we need to have all stylesheet that we need:
`styleguides/siteName/components`

If the name of the site is not available the `siteName` will be replaced for `_default` then return the list of the variation of the components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the name of the site is not available the `siteName` will be replaced for `_default` then return the list of the variation of the components.
If the name of the site is not available, the `siteName` property will be replaced for `_default` and return the list of the variation of the components.

docs/style.md Outdated

If the name of the site is not available the `siteName` will be replaced for `_default` then return the list of the variation of the components.

If a component variation exist we will receive a combination of the name of the component and the name of the variation separate by an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If a component variation exist we will receive a combination of the name of the component and the name of the variation separate by an
If a component variation exists, we will receive a combination of the name of the component and the name of the variation separate by an

docs/style.md Outdated
If the name of the site is not available the `siteName` will be replaced for `_default` then return the list of the variation of the components.

If a component variation exist we will receive a combination of the name of the component and the name of the variation separate by an
underscore like this example: `componentName_variationName`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be put together with line 23

Suggested change
underscore like this example: `componentName_variationName`
If a component variation exists, we will receive a combination of the name of the component and the name of the variation separate by an underscore like this example: `componentName_variationName`

docs/style.md Outdated

After getting the list of the variations expose on the state (or set on the data object that we receive) we can go throw each component defining it default styleguide. The following are the condition that we got to define which is the variation that we will add:

- The component has a variation set, but it doesn't exist in the site's styleguide or the default styleguide; render the component with the default variation;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The component has a variation set, but it doesn't exist in the site's styleguide or the default styleguide; render the component with the default variation;
- The component has a variation set, but it doesn't exists in the site's styleguide or the default styleguide; render the component with the default variation.

docs/style.md Outdated

- The component has no variation set; render the component with the default variation.

- Finally, if the other condition doesn't match to the current component means that we have a component variation define and we use it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Finally, if the other condition doesn't match to the current component means that we have a component variation define and we use it
- Finally, if the other condition doesn't match to the current component means that we have a component variation defined and we use it.

docs/style.md Outdated


On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This state
will expose the component variations on the state then it will set these variations on the into a structure [Kiln](https://docs.clayplatform.com/clay-kiln/) will need then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
will expose the component variations on the state then it will set these variations on the into a structure [Kiln](https://docs.clayplatform.com/clay-kiln/) will need then
will expose the component variations on the state, then it will set these variations into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln/) will render the `HTML`

docs/style.md Outdated

On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This state
will expose the component variations on the state then it will set these variations on the into a structure [Kiln](https://docs.clayplatform.com/clay-kiln/) will need then
render the `HTML`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this line together with line 11

docs/style.md Outdated

## Set component default variations

After getting the list of the variations expose on the state (or set on the data object that we receive) we can go throw each component defining it default styleguide. The following are the condition that we got to define which is the variation that we will add:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After getting the list of the variations expose on the state (or set on the data object that we receive) we can go throw each component defining it default styleguide. The following are the condition that we got to define which is the variation that we will add:
After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining it default styleguide. The following are the conditions that we got to define which is the variation that we will add:

docs/style.md Outdated
---


On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations on the into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln will need then render the `HTML`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations on the into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln will need then render the `HTML`.
On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln will need then render the `HTML`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

docs/style.md Outdated

## Set component default variations

After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining it default styleguide. The following are the conditions that we got to define which is the variation that we will add:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining it default styleguide. The following are the conditions that we got to define which is the variation that we will add:
After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining its default styleguide. The following are the conditions that we have to define in order to determine which is the variation that we will add:

docs/style.md Outdated

## Compose data

After we got and set the variations on the components we gonna compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we got to this step after we finish getting all the variations of the components that are in the `data` object that we mention before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After we got and set the variations on the components we gonna compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we got to this step after we finish getting all the variations of the components that are in the `data` object that we mention before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).
After we got and set the variations on the components we gonna compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we have to this step after we finish getting all the variations of the components that are in the `data` object that we mention before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).

Copy link
Contributor

@manuelurenah manuelurenah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small comment, other than that looks good 🏄

docs/style.md Outdated

## Compose data

After we got and set the variations on the components we gonna compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we got to this step after we finish getting all the variations of the components that are in the `data` object that we mention before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After we got and set the variations on the components we gonna compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we got to this step after we finish getting all the variations of the components that are in the `data` object that we mention before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).
After we got and set the variations on the components, we are going to compose the data into the structure that [Kiln](https://docs.clayplatform.com/clay-kiln/) needs; we got to this step after we finished getting all the variations of the components that are in the `data` object that we mentioned before and use it on [Kiln](https://docs.clayplatform.com/clay-kiln/).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done thanks!!

docs/style.md Outdated Show resolved Hide resolved
docs/style.md Outdated Show resolved Hide resolved
Copy link
Contributor

@manuelurenah manuelurenah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏄

docs/style.md Outdated
Using the site name, `amphora-html` builds the specific style path that we need to have all the required stylesheets:
`styleguides/siteName/components`

If the name of the site is not available, the `siteName` property will be replaced for `_default` and return the list of the variation of the components.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the name of the site is not available, the `siteName` property will be replaced for `_default` and return the list of the variation of the components.
If the name of the site is not available, the `siteName` property will be replaced for `_default` and the list of the variation of the components will be returned.

docs/style.md Outdated

If the name of the site is not available, the `siteName` property will be replaced for `_default` and return the list of the variation of the components.

If a component variation exists, we will receive a combination of the name of the component and the name of the variation separate by an underscore like this example: `componentName_variationName`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If a component variation exists, we will receive a combination of the name of the component and the name of the variation separate by an underscore like this example: `componentName_variationName`
If a component variation exists, we will receive a combination of the name of the component and the name of the variation separated by an underscore like this example: `componentName_variationName`

docs/style.md Outdated

## Set component default variations

After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining its default styleguide. The following are the conditions that we have to define in order to determine which is the variation that we will add:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining its default styleguide. The following are the conditions that we have to define in order to determine which is the variation that we will add:
After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go through each component defining its default styleguide. The following are the conditions that we have to define in order to determine which is the variation that we will add:

docs/style.md Outdated

After getting the list of the variations exposed on the state (or set on the data object that we receive), we can go throw each component defining its default styleguide. The following are the conditions that we have to define in order to determine which is the variation that we will add:

- The component has a variation set, but it doesn't exists in the site's styleguide or the default styleguide; render the component with the default variation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The component has a variation set, but it doesn't exists in the site's styleguide or the default styleguide; render the component with the default variation.
- The component has a variation set, but it doesn't exist in the site's styleguide or the default styleguide; render the component with the default variation.

docs/style.md Outdated

- The component has no variation set; render the component with the default variation.

- Finally, if the other conditions don't match to the current component, it means that we have a component variation defined and we use it.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Finally, if the other conditions don't match to the current component, it means that we have a component variation defined and we use it.
- Finally, if the other conditions don't match to the current component, it means that we have a component variation defined and we are using it.

@oscarpolanco oscarpolanco force-pushed the styleguide branch 2 times, most recently from ad621fa to 701a308 Compare June 13, 2019 21:40
Copy link

@fxisco fxisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers. LGTM

docs/style.md Outdated
---


On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln) will need then render the `HTML`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On `amphora-html` using the `data` and `meta` object that are the instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln) will need then render the `HTML`.
On `amphora-html` using the `data` and `meta` object that are instances of the components and site respectively. This site will expose the component variations on the state, then it will set these variations into a structure. Finally, [Kiln](https://docs.clayplatform.com/clay-kiln) will need then render the `HTML`.

@manuelurenah manuelurenah merged commit 6a802f5 into master Jul 1, 2019
@manuelurenah manuelurenah deleted the styleguide branch July 1, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants