@openfin/ui-library 0.20.0-alpha.1 → 0.20.0-alpha.1687971721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +5 -5
- package/README.md +211 -211
- package/dist/assets/fonts/index.js +1 -1
- package/dist/components/controls/ClickableNavigation/clickableNavigation.d.ts +11 -0
- package/dist/components/controls/ClickableNavigation/index.d.ts +1 -0
- package/dist/components/controls/CollapsibleCard/cardContainer.d.ts +6 -0
- package/dist/components/controls/CollapsibleCard/collapsibleCard.d.ts +10 -0
- package/dist/components/controls/CollapsibleCard/index.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/ExclamationCircledFilledIcon.d.ts +3 -4
- package/dist/components/helper/ValidationError.d.ts +6 -0
- package/dist/components/input/BaseInput/baseInput.d.ts +7 -0
- package/dist/components/input/Checkbox/checkbox.d.ts +3 -0
- package/dist/components/input/CheckboxGroup/checkboxGroup.d.ts +7 -0
- package/dist/components/input/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/input/NumberInput/numberInput.d.ts +7 -0
- package/dist/components/input/RadioInput/radioInput.d.ts +3 -0
- package/dist/components/input/TextArea/index.d.ts +1 -0
- package/dist/components/input/TextArea/textArea.d.ts +8 -0
- package/dist/components/input/TextInput/textInput.d.ts +3 -0
- package/dist/components/layout/HamburgerNavigation/hamburgerNavigation.d.ts +13 -0
- package/dist/components/layout/HamburgerNavigation/index.d.ts +2 -0
- package/dist/components/layout/HamburgerNavigation/sidebarMenu.d.ts +12 -0
- package/dist/components/system/ThemeProvider/lib/constants.d.ts +3 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +551 -420
- package/dist/index.js.LICENSE.txt +24 -0
- package/package.json +184 -186
package/LICENSE.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
|
|
2
|
-
2
|
|
3
|
-
3- [Licensing](https://www.openfin.co/licensing/)
|
|
4
|
-
4- [Developer agreement](https://openfin.co/developer-agreement/)
|
|
5
|
-
5
|
|
1
|
+
Learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
|
|
2
|
+
2
|
|
3
|
+
3- [Licensing](https://www.openfin.co/licensing/)
|
|
4
|
+
4- [Developer agreement](https://openfin.co/developer-agreement/)
|
|
5
|
+
5
|
package/README.md
CHANGED
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
# OpenFin UI Library
|
|
2
|
-
|
|
3
|
-
> React component library for OpenFin Workspace products – Informed by [Spatial](https://www.figma.com/file/0Y3pKZj0tJWuleF12h5Sua/Spatial---Components).
|
|
4
|
-
|
|
5
|
-
**Storybook:** [cdn.openfin.co/workspace/storybook](https://cdn.openfin.co/workspace/storybook)
|
|
6
|
-
**NPM Package:** [@openfin/ui-library](https://www.npmjs.com/package/@openfin/ui-library)
|
|
7
|
-
|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
## What is this for?
|
|
11
|
-
|
|
12
|
-
**TL;DR** – Use this library and write less CSS.
|
|
13
|
-
|
|
14
|
-
This is an opinionated React component library, built on top of [styled-components](https://styled-components.com/docs), which aims to provide the basic building blocks that you can use in any OpenFin environment. It was built w/ our [Spatial Design System](https://www.figma.com/file/0Y3pKZj0tJWuleF12h5Sua/Spatial---Components) in mind, so it should always reflect OpenFin's latest branding and designs.
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
### 1. Make sure you have @openfin NPM access
|
|
19
|
-
|
|
20
|
-
- Make sure you have @openfin private NPM registry access
|
|
21
|
-
- Log in to npm, preferably via `npm login`.
|
|
22
|
-
|
|
23
|
-
### 2. Install the package
|
|
24
|
-
|
|
25
|
-
…along with `styled-components`.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Install the latest version
|
|
29
|
-
$ yarn add @openfin/ui-library styled-components
|
|
30
|
-
# For npm
|
|
31
|
-
$ npm i @openfin/ui-library styled-components
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Install a specific version
|
|
36
|
-
$ yarn add @openfin/ui-library@v0.8.0
|
|
37
|
-
# For npm
|
|
38
|
-
$ npm i @openfin/ui-library@0.8.0
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Usage
|
|
42
|
-
|
|
43
|
-
### ThemeProvider
|
|
44
|
-
|
|
45
|
-
`ThemeProvider` is the component that provides theme information to the `ui-library` components nested deeply within your application. Make sure to include this above your application so your components will be styled properly.
|
|
46
|
-
|
|
47
|
-
```javascript
|
|
48
|
-
import { ThemeProvider } from '@openfin/ui-library';
|
|
49
|
-
import MyApp from 'some/cool/place';
|
|
50
|
-
|
|
51
|
-
const MyCoolAppContainer = () => (
|
|
52
|
-
<ThemeProvider>
|
|
53
|
-
<MyApp />
|
|
54
|
-
</ThemeProvider>
|
|
55
|
-
);
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Basic Usage
|
|
59
|
-
|
|
60
|
-
```javascript
|
|
61
|
-
import { Box, H1, Icon, TextInput } from '@openfin/ui-library';
|
|
62
|
-
|
|
63
|
-
export const MyApp = () => (
|
|
64
|
-
<Box flexDirection="column">
|
|
65
|
-
<H1>
|
|
66
|
-
<Icon icon="OpenFinIcon" /> Cool heading
|
|
67
|
-
</H1>
|
|
68
|
-
|
|
69
|
-
<TextInput placeholder="Cool stuff goes here" />
|
|
70
|
-
</Box>
|
|
71
|
-
);
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**View the [Full Component Docs](./src/components) for more usage info.**
|
|
75
|
-
|
|
76
|
-
### Extending Components
|
|
77
|
-
|
|
78
|
-
Whenever possible, it is prefereable to use the components as-is. However – using [styled-components](https://styled-components.com/docs), it is very easy. Try using the following guiding principles when doing so:
|
|
79
|
-
|
|
80
|
-
- Familiarize yourself w/ the `theme` prop, and use it whenever possible.
|
|
81
|
-
- Avoid hard-coded pixel values.
|
|
82
|
-
- Don't _ever_ use hard-coded color values.
|
|
83
|
-
|
|
84
|
-
```javascript
|
|
85
|
-
import { Box, Text } from '@openfin/ui-library';
|
|
86
|
-
import styled from 'styled-components';
|
|
87
|
-
|
|
88
|
-
export const MyCoolComponent = () => (
|
|
89
|
-
<Container flexDirection="column">
|
|
90
|
-
<ImportantText>How cool is this?</ImportantText>
|
|
91
|
-
<Text weight="bold">Super cool</Text>
|
|
92
|
-
</Container>
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const Container = styled(Box)`
|
|
96
|
-
background: ${({ theme }) => theme.palette.background6};
|
|
97
|
-
border-radius: ${({ theme }) => theme.radius.small};
|
|
98
|
-
margin: ${({ theme }) => `${theme.px.small} 0 ${theme.px.base}`};
|
|
99
|
-
`;
|
|
100
|
-
|
|
101
|
-
const ImportantText = styled(Text)`
|
|
102
|
-
color: ${({ theme }) => theme.palette.statusWarning};
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
font-weight: ${({ theme }) => theme.fontWeight.bold};
|
|
105
|
-
`;
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Contributing
|
|
109
|
-
|
|
110
|
-
### Open a pull request 😎
|
|
111
|
-
|
|
112
|
-
Pull requests are a great way to express an idea or need, if it's easier to "show" instead of "tell", go for it, propose a change!
|
|
113
|
-
|
|
114
|
-
Also keep in mind, UI Library is a home of centralized common components, **used by several products**. It's reasonable to expect PRs may spark conversations about the **essence of the change** and it's benefits and impact across the application ecosystem.
|
|
115
|
-
|
|
116
|
-
Meaning: While there are no hard rules about what belongs in _our_ library, if a change is too opinionated or too specialized, it may make sense to leave it out. **A library that does less, is a lot easier to know and work with**.
|
|
117
|
-
|
|
118
|
-
**Please be sure to update the package version before submitting your pull request.** If you are unsure what the new verison should be, please refer to [Semantic Versioning](https://semver.org/).
|
|
119
|
-
|
|
120
|
-
### Storybook
|
|
121
|
-
|
|
122
|
-
Great for exploring and experimenting with UI Library components. It's also used for [testing our components](https://storybook.js.org/docs/react/workflows/unit-testing).
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Run it locally
|
|
126
|
-
$ npm run storybook
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Codesandbox.io
|
|
130
|
-
|
|
131
|
-
Great for developer experimentation without all of the overhead.
|
|
132
|
-
|
|
133
|
-
The sandbox is currently **private**, request access and [give it a try](https://codesandbox.io/s/openfin-ui-library-39y7c).
|
|
134
|
-
|
|
135
|
-
### Working locally w/ other apps
|
|
136
|
-
|
|
137
|
-
Sometimes you may need to work on the `ui-library` alongside your own application. We use [yalc](https://www.npmjs.com/package/yalc) for this. It solves a few problems that `yarn link` creates, and it's pretty intuitive.
|
|
138
|
-
|
|
139
|
-
#### 1. Install and setup yalc
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Make sure yalc is installed globally
|
|
143
|
-
$ npm i yalc -g
|
|
144
|
-
|
|
145
|
-
# Set up yalc in ui-library
|
|
146
|
-
$ cd ui-library/
|
|
147
|
-
$ yalc publish
|
|
148
|
-
|
|
149
|
-
# Add local ui-library package to your app
|
|
150
|
-
$ cd ../myCoolApp/
|
|
151
|
-
$ yalc add @openfin/ui-library
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
This links your local copy of UI Library to your app using symlinks and `package.json`.
|
|
155
|
-
|
|
156
|
-
#### 2. Working with yalc
|
|
157
|
-
|
|
158
|
-
Once you're setup, subsequent changes in UI Library can be propagated across easily.
|
|
159
|
-
|
|
160
|
-
After making changes in `ui-library`, run `npm run build && yalc push`. This will apply a version bump to the local yalc package respository. It will also update the package in your app directory, but you will most likely need to restart any development servers to see the changes.
|
|
161
|
-
|
|
162
|
-
```sh
|
|
163
|
-
# push updates from ui-library side to your app
|
|
164
|
-
$ npm run build && yalc push
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
#### Known Issues
|
|
168
|
-
|
|
169
|
-
- Storybook does not pick up changes after a `yalc push` and must be restarted
|
|
170
|
-
|
|
171
|
-
## Compiling the Library
|
|
172
|
-
|
|
173
|
-
### `tsonfig.json`
|
|
174
|
-
|
|
175
|
-
The base Typescript config.
|
|
176
|
-
|
|
177
|
-
### `tsonfig.bundle.json`
|
|
178
|
-
|
|
179
|
-
Extending base config used by `tsc` when bundling the library for a new release.
|
|
180
|
-
|
|
181
|
-
### `tsonfig.storybook.json`
|
|
182
|
-
|
|
183
|
-
Extending base config used by `Storybook` to quiet some extraneous warnings.
|
|
184
|
-
|
|
185
|
-
## Testing
|
|
186
|
-
|
|
187
|
-
```sh
|
|
188
|
-
npm run test
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
## Versioning & Releasing
|
|
192
|
-
|
|
193
|
-
### 1. Bump package version
|
|
194
|
-
|
|
195
|
-
Once you are ready to make a new release and all PRs meant for a release are merged into `main` branch, you should now create a new PR into `main` to bump the package version to the appropriate number. Get that PR approved and merged into `main`.
|
|
196
|
-
|
|
197
|
-
### 2. Create a release branch
|
|
198
|
-
|
|
199
|
-
Now that the package version is up to date, you should now create a new release branch in github. To do so, go to the [list of branches](https://github.com/openfin/ui-library/branches) and click 'New Branch.' Name the new branch `release/<new-version-number>` (for example `release/0.14.3`) and make sure the branch source is `main`.
|
|
200
|
-
|
|
201
|
-
### 3. Create a new release on Github
|
|
202
|
-
|
|
203
|
-
Once you have created the release branch, you should now create a release through github:
|
|
204
|
-
|
|
205
|
-
- Click [Create a New Release](https://github.com/openfin/ui-library/releases/new)
|
|
206
|
-
- Create a new tag, labelled `<new-version-number>`. (for example `0.14.3`)
|
|
207
|
-
- Change the target branch to the release branch you just created. (for example `release/0.14.3`)
|
|
208
|
-
- Enter the release title to match the tag you just created. (for example `0.14.3`)
|
|
209
|
-
- In the description, enter the changelog from the previous tag. (for example if previous tag is `0.14.2` then your description should be "Change log: `https://github.com/openfin/ui-library/compare/0.14.2...0.14.3`") (Don't worry, you can always go back and edit the description later.)
|
|
210
|
-
|
|
211
|
-
This triggers a Github Action to automatically build the latest version of the `ui-library` and package it for remote installation. You can check the status of this task within this repo's actions tab.
|
|
1
|
+
# OpenFin UI Library
|
|
2
|
+
|
|
3
|
+
> React component library for OpenFin Workspace products – Informed by [Spatial](https://www.figma.com/file/0Y3pKZj0tJWuleF12h5Sua/Spatial---Components).
|
|
4
|
+
|
|
5
|
+
**Storybook:** [cdn.openfin.co/workspace/storybook](https://cdn.openfin.co/workspace/storybook)
|
|
6
|
+
**NPM Package:** [@openfin/ui-library](https://www.npmjs.com/package/@openfin/ui-library)
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## What is this for?
|
|
11
|
+
|
|
12
|
+
**TL;DR** – Use this library and write less CSS.
|
|
13
|
+
|
|
14
|
+
This is an opinionated React component library, built on top of [styled-components](https://styled-components.com/docs), which aims to provide the basic building blocks that you can use in any OpenFin environment. It was built w/ our [Spatial Design System](https://www.figma.com/file/0Y3pKZj0tJWuleF12h5Sua/Spatial---Components) in mind, so it should always reflect OpenFin's latest branding and designs.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
### 1. Make sure you have @openfin NPM access
|
|
19
|
+
|
|
20
|
+
- Make sure you have @openfin private NPM registry access
|
|
21
|
+
- Log in to npm, preferably via `npm login`.
|
|
22
|
+
|
|
23
|
+
### 2. Install the package
|
|
24
|
+
|
|
25
|
+
…along with `styled-components`.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Install the latest version
|
|
29
|
+
$ yarn add @openfin/ui-library styled-components
|
|
30
|
+
# For npm
|
|
31
|
+
$ npm i @openfin/ui-library styled-components
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Install a specific version
|
|
36
|
+
$ yarn add @openfin/ui-library@v0.8.0
|
|
37
|
+
# For npm
|
|
38
|
+
$ npm i @openfin/ui-library@0.8.0
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
### ThemeProvider
|
|
44
|
+
|
|
45
|
+
`ThemeProvider` is the component that provides theme information to the `ui-library` components nested deeply within your application. Make sure to include this above your application so your components will be styled properly.
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
import { ThemeProvider } from '@openfin/ui-library';
|
|
49
|
+
import MyApp from 'some/cool/place';
|
|
50
|
+
|
|
51
|
+
const MyCoolAppContainer = () => (
|
|
52
|
+
<ThemeProvider>
|
|
53
|
+
<MyApp />
|
|
54
|
+
</ThemeProvider>
|
|
55
|
+
);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Basic Usage
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
import { Box, H1, Icon, TextInput } from '@openfin/ui-library';
|
|
62
|
+
|
|
63
|
+
export const MyApp = () => (
|
|
64
|
+
<Box flexDirection="column">
|
|
65
|
+
<H1>
|
|
66
|
+
<Icon icon="OpenFinIcon" /> Cool heading
|
|
67
|
+
</H1>
|
|
68
|
+
|
|
69
|
+
<TextInput placeholder="Cool stuff goes here" />
|
|
70
|
+
</Box>
|
|
71
|
+
);
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**View the [Full Component Docs](./src/components) for more usage info.**
|
|
75
|
+
|
|
76
|
+
### Extending Components
|
|
77
|
+
|
|
78
|
+
Whenever possible, it is prefereable to use the components as-is. However – using [styled-components](https://styled-components.com/docs), it is very easy. Try using the following guiding principles when doing so:
|
|
79
|
+
|
|
80
|
+
- Familiarize yourself w/ the `theme` prop, and use it whenever possible.
|
|
81
|
+
- Avoid hard-coded pixel values.
|
|
82
|
+
- Don't _ever_ use hard-coded color values.
|
|
83
|
+
|
|
84
|
+
```javascript
|
|
85
|
+
import { Box, Text } from '@openfin/ui-library';
|
|
86
|
+
import styled from 'styled-components';
|
|
87
|
+
|
|
88
|
+
export const MyCoolComponent = () => (
|
|
89
|
+
<Container flexDirection="column">
|
|
90
|
+
<ImportantText>How cool is this?</ImportantText>
|
|
91
|
+
<Text weight="bold">Super cool</Text>
|
|
92
|
+
</Container>
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const Container = styled(Box)`
|
|
96
|
+
background: ${({ theme }) => theme.palette.background6};
|
|
97
|
+
border-radius: ${({ theme }) => theme.radius.small};
|
|
98
|
+
margin: ${({ theme }) => `${theme.px.small} 0 ${theme.px.base}`};
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
const ImportantText = styled(Text)`
|
|
102
|
+
color: ${({ theme }) => theme.palette.statusWarning};
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
font-weight: ${({ theme }) => theme.fontWeight.bold};
|
|
105
|
+
`;
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Contributing
|
|
109
|
+
|
|
110
|
+
### Open a pull request 😎
|
|
111
|
+
|
|
112
|
+
Pull requests are a great way to express an idea or need, if it's easier to "show" instead of "tell", go for it, propose a change!
|
|
113
|
+
|
|
114
|
+
Also keep in mind, UI Library is a home of centralized common components, **used by several products**. It's reasonable to expect PRs may spark conversations about the **essence of the change** and it's benefits and impact across the application ecosystem.
|
|
115
|
+
|
|
116
|
+
Meaning: While there are no hard rules about what belongs in _our_ library, if a change is too opinionated or too specialized, it may make sense to leave it out. **A library that does less, is a lot easier to know and work with**.
|
|
117
|
+
|
|
118
|
+
**Please be sure to update the package version before submitting your pull request.** If you are unsure what the new verison should be, please refer to [Semantic Versioning](https://semver.org/).
|
|
119
|
+
|
|
120
|
+
### Storybook
|
|
121
|
+
|
|
122
|
+
Great for exploring and experimenting with UI Library components. It's also used for [testing our components](https://storybook.js.org/docs/react/workflows/unit-testing).
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Run it locally
|
|
126
|
+
$ npm run storybook
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Codesandbox.io
|
|
130
|
+
|
|
131
|
+
Great for developer experimentation without all of the overhead.
|
|
132
|
+
|
|
133
|
+
The sandbox is currently **private**, request access and [give it a try](https://codesandbox.io/s/openfin-ui-library-39y7c).
|
|
134
|
+
|
|
135
|
+
### Working locally w/ other apps
|
|
136
|
+
|
|
137
|
+
Sometimes you may need to work on the `ui-library` alongside your own application. We use [yalc](https://www.npmjs.com/package/yalc) for this. It solves a few problems that `yarn link` creates, and it's pretty intuitive.
|
|
138
|
+
|
|
139
|
+
#### 1. Install and setup yalc
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Make sure yalc is installed globally
|
|
143
|
+
$ npm i yalc -g
|
|
144
|
+
|
|
145
|
+
# Set up yalc in ui-library
|
|
146
|
+
$ cd ui-library/
|
|
147
|
+
$ yalc publish
|
|
148
|
+
|
|
149
|
+
# Add local ui-library package to your app
|
|
150
|
+
$ cd ../myCoolApp/
|
|
151
|
+
$ yalc add @openfin/ui-library
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
This links your local copy of UI Library to your app using symlinks and `package.json`.
|
|
155
|
+
|
|
156
|
+
#### 2. Working with yalc
|
|
157
|
+
|
|
158
|
+
Once you're setup, subsequent changes in UI Library can be propagated across easily.
|
|
159
|
+
|
|
160
|
+
After making changes in `ui-library`, run `npm run build && yalc push`. This will apply a version bump to the local yalc package respository. It will also update the package in your app directory, but you will most likely need to restart any development servers to see the changes.
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
# push updates from ui-library side to your app
|
|
164
|
+
$ npm run build && yalc push
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### Known Issues
|
|
168
|
+
|
|
169
|
+
- Storybook does not pick up changes after a `yalc push` and must be restarted
|
|
170
|
+
|
|
171
|
+
## Compiling the Library
|
|
172
|
+
|
|
173
|
+
### `tsonfig.json`
|
|
174
|
+
|
|
175
|
+
The base Typescript config.
|
|
176
|
+
|
|
177
|
+
### `tsonfig.bundle.json`
|
|
178
|
+
|
|
179
|
+
Extending base config used by `tsc` when bundling the library for a new release.
|
|
180
|
+
|
|
181
|
+
### `tsonfig.storybook.json`
|
|
182
|
+
|
|
183
|
+
Extending base config used by `Storybook` to quiet some extraneous warnings.
|
|
184
|
+
|
|
185
|
+
## Testing
|
|
186
|
+
|
|
187
|
+
```sh
|
|
188
|
+
npm run test
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Versioning & Releasing
|
|
192
|
+
|
|
193
|
+
### 1. Bump package version
|
|
194
|
+
|
|
195
|
+
Once you are ready to make a new release and all PRs meant for a release are merged into `main` branch, you should now create a new PR into `main` to bump the package version to the appropriate number. Get that PR approved and merged into `main`.
|
|
196
|
+
|
|
197
|
+
### 2. Create a release branch
|
|
198
|
+
|
|
199
|
+
Now that the package version is up to date, you should now create a new release branch in github. To do so, go to the [list of branches](https://github.com/openfin/ui-library/branches) and click 'New Branch.' Name the new branch `release/<new-version-number>` (for example `release/0.14.3`) and make sure the branch source is `main`.
|
|
200
|
+
|
|
201
|
+
### 3. Create a new release on Github
|
|
202
|
+
|
|
203
|
+
Once you have created the release branch, you should now create a release through github:
|
|
204
|
+
|
|
205
|
+
- Click [Create a New Release](https://github.com/openfin/ui-library/releases/new)
|
|
206
|
+
- Create a new tag, labelled `<new-version-number>`. (for example `0.14.3`)
|
|
207
|
+
- Change the target branch to the release branch you just created. (for example `release/0.14.3`)
|
|
208
|
+
- Enter the release title to match the tag you just created. (for example `0.14.3`)
|
|
209
|
+
- In the description, enter the changelog from the previous tag. (for example if previous tag is `0.14.2` then your description should be "Change log: `https://github.com/openfin/ui-library/compare/0.14.2...0.14.3`") (Don't worry, you can always go back and edit the description later.)
|
|
210
|
+
|
|
211
|
+
This triggers a Github Action to automatically build the latest version of the `ui-library` and package it for remote installation. You can check the status of this task within this repo's actions tab.
|