@corva/ui 0.100.0-21 → 0.100.0-22

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.
Files changed (2) hide show
  1. package/README.md +66 -30
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,41 +1,51 @@
1
1
  # @corva/ui
2
+
2
3
  <a href="https://storybook.dev.corva.ai/" target="_blank"><img src="https://raw.githubusercontent.com/storybooks/brand/master/badge/badge-storybook.svg"></a>
3
4
  [![npm version](https://img.shields.io/npm/v/@corva/ui/latest?color=green&label=%40latest&style=flat-square)](https://www.npmjs.com/package/@corva/ui)
4
5
  [![npm version](https://img.shields.io/npm/v/@corva/ui/next?color=yellow&label=%40next&style=flat-square)](https://www.npmjs.com/package/@corva/ui)
5
6
  [![npm version](https://img.shields.io/npm/v/@corva/ui/dev?color=orange&label=%40dev&style=flat-square)](https://www.npmjs.com/package/@corva/ui)
6
7
 
7
-
8
8
  develop: [![Publish](https://github.com/corva-ai/corva-ui/actions/workflows/publish.yml/badge.svg)](https://github.com/corva-ai/corva-ui/actions/workflows/publish.yml)
9
9
 
10
-
11
- This repo contains components/utils which are shared for Corva ui apps.
10
+ This repo contains components/utils which are shared for Corva UI apps.
12
11
 
13
12
  ### When you need some library changes
14
- Currently @corva/ui library is owned by the Dev Center team, but is developed by every Corva FE developer. So, if you need to make some update in it - you can do it by yourself. For small updates - just make a PR - and someone from the Dev Center team will review it.
15
13
 
16
- If it's something pretty big - it's better to reach out someone from the Dev Center team first, to tell what you need and get feedback how to better do it. Otherwise - you risk that your huge PR on which you worked a week can be rejected because it can be not consistent with the rest of the lib
14
+ Currently, `@corva/ui` library is owned by the Dev Center team, but is developed by every Corva FE developer. So, if you
15
+ need to make some update in it - you can do it by yourself. For small updates - just make a PR - and someone from the
16
+ Dev Center team will review it.
17
+
18
+ If it's something pretty big - it's better to reach out someone from the Dev Center team first, to tell what you need
19
+ and get feedback how to better do it. Otherwise - you risk that your huge PR on which you worked a week can be rejected
20
+ because it can be not consistent with the rest of the lib
17
21
 
18
22
  ### Release & deploy of the library
19
- How to bump the version? What should be the branch name? And other more advanced cases, like release/hotfixes. The guideline for all of these cases can be found [here (Corva access required)](https://www.notion.so/corva/corva-ui-d510f545ffb74c9bafd6b1bfbc0b99bf)
20
23
 
24
+ How to bump the version? What should be the branch name? And other more advanced cases, like release/hotfixes. The
25
+ guideline for all of these cases can be
26
+ found [here (Corva access required)](https://www.notion.so/corva/corva-ui-d510f545ffb74c9bafd6b1bfbc0b99bf)
21
27
 
22
28
  ### Stories for every public component
23
- Every public @corva/ui component has a corresponding `.stories.js` file that describes the component. When you work with public @corva/ui
29
+
30
+ Every public `@corva/ui` component has a corresponding `.stories.js` file that describes the component. When you work
31
+ with
32
+ public `@corva/ui`
24
33
  components - please also update it's `stories.js` file when it's necessary
25
34
 
26
35
  ## Build-time variables
27
36
 
28
- | Name | Default Value | Required |
29
- |----------|-----------|----------|
30
- | REACT_APP_API_URL | https://api.qa.corva.ai | No |
31
- | REACT_APP_DATA_API_URL | https://data.qa.corva.ai | No |
32
- | REACT_APP_CDN_URL | https://cdn.corva.ai | No |
37
+ | Name | Default Value | Required |
38
+ |------------------------|--------------------------|----------|
39
+ | REACT_APP_API_URL | https://api.qa.corva.ai | No |
40
+ | REACT_APP_DATA_API_URL | https://data.qa.corva.ai | No |
41
+ | REACT_APP_CDN_URL | https://cdn.corva.ai | No |
33
42
 
34
43
  ## Local development
35
44
 
36
-
37
- - `yarn storybook` will launch local storybook server which is convenient to use for components testing when you work on public components. That's a playground for building public components.
38
- - `yarn start` will open ExampleApp.js in your browser. That's a playground for building non-public components (such components will be moved from @corva/ui soon)
45
+ - `yarn storybook` will launch local storybook server which is convenient to use for components testing when you work on
46
+ public components. That's a playground for building public components.
47
+ - `yarn start` will open ExampleApp.js in your browser. That's a playground for building non-public components (such
48
+ components will be moved from @corva/ui soon)
39
49
 
40
50
  ## Link local `@corva/ui` to your app
41
51
 
@@ -43,46 +53,56 @@ components - please also update it's `stories.js` file when it's necessary
43
53
 
44
54
  * Make sure you are using `@corva/ui` with latest updates from `development` branch
45
55
 
46
- * If your app is using `getWebpackConfig` from `@corva/ui` instead of `@corva/dc-platform-shared`, migrate it according to [this guide](https://www.notion.so/corva/Migration-to-corva-dc-platform-shared-721cc822e23c4c43a7630b73fdeec3d9)
56
+ * If your app is using `getWebpackConfig` from `@corva/ui` instead of `@corva/dc-platform-shared`, migrate it according
57
+ to [this guide](https://www.notion.so/corva/Migration-to-corva-dc-platform-shared-721cc822e23c4c43a7630b73fdeec3d9)
47
58
 
48
59
  ### Steps to link your local DC app**
49
60
 
50
61
  1. Run `yarn build-dev` or `yarn build-watch` in @corva/ui repo
51
- <br/>***Note:** `yarn build` will not work for linking*
62
+ <br/>***Note:** `yarn build` will not work for linking*
52
63
 
53
64
  2. `cd ./dist` and run `yarn link` in @corva/ui dist folder (only first time)
54
65
 
55
66
  3. Run `yarn link @corva/ui` in your local DC app root folder
56
67
 
57
- 4. Add following parameters to the `config-overrides.js`.<br/>It should avoid the issue of mulitple React instances and the MUI styling issue
58
- ```
68
+ 4. Add following parameters to the `config-overrides.js`.<br/>It should avoid the issue of multiple React instances and
69
+ the MUI styling issue
70
+
71
+ ```js
59
72
  {
60
- resolve: {
61
- alias: {
62
- react: path.resolve('./node_modules/react'),
63
- '@material-ui': resolve('./node_modules/@material-ui'),
64
- }
73
+ resolve: {
74
+ alias: {
75
+ react: path.resolve('./node_modules/react'),
76
+ '@material-ui'
77
+ :
78
+ resolve('./node_modules/@material-ui'),
65
79
  }
80
+ }
66
81
  }
67
82
  ```
68
83
 
69
-
70
84
  5. Run `yarn start` in your local DC app root folder
71
85
 
72
- ***Note:** npm link will not install @corva/ui dependencies in your node modules folder.*
73
- If you want to debug a change in @corva/ui dependencies, you should use `yarn add file:../corva-ui/dist`, this will install new dependencies.
86
+ ***Note:** npm link will not install `@corva/ui` dependencies in your node modules folder.*
87
+ If you want to debug a change in `@corva/ui` dependencies, you should use `yarn add file:../corva-ui/dist`, this will
88
+ install new dependencies.
74
89
 
75
90
  ### Troubleshooting
76
91
 
77
92
  #### Failed to compile.<br />`Module not found: Can't resolve '@corva/ui' in ...`
78
- Most likely you need to [migrate to `@corva/dc-platform-shared`](https://www.notion.so/corva/Migration-to-corva-dc-platform-shared-721cc822e23c4c43a7630b73fdeec3d9) for cjs webpack config usage
93
+
94
+ Most likely you need to [migrate to
95
+ `@corva/dc-platform-shared`](https://www.notion.so/corva/Migration-to-corva-dc-platform-shared-721cc822e23c4c43a7630b73fdeec3d9)
96
+ for cjs webpack config usage
79
97
 
80
98
  #### Error.<br/>`Invalid hook call. Hooks can only be called inside of the body of a function component...`
81
99
 
82
- In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.
100
+ In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming
101
+ myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This
102
+ should make the library use the application’s React copy.
83
103
 
104
+ Or change the webpack configuration in `config-overrides.js` file in your app. (Don't commit the changes of this file)
84
105
 
85
- Or change the webpack configuration in `config-overrides.js` file in your app. (Don't commit the changes of this file)
86
106
  ```
87
107
  {
88
108
  resolve: {
@@ -94,7 +114,9 @@ Most likely you need to [migrate to `@corva/dc-platform-shared`](https://www.not
94
114
  ```
95
115
 
96
116
  #### Material UI styles are corrupted
117
+
97
118
  Add the following parameter to the `config-overrides.js` file in your app
119
+
98
120
  ```
99
121
  {
100
122
  resolve: {
@@ -104,3 +126,17 @@ Add the following parameter to the `config-overrides.js` file in your app
104
126
  }
105
127
  }
106
128
  ```
129
+
130
+ ### CI/CD
131
+
132
+ #### Stale workflow
133
+
134
+ To prevent pull request from piling up and save on resources, there is a [stale workflow](./.github/workflows/stale.yml)
135
+ running in this repository. It will automatically run on schedule to mark PR's that have not received any updates in 14
136
+ days as stale, marking them with label and leaving a comment. More importantly, preview environment for stale PRs are
137
+ removed. To "unstale" the PR, you either need to make any change to it, push new commit or just remove the `stale`
138
+ label.
139
+ If for some reason your PR does need to stay not stale for a long time, you can add `never-stale` label to it.
140
+
141
+ > [!IMPORTANT]
142
+ > Stale pull requests will be deleted after 180 days!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.100.0-21",
3
+ "version": "0.100.0-22",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"