Skip to content

Commit a21ec7d

Browse files
authored
Merge branch 'main' into calc
Signed-off-by: Shahriar Shatil <[email protected]>
2 parents f83ffa2 + 24592a6 commit a21ec7d

File tree

146 files changed

+1083
-66224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1083
-66224
lines changed

.browserslistrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
last 2 versions
22
not dead
3-
not IE 11
43
Safari 7
54

6-
# Safari 7 for PhantomJS support
5+
# Safari 7 for PhantomJS support

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,12 @@ module.exports = {
191191
'react/prefer-stateless-function': 'off',
192192
},
193193
},
194+
{
195+
// Currently suppressing the following rules for files in the scripts directory
196+
files: ['scripts/**/*.{ts,tsx,js}'],
197+
rules: {
198+
'@typescript-eslint/no-var-requires': 'off', // not enforcing ES6-style import statements
199+
},
200+
},
194201
],
195202
};

.github/workflows/build_and_test.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ jobs:
125125
with:
126126
node-version-file: '.nvmrc'
127127
registry-url: 'https://registry.npmjs.org'
128-
cache: 'yarn'
129128

130129
- name: Setup Yarn
131130
run: |
@@ -138,9 +137,12 @@ jobs:
138137
with:
139138
name: build
140139

140+
- name: Extract build archive
141+
run: tar -xf ${{ steps.download.outputs.download-path }}/oui.tgz
142+
141143
- name: Get Escaped Download Path
142144
run: |
143-
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
145+
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/package"
144146
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
145147
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
146148
@@ -169,7 +171,6 @@ jobs:
169171
with:
170172
node-version-file: '.nvmrc'
171173
registry-url: 'https://registry.npmjs.org'
172-
cache: 'yarn'
173174

174175
- name: Setup Yarn
175176
run: |
@@ -182,9 +183,12 @@ jobs:
182183
with:
183184
name: build
184185

186+
- name: Extract build archive
187+
run: tar -xf ${{ steps.download.outputs.download-path }}/oui.tgz
188+
185189
- name: Get Escaped Download Path
186190
run: |
187-
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
191+
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/package"
188192
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
189193
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
190194
@@ -215,33 +219,18 @@ jobs:
215219
script: build-platform --linux-arm --skip-os-packages
216220
runs-on: ${{ matrix.os }}
217221
needs: build
218-
defaults:
219-
run:
220-
working-directory: ./artifacts
221222
steps:
222223
- name: Checkout code
223224
uses: actions/checkout@v3
224225
with:
225-
path: ./artifacts
226226
repository: opensearch-project/OpenSearch-Dashboards
227227

228228
- name: Setup Node
229229
uses: actions/setup-node@v3
230230
with:
231-
node-version-file: './artifacts/.nvmrc'
231+
node-version-file: '.nvmrc'
232232
registry-url: 'https://registry.npmjs.org'
233233

234-
- name: Configure Yarn Cache (Linux)
235-
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV
236-
237-
- name: Initialize Yarn Cache
238-
uses: actions/cache@v3
239-
with:
240-
path: ${{ env.YARN_CACHE_LOCATION }}
241-
key: yarn-${{ hashFiles('**/yarn.lock') }}
242-
restore-keys: |
243-
yarn-
244-
245234
- name: Setup Yarn
246235
run: |
247236
npm uninstall -g yarn
@@ -253,17 +242,19 @@ jobs:
253242
with:
254243
name: build
255244

245+
- name: Extract build archive
246+
run: tar -xf ${{ steps.download.outputs.download-path }}/oui.tgz
247+
256248
- name: Get Escaped Download Path
257249
run: |
258-
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
250+
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/package"
259251
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
260252
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
261253
262254
- name: Update OUI version in OSD
263255
run: |
264256
find . -type f -name package.json -exec sed -i 's/"@elastic\/eui": ".*"/"@elastic\/eui": "file:${{ env.OUI_PATH }}"/g' {} \;
265257
266-
267258
- name: Get package version
268259
run: |
269260
echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
@@ -282,5 +273,5 @@ jobs:
282273
if: success()
283274
with:
284275
name: ${{ matrix.suffix }}-${{ env.VERSION }}
285-
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
276+
path: ./target/${{ env.ARTIFACT_BUILD_NAME }}
286277
retention-days: 7

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@
88

