From cf9cf4afdd2f46f35d22311ced3be35a938b9579 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 21 Aug 2024 13:23:47 -0700 Subject: [PATCH] Add workspace icons (#1365) Also: * Synced CHANGELOG.md Signed-off-by: Miki --- CHANGELOG.md | 37 ++++--- src-docs/src/views/icon/icon_example.js | 11 ++ src-docs/src/views/icon/workspace.js | 61 +++++++++++ .../icon/__snapshots__/icon.test.tsx.snap | 103 ++++++++++++++++++ .../icon/assets/workspace/wsAnalytics.js | 25 +++++ .../icon/assets/workspace/wsAnalytics.svg | 29 +++++ .../icon/assets/workspace/wsEssentials.js | 25 +++++ .../icon/assets/workspace/wsEssentials.svg | 29 +++++ .../icon/assets/workspace/wsObservability.js | 25 +++++ .../icon/assets/workspace/wsObservability.svg | 37 +++++++ .../icon/assets/workspace/wsSearch.js | 25 +++++ .../icon/assets/workspace/wsSearch.svg | 29 +++++ .../assets/workspace/wsSecurityAnalytics.js | 25 +++++ .../assets/workspace/wsSecurityAnalytics.svg | 29 +++++ .../icon/assets/workspace/wsSelector.js | 25 +++++ .../icon/assets/workspace/wsSelector.svg | 14 +++ src/components/icon/icon.tsx | 6 + 17 files changed, 517 insertions(+), 18 deletions(-) create mode 100644 src-docs/src/views/icon/workspace.js create mode 100644 src/components/icon/assets/workspace/wsAnalytics.js create mode 100644 src/components/icon/assets/workspace/wsAnalytics.svg create mode 100644 src/components/icon/assets/workspace/wsEssentials.js create mode 100644 src/components/icon/assets/workspace/wsEssentials.svg create mode 100644 src/components/icon/assets/workspace/wsObservability.js create mode 100644 src/components/icon/assets/workspace/wsObservability.svg create mode 100644 src/components/icon/assets/workspace/wsSearch.js create mode 100644 src/components/icon/assets/workspace/wsSearch.svg create mode 100644 src/components/icon/assets/workspace/wsSecurityAnalytics.js create mode 100644 src/components/icon/assets/workspace/wsSecurityAnalytics.svg create mode 100644 src/components/icon/assets/workspace/wsSelector.js create mode 100644 src/components/icon/assets/workspace/wsSelector.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a2b6b9942..32138579a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,17 +8,10 @@ ### 📈 Features/Enhancements -- Add V9 Theme ([#1344](https://github.com/opensearch-project/oui/pull/1344)) -- Add history icon and alias it as recent ([#1346](https://github.com/opensearch-project/oui/pull/1346)) -- Introduce compressed OuiSearchBar ([#1354](https://github.com/opensearch-project/oui/pull/1354)) -- Introduce `$ouiLegibilityMaxWidth` variable and `ouiLegibilityMaxWidth` mixin ([#1359](https://github.com/opensearch-project/oui/pull/1359)) +- Add new icons for workspaces ([#1365](https://github.com/opensearch-project/oui/pull/1365)) ### 🐛 Bug Fixes -- Update styling for empty button and date picker icon ([#1342](https://github.com/opensearch-project/oui/pull/1342)) -- Fix height of OuiCombobox when `append` is used ([#1338](https://github.com/opensearch-project/oui/pull/1338)) -- Fix `docgenInfo` errors when accessing the props or playground of some docs ([#1355](https://github.com/opensearch-project/oui/pull/1355)) - ### 🚞 Infrastructure ### 📝 Documentation @@ -29,18 +22,32 @@ ### 🔩 Tests -## [`1.9.0`](https://github.com/opensearch-project/oui/tree/1.8.1) +## [Unreleased `1.10.0`](https://github.com/opensearch-project/oui/tree/1.10) ### 📈 Features/Enhancements -- Add display type and color to OuiSwitch ([#1332](https://github.com/opensearch-project/oui/pull/1332)) +- Add V9 Theme ([#1344](https://github.com/opensearch-project/oui/pull/1344)) +- Add history icon and alias it as recent ([#1346](https://github.com/opensearch-project/oui/pull/1346)) +- Introduce compressed OuiSearchBar ([#1354](https://github.com/opensearch-project/oui/pull/1354)) +- Introduce `$ouiLegibilityMaxWidth` variable and `ouiLegibilityMaxWidth` mixin ([#1359](https://github.com/opensearch-project/oui/pull/1359)) ### 🐛 Bug Fixes -- Fix the availability of OuiCompressedSuperDatePicker ([#1325](https://github.com/opensearch-project/oui/pull/1325)) - Fix now button to be secondary in SuperDatePicker ([#1320](https://github.com/opensearch-project/oui/pull/1320)) +- Update styling for empty button and date picker icon ([#1342](https://github.com/opensearch-project/oui/pull/1342)) +- Fix height of OuiCombobox when `append` is used ([#1338](https://github.com/opensearch-project/oui/pull/1338)) +- Fix `docgenInfo` errors when accessing the props or playground of some docs ([#1355](https://github.com/opensearch-project/oui/pull/1355)) + + +## [`1.9.0`](https://github.com/opensearch-project/oui/tree/1.9.0) + +### 📈 Features/Enhancements + +- Add display type and color to OuiSwitch ([#1332](https://github.com/opensearch-project/oui/pull/1332)) +### 🐛 Bug Fixes +- Fix the availability of OuiCompressedSuperDatePicker ([#1325](https://github.com/opensearch-project/oui/pull/1325)) ## [`1.8.1`](https://github.com/opensearch-project/oui/tree/1.8.1) @@ -108,6 +115,7 @@ - Clean up unused runtime and dev dependencies ([#1135](https://github.com/opensearch-project/oui/pull/1135)) +### 🪛 Refactoring ## [`1.6.0`](https://github.com/opensearch-project/oui/tree/1.6.0) @@ -153,18 +161,11 @@ - Eliminate screenreader content when copying and pasting data grid table ([#1198](https://github.com/opensearch-project/oui/pull/1198)) - [Next Theme] Set base font size to 18px ([#1221](https://github.com/opensearch-project/oui/pull/1221)) - [Next Theme] Revert `font-weight` of OuiButton to normal from semi-bold ([#1222](https://github.com/opensearch-project/oui/pull/1222)) -- Convert shorthand palette colors to full 6-char hex ([#1262](https://github.com/opensearch-project/oui/pull/1262)) -- Use small font size consistently in buttons and button groups ([#1281](https://github.com/opensearch-project/oui/pull/1281)) -- Use faster animations for modals, popovers, and tooltips ([#1282](https://github.com/opensearch-project/oui/pull/1282)) -- Adjust popover and context menu title styles and tooltip padding ([#1283](https://github.com/opensearch-project/oui/pull/1283)) -- Remove Button translations and add inset shadow on active ([#1285](https://github.com/opensearch-project/oui/pull/1285)) -- Make Super Update Button secondary instead of primary ([#1286](https://github.com/opensearch-project/oui/pull/1286)) ### 🐛 Bug Fixes - Fix bug in OuiButtonContent for showing info tooltip in icon-only buttons when hovered([#1160](https://github.com/opensearch-project/oui/pull/1160)) - Fix playground support check ([#1162](https://github.com/opensearch-project/oui/pull/1162)) -- Make a OuiSplitButton with no options present as a button ([#1208](https://github.com/opensearch-project/oui/pull/1208)) - Prevent collapsable button of a resizable from adding to the height when hidden ([#1241](https://github.com/opensearch-project/oui/pull/1241)) - Prevent action buttons of OuiDataGridCell from moving the content ([#1224](https://github.com/opensearch-project/oui/pull/1224)) - Fix vertical alignment and font weight of breadcrumbs that are buttons or links ([#1232](https://github.com/opensearch-project/oui/pull/1232)) diff --git a/src-docs/src/views/icon/icon_example.js b/src-docs/src/views/icon/icon_example.js index 01d56a91ca..50db29deca 100644 --- a/src-docs/src/views/icon/icon_example.js +++ b/src-docs/src/views/icon/icon_example.js @@ -38,6 +38,8 @@ import Ml from './ml'; import Logos from './logos'; +import Workspace from './workspace'; + import IconSizes from './icon_sizes'; import IconColors from './icon_colors'; @@ -115,6 +117,15 @@ export const IconExample = { ), demo: , }, + { + title: 'Workspaces', + text: ( +

+ Workspace logos are usually displayed at 16x16 or above. +

+ ), + demo: , + }, { title: 'Apps', text: ( diff --git a/src-docs/src/views/icon/workspace.js b/src-docs/src/views/icon/workspace.js new file mode 100644 index 0000000000..8a2953100f --- /dev/null +++ b/src-docs/src/views/icon/workspace.js @@ -0,0 +1,61 @@ +/* + * 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 from 'react'; + +import { + OuiFlexGrid, + OuiFlexItem, + OuiIcon, + OuiPanel, + OuiCodeBlock, + OuiCopy, + OuiSpacer, +} from '../../../../src/components'; + +const iconTypes = [ + 'wsAnalytics', + 'wsEssentials', + 'wsObservability', + 'wsSearch', + 'wsSecurityAnalytics', + 'wsSelector', +]; + +export default () => ( + <> + + {''} + + + + {iconTypes.map((iconType) => ( + + + {(copy) => ( + +  {' '} + {iconType} + + )} + + + ))} + + +); diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 4d0f007aa3..fc5940ed05 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -10358,6 +10358,109 @@ exports[`OuiIcon props type wrench is rendered 1`] = ` `; +exports[`OuiIcon props type wsAnalytics is rendered 1`] = ` + +`; + +exports[`OuiIcon props type wsEssentials is rendered 1`] = ` + +`; + +exports[`OuiIcon props type wsObservability is rendered 1`] = ` + +`; + +exports[`OuiIcon props type wsSearch is rendered 1`] = ` + +`; + +exports[`OuiIcon props type wsSecurityAnalytics is rendered 1`] = ` + +`; + +exports[`OuiIcon props type wsSelector is rendered 1`] = ` + +`; + exports[`OuiIcon render different types of icons renders custom components 1`] = `