Skip to content

Commit

Permalink
Merge branch 'main' into chore/bump-jest-26
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuarrrr committed Jan 11, 2024
2 parents ef84f0b + 064a02c commit a2f73ad
Show file tree
Hide file tree
Showing 52 changed files with 7,914 additions and 276 deletions.
4 changes: 2 additions & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ module.exports = {
"./scripts/babel/variables-from-scss",
"add-module-exports",
// stage 3
"@babel/proposal-object-rest-spread",
"@babel/transform-object-rest-spread",
// stage 2
"@babel/proposal-class-properties",
"@babel/transform-class-properties",
[
"inline-react-svg",
{
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @seanneumann @AMoo-Miki @rednaksi91 @KrooshalUX @BSFishy @bandinib-amzn @ashwin-pc @joshuarrrr @andreymyssak @SergeyMyssak
* @AMoo-Miki @rednaksi91 @KrooshalUX @BSFishy @bandinib-amzn @ashwin-pc @joshuarrrr @andreymyssak @SergeyMyssak
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and test

on:
push:
branches: ['**', '!backport/**', '!whitesource-remediate/**']
branches: ['**', '!backport/**', '!dependabot/**', '!whitesource-remediate/**']
paths-ignore:
- '**/*.md'
pull_request:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@
### 🛡 Security

- [CVE-2023-28155] Bump `jest` from `24.9.0` to `26.6.2` ([#1102](https://github.com/opensearch-project/oui/pull/1102))
- [CVE-2023-46234] Bump `browserify-sign` from `4.0.4` to `4.2.2` ([#1117](https://github.com/opensearch-project/oui/pull/1117))
- Bump `babel-template` from `6.26.0` to `@babel/template` `7.10.4` ([#1095](https://github.com/opensearch-project/oui/pull/1095))
- [CVE-2023-45133] Bump `@babel/traverse` from `7.12.10` to `7.23.6` ([#1174](https://github.com/opensearch-project/oui/pull/1174))

### 📈 Features/Enhancements

- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))
- Add slugs to markdown headers ([#1051](https://github.com/opensearch-project/oui/pull/1051))
- Add `crossInCircleEmpty` and `power` icons ([#1044](https://github.com/opensearch-project/oui/pull/1044))
- Add `Figma` icon and link to OUI Figma resources ([#1064](https://github.com/opensearch-project/oui/pull/1064))
- Rename `crossInACircleFilled` asset files and ensure backward compatibility ([#1113](https://github.com/opensearch-project/oui/pull/1113))
- Implement validation for icon input source & set default icon to `Beaker` ([#1137](https://github.com/opensearch-project/oui/pull/1137))
- Add `Docking` icons ([#1041](https://github.com/opensearch-project/oui/pull/1041))
- Add SplitButton control ([#1193](https://github.com/opensearch-project/oui/pull/1193))

### 🐛 Bug Fixes

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

### 🚞 Infrastructure

- Add integration test with OSD workflows ([#1017](https://github.com/opensearch-project/oui/pull/1017))
- Skip build and test workflows on dependabot PR ([#1170](https://github.com/opensearch-project/oui/pull/1170))

### 📝 Documentation

Expand All @@ -42,6 +51,9 @@
- Clean up `react-datepicker` package to remove unnecessary directories and files ([#1067](https://github.com/opensearch-project/oui/pull/1067))
- Bump `@types/react` and `csstype` ([#1105](https://github.com/opensearch-project/oui/pull/1105))
- Add `scripts` folder to lint-es script ([#1143](https://github.com/opensearch-project/oui/pull/1143))
- Clean up code OUI Breadcrumb component from previous updates ([#1144](https://github.com/opensearch-project/oui/pull/1144))
- Update deprecated Babel plugins ([#1155](https://github.com/opensearch-project/oui/pull/1155))
- Move @seanneumann to emeritus maintainer ([#1188](https://github.com/opensearch-project/oui/pull/1188))

### 🪛 Refactoring

Expand Down Expand Up @@ -72,6 +84,7 @@
- Add support for null types when deriving JSON from Sass variables ([#1019](https://github.com/opensearch-project/oui/pull/1019))
- Fix alignment of left icon for OuiListGroupItem with multiline text ([#1027](https://github.com/opensearch-project/oui/pull/1027))
- Update new polygon icon svg ([#1068](https://github.com/opensearch-project/oui/pull/1083))
- Remove max-height for TreeView node ([[#1118](https://github.com/opensearch-project/oui/issues/1118)])

### 🚞 Infrastructure

Expand Down
8 changes: 7 additions & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This document contains a list of maintainers in this repo. See [opensearch-proje

| Maintainer | GitHub ID | Affiliation |
| ------------------------ | ------------------------------------------------- | ----------- |
| Sean Neumann | [seanneumann](https://github.com/seanneumann) | Amazon |
| Miki Barahmand | [AMoo-Miki](https://github.com/AMoo-Miki) | Amazon |
| Iskander Rakhmanberdiyev | [rednaksi91](https://github.com/rednaksi91) | Amazon |
| Kroosh | [KrooshalUX](https://github.com/KrooshalUX) | Amazon |
Expand All @@ -16,3 +15,10 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
| Josh Romero | [joshuarrrr](https://github.com/joshuarrrr) | Amazon |
| Andrey Myssak | [andreymyssak](https://github.com/andreymyssak) | Contributor |
| Sergey Myssak | [SergeyMyssak](https://github.com/SergeyMyssak) | Contributor |


## Emeritus

| Maintainer | GitHub ID | Affiliation |
|--------------------------|---------------------------------------------------|-------------|
| Sean Neumann | [seanneumann](https://github.com/seanneumann) | Contributor |
56 changes: 28 additions & 28 deletions i18ntokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -1643,14 +1643,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 275,
"line": 279,
"column": 4,
"index": 10041
"index": 10184
},
"end": {
"line": 278,
"line": 282,
"column": 46,
"index": 10201
"index": 10344
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1661,14 +1661,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 281,
"line": 285,
"column": 10,
"index": 10275
"index": 10418
},
"end": {
"line": 283,
"line": 287,
"column": 52,
"index": 10397
"index": 10540
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1679,14 +1679,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 990,
"line": 1004,
"column": 4,
"index": 32868
"index": 33235
},
"end": {
"line": 995,
"line": 1009,
"column": 53,
"index": 33041
"index": 33408
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1697,14 +1697,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 990,
"line": 1004,
"column": 4,
"index": 32868
"index": 33235
},
"end": {
"line": 995,
"line": 1009,
"column": 53,
"index": 33041
"index": 33408
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1715,14 +1715,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 1031,
"line": 1045,
"column": 20,
"index": 34079
"index": 34453
},
"end": {
"line": 1041,
"line": 1055,
"column": 3,
"index": 34366
"index": 34740
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1733,14 +1733,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 1043,
"line": 1057,
"column": 25,
"index": 34394
"index": 34768
},
"end": {
"line": 1052,
"line": 1066,
"column": 3,
"index": 34644
"index": 35018
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand All @@ -1751,14 +1751,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 1171,
"line": 1185,
"column": 18,
"index": 39758
"index": 40132
},
"end": {
"line": 1174,
"line": 1188,
"column": 20,
"index": 39911
"index": 40285
}
},
"filepath": "src/components/datagrid/data_grid.tsx"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"refractor": "^3.6.0",
"rehype-raw": "^5.0.0",
"rehype-react": "^6.0.0",
"rehype-slug": "^4.0.1",
"rehype-stringify": "^8.0.0",
"remark-emoji": "^2.1.0",
"remark-parse": "^8.0.3",
Expand All @@ -135,10 +136,10 @@
"@axe-core/puppeteer": "4.6.1",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.10.4",
"@babel/plugin-transform-class-properties": "^7.23.3",
"@babel/plugin-transform-object-rest-spread": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const GuideMarkdownFormat: FunctionComponent<GuideMarkdownFormatProps> =
children,
}) => {
const processingPlugins = getDefaultOuiMarkdownProcessingPlugins();
const rehype2reactConfig = processingPlugins[1][1];
const rehype2reactConfig = processingPlugins[2][1];

rehype2reactConfig.components.h2 = ({ children }) => {
const id = slugify(children[0]);
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/components/guide_section/guide_section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const GuideSection: FunctionComponent<GuideSection> = ({

const renderPlaygroundToggle = () => {
const isPlaygroundUnsupported =
typeof window !== 'undefined' && typeof document !== 'undefined';
typeof window === 'undefined' || typeof document === 'undefined';

if (!isPlaygroundUnsupported && !!playground) {
return (
Expand Down
11 changes: 4 additions & 7 deletions src-docs/src/routes.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import React, { createElement, Fragment } from 'react';
Expand Down Expand Up @@ -197,6 +191,8 @@ import { SideNavExample } from './views/side_nav/side_nav_example';

import { SpacerExample } from './views/spacer/spacer_example';

import { SplitButtonExample } from './views/split_button/split_button_example';

import { StatExample } from './views/stat/stat_example';

import { StepsExample } from './views/steps/steps_example';
Expand Down Expand Up @@ -353,6 +349,7 @@ const navigation = [
items: [
BreadcrumbsExample,
ButtonExample,
SplitButtonExample,
CollapsibleNavExample,
ContextMenuExample,
ControlBarExample,
Expand Down
8 changes: 7 additions & 1 deletion src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const iconTypes = [
'cross',
'crosshairs',
'crossInCircleEmpty',
'crossInACircleFilled',
'crossInCircleFilled',
'currency',
'cut',
'database',
Expand All @@ -81,6 +81,12 @@ export const iconTypes = [
'documents',
'dot',
'download',
'dockedBottom',
'dockedDetached',
'dockedLeft',
'dockedRight',
'dockedTakeover',
'dockedTop',
'email',
'empty',
'eql',
Expand Down
4 changes: 2 additions & 2 deletions src-docs/src/views/package/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { OuiMarkdownFormat } from '../../../../src';
import { GuidePage } from '../../components/guide_page';

const changelogSource = require('!!raw-loader!../../../../CHANGELOG.md').default.replace(
/## \[`main`\].+?##/s, // remove the `main` heading & contents
'##'
/[\r\n]##\s+\[Unreleased\].+?[\r\n]+(?=##\s)/s, // remove the `unreleased` heading & contents
''
);

export const Changelog = {
Expand Down
27 changes: 27 additions & 0 deletions src-docs/src/views/split_button/split_button_basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* copyright opensearch contributors
* spdx-license-identifier: apache-2.0
*/

import React from 'react';

import { OuiSplitButton } from '../../../../src/components';

export default () => {
const options = [
{ id: '1', display: 'Option 1', href: '#' },
{
id: '2',
display: 'Option 2',
onClick: () => console.log('Option 2 clicked'),
},
];

const primaryClick = () => console.log('Primary clicked');

return (
<OuiSplitButton options={options} onClick={primaryClick}>
Basic Split Button
</OuiSplitButton>
);
};
Loading

0 comments on commit a2f73ad

Please sign in to comment.