Skip to content

Commit

Permalink
Merge branch 'development' into new/modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Danae Millan committed Apr 19, 2021
2 parents c58cdd8 + fdd6784 commit e01c679
Show file tree
Hide file tree
Showing 62 changed files with 11,316 additions and 766 deletions.
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,95 @@
# Changelog

## Unreleased (2021-04-15)

#### Improvements
* `react-dropdown`
* [#87](https://github.com/wpmudev/shared-ui-react/pull/87) 🐛 fix(react-dropdown): Prevent clicks from propagating. ([@a-danae](https://github.com/a-danae))
* `compiler`, `react-accordion`, `react-box`, `react-button-icon`, `react-input`, `react-notifications`, `react-post`
* [#85](https://github.com/wpmudev/shared-ui-react/pull/85) ⬆️ Upgrade dependencies. ([@iamleigh](https://github.com/iamleigh))

#### Bug Fixes
* `react-input`
* [#86](https://github.com/wpmudev/shared-ui-react/pull/86) 🐛 fix(react-input): Remove extra space when passing the 'Input' props. ([@a-danae](https://github.com/a-danae))
* `react-dropdown`
* [#89](https://github.com/wpmudev/shared-ui-react/pull/89) 🐛 fix(react-dropdown): Menu not closing after clicking on an option. ([@a-danae](https://github.com/a-danae))
* [#88](https://github.com/wpmudev/shared-ui-react/pull/88) 🐛 fix(react-dropdown): Clicking on its options closes the menu. ([@a-danae](https://github.com/a-danae))

#### Committers: 2
- Danae Millan ([@a-danae](https://github.com/a-danae))
- Leighton Sapir ([@iamleigh](https://github.com/iamleigh))

## Released (2021-04-09)

#### New Features
* `react-box`
* [#83](https://github.com/wpmudev/shared-ui-react/pull/83) ✨ new(react-box): Make `body` more flexible with props. ([@iamleigh](https://github.com/iamleigh))
* [#80](https://github.com/wpmudev/shared-ui-react/pull/80) ✨ new(react-box): Make footer more flexible. ([@iamleigh](https://github.com/iamleigh))

#### Bug Fixes
* `react-box`
* [#84](https://github.com/wpmudev/shared-ui-react/pull/84) 🐛 fix(react-box): Reestructure `header` props. ([@iamleigh](https://github.com/iamleigh))

#### Documentation
* `react-button`
* [#79](https://github.com/wpmudev/shared-ui-react/pull/79) 📝 docs(react-button): Fix not working controls and add more properties. ([@a-danae](https://github.com/a-danae))

#### Committers: 2
- Danae Millan ([@a-danae](https://github.com/a-danae))
- Leighton Sapir ([@iamleigh](https://github.com/iamleigh))

## Released (2021-04-08)

#### New Features
* `react-box`
* [#70](https://github.com/wpmudev/shared-ui-react/pull/70) ✨ new(react-box): Allow custom classes. ([@iamleigh](https://github.com/iamleigh))
* [#78](https://github.com/wpmudev/shared-ui-react/pull/78) ✨ new(react-box): Add `border` and `stacked` props to header. ([@iamleigh](https://github.com/iamleigh))
* [#76](https://github.com/wpmudev/shared-ui-react/pull/76) ✨ new(react-box): Tag props for title. ([@iamleigh](https://github.com/iamleigh))

#### Improvements
* `react-input`
* [#74](https://github.com/wpmudev/shared-ui-react/pull/74) 🐛 fix(react-input): Give more flexibility to the 'input' component. ([@a-danae](https://github.com/a-danae))
* `react-button`
* [#73](https://github.com/wpmudev/shared-ui-react/pull/73) 🐛 fix(react-button): Remove forwardRef and fix `undefined` in classes. ([@a-danae](https://github.com/a-danae))
* `react-notifications`
* [#69](https://github.com/wpmudev/shared-ui-react/pull/69) 🐛 fix(react-notifications): Add multi-line capability. ([@iamleigh](https://github.com/iamleigh))
* [#67](https://github.com/wpmudev/shared-ui-react/pull/67) 🐛 fix(react-notifications): Make component dismissible. ([@iamleigh](https://github.com/iamleigh))

#### Bug Fixes
* `react-button`
* [#73](https://github.com/wpmudev/shared-ui-react/pull/73) 🐛 fix(react-button): Remove forwardRef and fix `undefined` in classes. ([@a-danae](https://github.com/a-danae))
* `react-notifications`
* [#66](https://github.com/wpmudev/shared-ui-react/pull/66) 🐛 fix(react-notifications): Icon not showing up for non-default variation. ([@iamleigh](https://github.com/iamleigh))

#### Committers: 2
- Danae Millan ([@a-danae](https://github.com/a-danae))
- Leighton Sapir ([@iamleigh](https://github.com/iamleigh))

## Released (2021-03-31)

#### New Features
* `react-accordion`
* [#56](https://github.com/wpmudev/shared-ui-react/pull/56) ✨ new(react-accordion): Create new component. ([@iamleigh](https://github.com/iamleigh))
* `react-dropdown`
* [#54](https://github.com/wpmudev/shared-ui-react/pull/54) ✨ new(react-dropdown): Create new component. ([@iamleigh](https://github.com/iamleigh))

#### Improvements
* `core`
* [#52](https://github.com/wpmudev/shared-ui-react/pull/52) 🐛 fix(react-core): Remove peer dependencies. ([@iamleigh](https://github.com/iamleigh))
* `react-box`
* [#51](https://github.com/wpmudev/shared-ui-react/pull/51) 🐛 fix(react-box): Remove peer dependencies. ([@iamleigh](https://github.com/iamleigh))

#### Bug Fixes
* `react-button`
* [#60](https://github.com/wpmudev/shared-ui-react/pull/60) 🐛 fix(react-button): Allow custom classes. ([@iamleigh](https://github.com/iamleigh))
* [#63](https://github.com/wpmudev/shared-ui-react/pull/63) 🐛 fix(react-button): Console error for refs. ([@iamleigh](https://github.com/iamleigh))
* `react-button-icon`
* [#61](https://github.com/wpmudev/shared-ui-react/pull/61) 🐛 fix(react-button-icon): Allow custom classes. ([@iamleigh](https://github.com/iamleigh))
* [#55](https://github.com/wpmudev/shared-ui-react/pull/55) 🐛 fix(react-button-icon): Console error for refs. ([@iamleigh](https://github.com/iamleigh))

#### Committers: 1
- Leighton Sapir ([@iamleigh](https://github.com/iamleigh))

## Released (2021-03-19)

#### New Features
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ The following is a list of the components that are ready to be used with corresp

Container | Version
--- | ---
[Accordion](https://wpmudev.github.io/shared-ui-react/?path=/story/containers-accordion--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-accordion.svg)](https://www.npmjs.com/package/@wpmudev/react-accordion)
[Box](https://wpmudev.github.io/shared-ui-react/?path=/story/containers-box--wrapper) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-box.svg)](https://www.npmjs.com/package/@wpmudev/react-box)

Component | Version
--- | ---
[Button](https://wpmudev.github.io/shared-ui-react/?path=/story/components-button--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-button.svg)](https://www.npmjs.com/package/@wpmudev/react-button)
[Button Icon](https://wpmudev.github.io/shared-ui-react/?path=/story/components-button-icon--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-button-icon.svg)](https://www.npmjs.com/package/@wpmudev/react-button-icon)
[Dropdown](https://wpmudev.github.io/shared-ui-react/?path=/story/components-dropdown--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-dropdown.svg)](https://www.npmjs.com/package/@wpmudev/react-dropdown)
[Input](https://wpmudev.github.io/shared-ui-react/?path=/story/components-input--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-input.svg)](https://www.npmjs.com/package/@wpmudev/react-input)
[Post](https://wpmudev.github.io/shared-ui-react/?path=/story/components-post--primary) | [![npm version](https://badge.fury.io/js/%40wpmudev%2Freact-post.svg)](https://www.npmjs.com/package/@wpmudev/react-post)

Expand Down
28 changes: 14 additions & 14 deletions docs/contributions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to Contribute

If you are looking for a bug to fix, check out [Help Wanted Issues](https://github.com/wpmudev/shared-ui-react/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aimprovement) on GitHub. Otherwise please open a new issue.
If you are looking for a bug to fix, check out [Issues List](https://github.com/wpmudev/shared-ui-react/issues) on GitHub. Otherwise please open a new issue.

## Working on Issues.

Expand All @@ -10,15 +10,15 @@ SUI React goal is to convert [Shared UI Library](https://github.com/wpmudev/shar

We consider any new API to be a new feature. An API is any of the following:

- Adding a new component
- Adding a new React Component
- Update to React Component APIs
- Prop updates on React Component
- Prop addition on React Component

> If changes fall under these categories or you'd like to add a new component please open an [issue](https://github.com/wpmudev/shared-ui-react/issues/new) first.
> If changes fall under these categories or you'd like to add a new package please open an [issue](https://github.com/wpmudev/shared-ui-react/issues/new) first.
### Fixing Bugs.

Go ahead an open a pull request when:
Go ahead and open a pull request when:

- The issue is a small doc change (READMEs, documentation, etc.).
- The changes you want to perform are under 10 - 20 lines of code.
Expand All @@ -27,20 +27,20 @@ Go ahead an open a pull request when:
## Pull Request Message Format

The final pull request message to the @wpmudev/react-foo package, for GitHub issue 1234, should look like this:
The pull request message to the @wpmudev/react-foo package, for GitHub issue 1234, should look like this:

```
# For a fix to an issue
🐛 fix/component-name: Short description of fix
🐛 fix(react-foo): Short description of fix.
# For a new feature
✨ new/component-name: Short description of feature
✨ new(react-foo): Short description of feature.
# For a doc update
📝 docs/component-name: Short description of doc changes
📝 docs(react-foo): Short description of doc changes.
# For accessibility improvements
♿️ aria/component-name: Short description of feature
♿️ aria(react-foo): Short description of improvement.
```

This commit message is pulled into our `CHANGELOG` when we release and is based on Angular's git commit guidelines.
Expand All @@ -50,12 +50,12 @@ This commit message is pulled into our `CHANGELOG` when we release and is based
Pull requests should meet the following criteria:

- **PRs should be focused!** PRs should focus on fixing one issue or an additional feature. Anything extra requires another PR.
- If there is an existing [issue](https://github.com/wpmudev/shared-ui-react/issues/) please refer to it in the description of your PR.
- Please also add notes/description about what your changes are trying to achieve (or anything you've learned). Brevity appreciated.
- If there is an existing [issue(s)](https://github.com/wpmudev/shared-ui-react/issues/) please refer to it in the description of your PR.
- Please also include notes about what your changes are trying to achieve (or anything you've learned). Brevity appreciated.

### Process

Before opening a PR, it should be up to date with targeted release (`rc<release_number>` ie. `rc0.7.0`, `rc0.8.0`, etc.). In most cases it will never be branched from `master`.
Before opening a PR, it should be up to date with `development` branch, which is the targeted release branch.

#### Checklist:

Expand All @@ -65,6 +65,6 @@ Before opening a PR, it should be up to date with targeted release (`rc<release_

Once you have passed all checks, the process is as follows:

1. Ping one of the admins ([@iamleigh](https://github.com/iamleigh), [@a-danae](https://github.com/a-danae)) in the PR when its ready for review.
1. One of the admins ([@iamleigh](https://github.com/iamleigh), [@a-danae](https://github.com/a-danae)) will review your changes.
2. We will either approve, request changes, or explain why we can't accept these changes. And we'll work from there.
3. Assuming approval, one of the admins will merge your changes and remove the branch from the PR.
51 changes: 19 additions & 32 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,50 @@
# General Guidelines

## New Component
## Showcase

Globally install [Yarn](https://yarnpkg.com/getting-started/install) and [Lerna](https://lerna.js.org/). Since showcase is managed by Storybook run this in the root directory to install Storybook CLI:

```
npx lerna create foo
npx sb init
```

Follow lerna steps to configure your new package, but make sure to name it correctly by addinf `@wpmudev/react-` prefix.
Now you can initialize your local environment:

```
$ package name: @wpmudev/react-foo
$ version (default value):
$ description: WPMU DEV Shared UI React Foo Component
$ keywords:
$ homepage:
$ license: GPL-3.0
$ entry point (default value):
$ git repository (default value):
yarn storybook
```

## Install Packages
## New Package

```
lerna create @wpmudev/react-foo --yes
```

## Install NPM Packages

Since SUI React is a mono-repo managed by Lerna there are two ways to install packages:

### Global Package

When package is going to be shared between multiple components or going to be used on root.
When package is going to be affect project root only.

```
yarn add -W --dev package-name
```

### Component Package

When package is required for an specific component.
When package is required for an specific component you could run:

```
# Regular dependency
npx lerna add package-name --scope=@wpmudev/react-foo
lerna add package-name --scope=@wpmudev/react-foo
# Development dependency
npx lerna add package-name --dev --scope=@wpmudev/react-foo
lerna add package-name --dev --scope=@wpmudev/react-foo
# Peer dependency
npx lerna add package-name --peer --scope=@wpmudev/react-foo
lerna add package-name --peer --scope=@wpmudev/react-foo
```

> **Note:** Remove `npx` if the package to be installed is an external package and not part of this monorepo.
## Showcase

Globally install [Yarn](https://yarnpkg.com/getting-started/install) and [Lerna](https://lerna.js.org/). Since showcase is managed by Storybook run this in the root directory to install Storybook CLI:

```
npx sb init
```

Now you can initialize your local environment:

```
yarn run storybook
```
>**Note:** Packages can only be manually upgraded and removed, after doing that it is necessary to run `lerna bootstrap` for all packages to upgrade.
62 changes: 21 additions & 41 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Make sure builder file is executable by running the following command:
chmod +x packages/builder/lib/builder.js
```

## Prepare component.
## Prepare package.

Prepare new component(s) `package.json` file before publishing to [NPM Registry](https://www.npmjs.com/) for the first time.

Expand Down Expand Up @@ -51,7 +51,7 @@ To make sure the component works correctly when installed through NPM, it is nec
"module": "dist/react-foo.esm.js"

// Set source file.
"src": "lib/foo.js"
"src": "lib/react-foo.js"
```

### 4. Include Files
Expand All @@ -71,7 +71,7 @@ Make sure to include repository directory:

```json
"repository": {
"directory": "packages/foo"
"directory": "packages/react-foo"
}
```

Expand All @@ -85,67 +85,47 @@ Don't forget to include builder script:
}
```

### 7. Publish Configurations
## Publish Packages

Published package must have public access that way anyone can install it and point to NPM Registry.
Once all pull requests are merged into `development` branch, continue the process below.

```json
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
```
### 1. Build packages.

### 8. Required Dependencies
Build all packages by running the following command:

```
# Add React as dev dependency for local testing.
npx lerna add react --dev --scope=@wpmudev/react-foo
# Add React 16+ as peer dependency for consuming apps.
npx lerna add react@16.x --peer --scope=@wpmudev/react-foo
yarn build
```

## Build library and showcase files.

Once all pull requests are merged into master, continue the process below.

#### Build packages.

```
yarn run build
```
>**Note:** Each package built changes needs its own commit and must be pushed directly to `development` branch.
> Don't forget to push compiled files.

#### Update logs.
### 2. Update global changelog.

To update `CHANGELOG.md` file, you will need to generate a personal access token for `public_repo`, then run the command below in the same order. Don't forget to save your token for future use.
1. Grant access to your Github account.

```
# Allow access to the repo.
export GITHUB_AUTH="token_goes_here"
# Generate changelog based on pull requests.
yarn run logs
```

#### Publish packages.

Make sure you logged in NPM Registry and that you are member of [WPMU DEV Organization](https://www.npmjs.com/package/@wpmudev/shared-ui/).
2. Generate list of changes based on PRs after latest release.

```
npm login
yarn logs
```

Use lerna to update packages version and publish to NPM.
3. Copy and paste generated list into `CHANGELOG.md` file.

### 3. Publish packages to NPM.

```
npx lerna publish --no-private
lerna publish --no-private
```

#### Publish showcase.
>**Note:** Before releasing make sure you are logged in NPM Registry and that you are member of [WPMU DEV Organization](https://www.npmjs.com/package/@wpmudev/shared-ui/).
## Publish Showcase

```
yarn run deploy
yarn deploy
```
Loading

0 comments on commit e01c679

Please sign in to comment.