99
### 🛡 Security
1010

11+
- [CVE-2023-46234] Bump `browserify-sign` from `4.0.4` to `4.2.2` ([#1117](https://github.com/opensearch-project/oui/pull/1117))
12+
- Bump `babel-template` from `6.26.0` to `@babel/template` `7.10.4` ([#1095](https://github.com/opensearch-project/oui/pull/1095))
13+
1114
### 📈 Features/Enhancements
1215

1316
- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))
17+
- Add slugs to markdown headers ([#1051](https://github.com/opensearch-project/oui/pull/1051))
1418
- Add `crossInCircleEmpty` and `power` icons ([#1044](https://github.com/opensearch-project/oui/pull/1044))
1519
- Optimize `calc()` usage in scss files ([#1002](https://github.com/opensearch-project/oui/issues/1002))
20+
- Add `Figma` icon and link to OUI Figma resources ([#1064](https://github.com/opensearch-project/oui/pull/1064))
21+
1622

1723
### 🐛 Bug Fixes
1824

1925
- Add exit code to compile-scss script on failure ([#1024](https://github.com/opensearch-project/oui/pull/1024))
26+
- Extract build archive into a folder for OSD integration test CI ([#1075](https://github.com/opensearch-project/oui/pull/1075))
27+
- Correct file path for import of Query component ([#1069](https://github.com/opensearch-project/oui/pull/1069))
28+
- Fix "Guidelines" documentation links rendering blank pages ([#1111](https://github.com/opensearch-project/oui/pull/1111))
2029

2130
### 🚞 Infrastructure
2231

@@ -27,11 +36,15 @@
2736
- Update default docsite theme to Next Dark ([#1029](https://github.com/opensearch-project/oui/pull/1029))
2837
- Fix next light color guidelines ([#1030](https://github.com/opensearch-project/oui/pull/1030))
2938
- Update docsite version selector to use OUI components ([#1028](https://github.com/opensearch-project/oui/pull/1028))
39+
- Remove "Widths" section from the OuiModal docs ([#1066](https://github.com/opensearch-project/oui/pull/1066))
3040

3141
### 🛠 Maintenance
32-
42+
- Remove Internet Explorer specific code ([#890](https://github.com/opensearch-project/oui/pull/890))
3343
- Update caniuse database ([#1046](https://github.com/opensearch-project/oui/pull/1046))
3444
- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879))
45+
- Clean up `react-datepicker` package to remove unnecessary directories and files ([#1067](https://github.com/opensearch-project/oui/pull/1067))
46+
- Bump `@types/react` and `csstype` ([#1105](https://github.com/opensearch-project/oui/pull/1105))
47+
- Add `scripts` folder to lint-es script ([#1143](https://github.com/opensearch-project/oui/pull/1143))
3548

3649
### 🪛 Refactoring
3750

@@ -53,13 +66,15 @@
5366
- Adjust background color of OuiToolTip in `next` theme ([#1004](https://github.com/opensearch-project/oui/pull/1004))
5467
- Add new `middle-out` order prop option to `OuiPaletteColorBlind` ([#856](https://github.com/opensearch-project/oui/pull/856))
5568
- Add new icons for OpenSearch Dashboards v2.10.0 ([#1014](https://github.com/opensearch-project/oui/pull/1014))
69+
- Add `onFullScreenChange` to `OuiDataGrid` ([#1053](https://github.com/opensearch-project/oui/pull/1053))
5670

5771
### 🐛 Bug Fixes
5872

5973
- Fix blurry text in breadcrumbs by avoiding skewing text ([#959](https://github.com/opensearch-project/oui/pull/959))
6074
- Remove `calc` usage from SchemaItem styles ([#990](https://github.com/opensearch-project/oui/pull/990))
6175
- Add support for null types when deriving JSON from Sass variables ([#1019](https://github.com/opensearch-project/oui/pull/1019))
6276
- Fix alignment of left icon for OuiListGroupItem with multiline text ([#1027](https://github.com/opensearch-project/oui/pull/1027))
77+
- Update new polygon icon svg ([#1068](https://github.com/opensearch-project/oui/pull/1083))
6378

6479
### 🚞 Infrastructure
6580

@@ -73,9 +88,11 @@
7388
- Replace Avatar in favor of Icon in OuiFacetButtons example ([#987](https://github.com/opensearch-project/oui/pull/987))
7489
- Add dark prop toggles ([#910](https://github.com/opensearch-project/oui/pull/910))
7590
- Remove language from the form validation documentation that doesn't align with the updated guidelines ([#986](https://github.com/opensearch-project/oui/pull/986))
91+
- Remove "Emphasized Side Nav" section from OUI docs site ([#1084](https://github.com/opensearch-project/oui/pull/1084))
7692

7793
### 🛠 Maintenance
7894

95+
- Made changes to `pre-commit` hook to only use `lint` instead of running `test-staged` script ([#1072](https://github.com/opensearch-project/oui/pull/1072))
7996
- [CVE-2023-26136] Add resolution for tough-cookie to ^4.1.3 ([#889](https://github.com/opensearch-project/oui/pull/889))
8097
- [CVE-2023-26115] Bump word-wrap from 1.2.3 to 1.2.4 ([#891](https://github.com/opensearch-project/oui/pull/891))
8198
- Bump Node version to 18.16.0 ([#900](https://github.com/opensearch-project/oui/pull/900))

DEVELOPER_GUIDE.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,25 @@ We depend upon the version of node defined in [.nvmrc](.nvmrc).
1616

1717
You will probably want to install a node version manager. [nvm](https://github.com/creationix/nvm) is recommended.
1818

19-
To install and use the correct node version with `nvm`:
19+
To install and use the correct node version v with `nvm`:
20+
21+
v - version mentioned in [.nvmrc](.nvmrc).
2022

2123
```
2224
nvm install
2325
```
2426

27+
And then also set the node version to use in your terminal
28+
29+
```
30+
nvm use
31+
```
32+
33+
Confirm the version of node by running:
34+
```
35+
yarn node --version
36+
```
37+
2538
### Start documentation server
2639

2740
You can run the documentation locally at [http://localhost:8030/](http://localhost:8030/) by running the following.

i18ntokens.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,12 +2653,12 @@
26532653
"start": {
26542654
"line": 143,
26552655
"column": 4,
2656-
"index": 4700
2656+
"index": 4717
26572657
},
26582658
"end": {
26592659
"line": 148,
26602660
"column": 44,
2661-
"index": 4885
2661+
"index": 4902
26622662
}
26632663
},
26642664
"filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx"
@@ -2671,12 +2671,12 @@
26712671
"start": {
26722672
"line": 143,
26732673
"column": 4,
2674-
"index": 4700
2674+
"index": 4717
26752675
},
26762676
"end": {
26772677
"line": 148,
26782678
"column": 44,
2679-
"index": 4885
2679+
"index": 4902
26802680
}
26812681
},
26822682
"filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx"

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opensearch-project/oui",
33
"description": "OpenSearch UI Component Library",
4-
"version": "1.0.0",
4+
"version": "2.0.0",
55
"license": "Apache-2.0",
66
"main": "lib",
77
"module": "es",
@@ -22,14 +22,14 @@
2222
"extract-i18n-strings": "node ./scripts/babel/fetch-i18n-strings",
2323
"lint": "yarn tsc --noEmit && yarn lint-es && yarn lint-sass",
2424
"lint-fix": "yarn lint-es-fix",
25-
"lint-es": "eslint --cache \"{src,src-docs}/**/*.{ts,tsx,js}\" --max-warnings 0",
25+
"lint-es": "eslint --cache \"{src,src-docs,scripts}/**/*.{ts,tsx,js}\" --max-warnings 0",
2626
"lint-es-fix": "yarn lint-es --fix",
2727
"lint-sass": "sass-lint -v --max-warnings 0",
2828
"lint-sass-fix": "sass-lint-auto-fix -c ./.sass-lint-fix.yml",
2929
"test": "yarn lint && yarn test-unit",
3030
"test-unit": "cross-env NODE_ENV=test jest --config ./scripts/jest/config.json",
3131
"test-a11y": "node ./scripts/a11y-testing",
32-
"test-staged": "yarn lint && node scripts/test-staged.js",
32+
"test-staged": "node scripts/test-staged.js",
3333
"start-test-server": "BABEL_MODULES=false NODE_ENV=puppeteer NODE_OPTIONS=--max-old-space-size=4096 webpack-dev-server --config src-docs/webpack.config.js --port 9999",
3434
"yo-component": "yo ./generator-oui/app/component.js",
3535
"start-test-server-and-a11y-test": "cross-env WAIT_ON_TIMEOUT=600000 start-server-and-test start-test-server http-get://localhost:9999 test-a11y",
@@ -90,7 +90,7 @@
9090
"yo/meow": "^9.0.0"
9191
},
9292
"pre-commit": [
93-
"test-staged"
93+
"lint"
9494
],
9595
"dependencies": {
9696
"@types/chroma-js": "^2.4.0",
@@ -119,6 +119,7 @@
119119
"refractor": "^3.6.0",
120120
"rehype-raw": "^5.0.0",
121121
"rehype-react": "^6.0.0",
122+
"rehype-slug": "^4.0.1",
122123
"rehype-stringify": "^8.0.0",
123124
"remark-emoji": "^2.1.0",
124125
"remark-parse": "^8.0.3",
@@ -143,6 +144,7 @@
143144
"@babel/preset-env": "^7.11.0",
144145
"@babel/preset-react": "^7.10.4",
145146
"@babel/preset-typescript": "^7.12.1",
147+
"@babel/template": "^7.10.4",
146148
"@elastic/charts": "^30.2.0",
147149
"@elastic/eslint-config-kibana": "^0.15.0",
148150
"@faker-js/faker": "^8.0.1",
@@ -163,15 +165,13 @@
163165
"@typescript-eslint/eslint-plugin": "^5.62.0",
164166
"@typescript-eslint/parser": "^5.62.0",
165167
"autoprefixer": "^9.8.6",
166-
"babel-core": "7.0.0-bridge.0",
167168
"babel-eslint": "^10.1.0",
168169
"babel-jest": "^24.1.0",
169170
"babel-loader": "^8.1.0",
170171
"babel-plugin-add-module-exports": "^1.0.2",
171172
"babel-plugin-dynamic-import-node": "^2.3.3",
172173
"babel-plugin-inline-react-svg": "^1.1.1",
173174
"babel-plugin-pegjs-inline-precompile": "^0.1.1",
174-
"babel-template": "^6.26.0",
175175
"cache-loader": "^4.1.0",
176176
"chalk": "^4.1.2",
177177
"chokidar": "^3.5.3",
@@ -222,7 +222,7 @@
222222
"puppeteer": "^19.11.1",
223223
"raw-loader": "^4.0.1",
224224
"react": "^16.14.0",
225-
"react-docgen-typescript": "^1.22.0",
225+
"react-docgen-typescript": "^2.2.2",
226226
"react-dom": "^16.12.0",
227227
"react-helmet": "^6.1.0",
228228
"react-redux": "^8.0.5",
@@ -237,7 +237,7 @@
237237
"sass-embedded": "^1.66.1",
238238
"sass-lint": "^1.13.1",
239239
"sass-lint-auto-fix": "^0.21.2",
240-
"sass-loader": "npm:@bsfishy/[email protected]support-sass-embedded.3",
240+
"sass-loader": "npm:@amoo-miki/[email protected]node-sass-9.0.0-libsass-3.6.5-with-sass-embedded.rc1",
241241
"shelljs": "^0.8.5",
242242
"start-server-and-test": "^2.0.0",
243243
"style-loader": "^1.2.1",

0 commit comments

Comments
 (0)