Skip to content

Commit

Permalink
Merge pull request #290 from pxblue/dev
Browse files Browse the repository at this point in the history
Release 5.2.0
  • Loading branch information
joebochill authored May 28, 2021
2 parents 03bea58 + a0ba03d commit 269a371
Show file tree
Hide file tree
Showing 52 changed files with 1,184 additions and 580 deletions.
40 changes: 28 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2
version: 2.1
orbs:
codecov: codecov/[email protected]
jobs:
build_library:
docker:
Expand Down Expand Up @@ -31,7 +33,7 @@ jobs:
- run:
name: Test
command: |
yarn test
yarn test --coverage --watchAll=false
- run:
name: Build Library
command: |
Expand All @@ -49,6 +51,18 @@ jobs:
root: .
paths:
- dist
- components/coverage
coverage_report:
working_directory: ~/react-component-library
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- attach_workspace:
at: .
- codecov/upload:
file: './components/coverage/clover.xml'
token: 5e6faafe-eaf0-4d71-a931-22f279d3e446

# Builds the Storybook app using @pxblue/react-components persisted in /dist folder.
build_storybook:
Expand Down Expand Up @@ -203,19 +217,13 @@ jobs:
at: .
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Publish @pxblue/react-components
command: |
cd dist
MASTER_VERSION=`node -p "require('./package.json').version"`
NPM_LATEST_VERSION=`npm show @pxblue/react-components version`
if ! [ $MASTER_VERSION == $NPM_LATEST_VERSION ];
then
npm publish
else
echo "Latest version is already published."
fi
yarn publish:package -b $CIRCLE_BRANCH
workflows:
version: 2
Expand Down Expand Up @@ -244,3 +252,11 @@ workflows:
branches:
only:
- master
- dev
- coverage_report:
requires:
- build_library
filters:
branches:
only:
- master
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ package-lock.json
dist
storybook-static

# testing
/components/coverage

# misc
.vscode/
.idea/
Expand Down
44 changes: 27 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Changelog

## 5.1.1
## 5.2.0 (May 28, 2021)

### Changed

- Update `<UserMenu>` to responsively display a bottom sheet in place of an overlay menu.

### Added

- Added `disableRailTooltip` to `<DrawerRailItem>`.

## 5.1.1 (April 7, 2021)

### Fixed

- Fixed misaligned menu icon in `<DrawerHeader>`.

## 5.1.0
## 5.1.0 (March 29, 2021)

### Changed

Expand All @@ -16,10 +26,10 @@

### Added

- `openOnHoverDelay` to `<Drawer>` to alter open-on-hover delay for closed persistent drawers.
- `openOnHoverDelay` to `<Drawer>` to alter open-on-hover delay for closed persistent drawers.
- peerDependency support for using with React 17

## 5.0.0
## 5.0.0 (February 16, 2021)

### Changed

Expand All @@ -41,7 +51,7 @@
- Added new property `openOnHover` to `<Drawer>`.
- Ability to build `<Drawer>` contents declaratively instead of using `items` prop.

## 4.2.0
## 4.2.0 (December 10, 2020)

### Changed

Expand All @@ -56,14 +66,14 @@
- Mismatched transition speeds on the `<Drawer>` and `<DrawerLayout>`
- Use more efficient icon import syntax for smaller bundle

## v4.1.1
## v4.1.1 (September 29, 2020)

### Changed

- Hides Drawer Nav Item's title when the `<Drawer>` collapses in the `persistent` variant.
- Improved some icon flipping logic for RTL.

## v4.1.0
## v4.1.0 (August 28, 2020)

### Added

Expand All @@ -77,7 +87,7 @@
- Fixes an issue with text wrapping in the `<InfoListItem>` subtitle
- Fixes an issue with hover color alpha channel in `<InfoListItem>`

## v4.0.2
## v4.0.2 (June 30, 2020)

### Added

Expand All @@ -87,11 +97,11 @@

- Updates several prop types to `ReactNode` to support wider range of input values.

## v4.0.1
## v4.0.1 (May 20, 2020)

- Themes updated to use [@pxblue/colors](https://www.npmjs.com/package/@pxblue/colors) version 3.0.0.

## v4.0.0
## v4.0.0 (May 8, 2020)

### Added

Expand All @@ -106,14 +116,14 @@

- Theme usage updated to Material UI v4+ format (requires v5+ of @pxblue/react-themes).

## v3.0.3
## v3.0.3 (April 17, 2020)

### Fixed

- Fixes IE 11 issue where persistent `<Drawer>` will not close.
- Fixes some spacing issues when using the `<DrawerLayout>`.

## v3.0.0
## v3.0.0 (March 26, 2020)

### Added

Expand Down Expand Up @@ -162,7 +172,7 @@
/>
```

## v2.1.0
## v2.1.0 (February 12, 2020)

### Added

Expand All @@ -175,7 +185,7 @@

- Misc bug fixes.

## v2.0.0
## v2.0.0 (February 3, 2020)

### Added

Expand All @@ -201,18 +211,18 @@
import { ComponentName } from '@pxblue/react-components';
```

## v1.1.0
## v1.1.0 (October 29, 2019)

### Added

Adds a new component for `<EmptyState>`.

## v1.0.0
## v1.0.0 (June 17, 2019)

### Fixed

Fixes a bug in icon size for inline `<ChannelValue>` components.

## v0.0.1
## v0.0.1 (May 24, 2019)

Initial beta release
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @joebochill @emclaug2 @huayunh @daileytj
28 changes: 22 additions & 6 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Publishing Instructions

To update the version number, edit the version in `components/package.json`.
## Automatic Publishing

To publish a new package through NPM, run the following commands from the root folder:
This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch.

- The `dev` branch will publish versions marked as `alpha` or `beta`.
- The `master` branch will publish any version (`alpha`, `beta`, or `latest`).
In both cases, the code will only be published if the version number differs from the current version published under the respective dist tag.

## Manually Publishing

If you need to publish a package manually, you can run the following commands from the root folder:

```sh
yarn build
yarn publish:package
```
yarn build
cd dist
npm publish --tag <alpha | beta>

The publishing script will look at the version in the `package.json` and automatically determine whether to publish an alpha, beta, or latest package.

For this command to work, you must have an NPM token configured in your environment variables or you can perform a login prior to executing the publish command via:

```sh
yarn build
npm adduser && yarn publish:package
```

> The above command should only be run for `alpha` or `beta` packages. This repo's CircleCI will automatically publish latest packages from the master branch.
> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI.
18 changes: 9 additions & 9 deletions components/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [ '@pxblue/eslint-config/tsx' ],
parserOptions: {
project: "./tsconfig.json",
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['@pxblue/eslint-config/tsx'],
parserOptions: {
project: './tsconfig.json',
},
env: {
browser: true,
jest: true
jest: true,
},
rules: {
"@typescript-eslint/no-empty-function": "off",
"no-empty-function": "off"
}
'@typescript-eslint/no-empty-function': 'off',
'no-empty-function': 'off',
},
};
2 changes: 2 additions & 0 deletions components/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fixes:
- "::components/" # move root e.g., "path/" => "after/path/"
16 changes: 8 additions & 8 deletions components/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { defaults: tsjPreset } = require('ts-jest/presets');

module.exports = {
transform: {
...tsjPreset.transform,
},
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json'
}
}
transform: {
...tsjPreset.transform,
},
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json',
},
},
};
2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pxblue/react-components",
"version": "5.1.1",
"version": "5.2.0",
"description": "React components for PX Blue applications",
"scripts": {
"test": "jest src",
Expand Down
1 change: 1 addition & 0 deletions components/src/core/Drawer/DrawerNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ const DrawerNavGroupRender: React.ForwardRefRenderFunction<unknown, DrawerNavGro
onClick={railItem.onClick}
statusColor={railItem.statusColor}
title={railItem.title}
disableRailTooltip={railItem.disableRailTooltip}
/>
);
}
Expand Down
1 change: 1 addition & 0 deletions components/src/core/Drawer/DrawerNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type DrawerNavItemProps = SharedStyleProps &
statusColor?: string;
subtitle?: string;
title: string;
disableRailTooltip?: boolean;
InfoListItemProps?: Partial<PXBInfoListItemProps>;
} & Pick<HTMLAttributes<HTMLDivElement>, 'children'>;
export type NestedDrawerNavItemProps = Omit<DrawerNavItemProps, 'icon'>;
Expand Down
7 changes: 6 additions & 1 deletion components/src/core/Drawer/DrawerRailItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export type DrawerRailItemProps = SharedStyleProps & {

// props for the ButtonBase
ButtonBaseProps?: Partial<MuiButtonBaseProps>;

// sets whether to disable the tooltip
disableRailTooltip?: boolean;
};

const useStyles = makeStyles<Theme, DrawerRailItemProps>((theme: Theme) => {
Expand Down Expand Up @@ -189,6 +192,7 @@ const DrawerRailItemRender: React.ForwardRefRenderFunction<unknown, DrawerRailIt
title = '',
ButtonBaseProps,
statusColor,
disableRailTooltip,
...directButtonBaseProps
} = props;

Expand Down Expand Up @@ -273,7 +277,7 @@ const DrawerRailItemRender: React.ForwardRefRenderFunction<unknown, DrawerRailIt
</ButtonBase>
);

return hidden ? null : condensed ? (
return hidden ? null : condensed && !disableRailTooltip ? (
<Tooltip title={title} placement="right">
{innerContent}
</Tooltip>
Expand Down Expand Up @@ -305,6 +309,7 @@ DrawerRailItem.propTypes = {
onClick: PropTypes.func,
statusColor: PropTypes.string,
title: PropTypes.string,
disableRailTooltip: PropTypes.bool,
// @ts-ignore
ButtonBaseProps: PropTypes.object,
};
Loading

0 comments on commit 269a371

Please sign in to comment.