Skip to content

Commit

Permalink
Merge branch 'main' into eslint-bump
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuarrrr authored Sep 13, 2023
2 parents 03450ba + 2cfa77d commit add57a2
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 7 deletions.
208 changes: 206 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ on:
paths-ignore:
- '**/*.md'

env:
CI: 1
GCS_UPLOAD_PREFIX: fake
NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first"

jobs:
lint-test:
runs-on: ${{ matrix.os }}
name: Lint and Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Expand Down Expand Up @@ -41,8 +46,8 @@ jobs:
run: yarn test-unit

build:
runs-on: ubuntu-latest
name: Build on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -72,6 +77,26 @@ jobs:
name: build
path: oui.tgz

build-docs:
name: Build Docs on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn install --frozen-lockfile
- name: Build Docs
run: yarn build-docs

Expand All @@ -80,3 +105,182 @@ jobs:
with:
name: docs
path: docs/

osd-unit:
name: OSD Jest test (ciGroup${{ matrix.group }})
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: opensearch-project/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
- name: Download build
id: download
uses: actions/download-artifact@v3
with:
name: build

- name: Get Escaped Download Path
run: |
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
- name: Update OUI version in OSD
run: |
find . -type f -name package.json -exec sed -i 's/"@elastic\/eui": ".*"/"@elastic\/eui": "file:${{ env.OUI_PATH }}"/g' {} \;
- name: Bootstrap OSD
run: yarn osd bootstrap

- name: Run Jest Tests
run: yarn test:jest:ci --ci-group=${{ matrix.group }}

osd-integration:
name: OSD Integration test
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: opensearch-project/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
- name: Download build
id: download
uses: actions/download-artifact@v3
with:
name: build

- name: Get Escaped Download Path
run: |
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
- name: Update OUI version in OSD
run: |
find . -type f -name package.json -exec sed -i 's/"@elastic\/eui": ".*"/"@elastic\/eui": "file:${{ env.OUI_PATH }}"/g' {} \;
- name: Bootstrap OSD
run: yarn osd bootstrap

- name: Run Integration Tests
run: yarn test:jest_integration:ci

osd-build:
name: OSD Build on ${{ matrix.name }}
strategy:
matrix:
include:
- os: ubuntu-latest
name: Linux x64
ext: tar.gz
suffix: linux-x64
script: build-platform --linux --skip-os-packages
- os: ubuntu-latest
name: Linux ARM64
ext: tar.gz
suffix: linux-arm64
script: build-platform --linux-arm --skip-os-packages
runs-on: ${{ matrix.os }}
needs: build
defaults:
run:
working-directory: ./artifacts
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: ./artifacts
repository: opensearch-project/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Configure Yarn Cache (Linux)
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
- name: Download build
id: download
uses: actions/download-artifact@v3
with:
name: build

- name: Get Escaped Download Path
run: |
RAW_OUI_PATH="${{ steps.download.outputs.download-path }}/oui.tgz"
OUI_PATH=$(echo $RAW_OUI_PATH | sed 's/\//\\\//g')
echo "OUI_PATH=$OUI_PATH" >> "$GITHUB_ENV"
- name: Update OUI version in OSD
run: |
find . -type f -name package.json -exec sed -i 's/"@elastic\/eui": ".*"/"@elastic\/eui": "file:${{ env.OUI_PATH }}"/g' {} \;
- name: Get package version
run: |
echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
- name: Get artifact build name
run: |
echo "ARTIFACT_BUILD_NAME=opensearch-dashboards-${{ env.VERSION }}-${{ matrix.suffix }}.${{ matrix.ext }}" >> $GITHUB_ENV
- name: Run bootstrap
run: yarn osd bootstrap

- name: Build `${{ matrix.name }}`
run: yarn ${{ matrix.script }} --release

- uses: actions/upload-artifact@v3
if: success()
with:
name: ${{ matrix.suffix }}-${{ env.VERSION }}
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 7
29 changes: 26 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,35 @@

### 📈 Features/Enhancements

- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))

### 🐛 Bug Fixes

- Add exit code to compile-scss script on failure ([#1024](https://github.com/opensearch-project/oui/pull/1024))

### 🚞 Infrastructure

- Add integration test with OSD workflows ([#1017](https://github.com/opensearch-project/oui/pull/1017))

### 📝 Documentation

- Update default docsite theme to Next Dark ([#1029](https://github.com/opensearch-project/oui/pull/1029))
- Fix next light color guidelines ([#1030](https://github.com/opensearch-project/oui/pull/1030))

### 🛠 Maintenance

### 🪛 Refactoring

### 🔩 Tests

## [`1.3.0`](https://github.com/opensearch-project/oui/tree/1.3.0)

### 📈 Features/Enhancements

- Rename the aliased theme files ([#863](https://github.com/opensearch-project/oui/pull/863))
- Fix `autofill` text color in dark themes ([#871](https://github.com/opensearch-project/oui/pull/871))
- [Header] Update background color in next theme ([#936](https://github.com/opensearch-project/oui/pull/936))
- Set link to use semi bold font weight ([#961](https://github.com/opensearch-project/oui/pull/961))
- Update ouiTextSubduedColor in `next` dark theme ([#973](https://github.com/opensearch-project/oui/pull/973))
- Adds `SchemaItem` as an experimental component ([#974](https://github.com/opensearch-project/oui/pull/974))
- Make `CollapsibleNav` and `CollapsibleNavGroup` background colors theme-able ([#968](https://github.com/opensearch-project/oui/pull/968), [#1016](https://github.com/opensearch-project/oui/pull/1016))
- Update next light theme primary color to #07827E ([#981](https://github.com/opensearch-project/oui/pull/981))
Expand All @@ -29,6 +53,7 @@
- Fix blurry text in breadcrumbs by avoiding skewing text ([#959](https://github.com/opensearch-project/oui/pull/959))
- Remove `calc` usage from SchemaItem styles ([#990](https://github.com/opensearch-project/oui/pull/990))
- 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))

### 🚞 Infrastructure

Expand Down Expand Up @@ -56,8 +81,6 @@

- Clean up focus background implementation ([#962](https://github.com/opensearch-project/oui/pull/962))

### 🔩 Tests

## [`1.1.1`](https://github.com/opensearch-project/oui/tree/1.1.1)

- Revert "Rectify super date picker functionality" ([#724](https://github.com/opensearch-project/oui/pull/724))
Expand Down
5 changes: 5 additions & 0 deletions scripts/compile-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ async function compileScssFiles(
error.stack
}`
);

process.exitCode = 1;
return;
}


Expand All @@ -99,6 +102,8 @@ async function compileScssFiles(
error.stack
}`
);

process.exitCode = 1;
}
/* End of Aliases */
})
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/components/with_theme/theme_context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { applyTheme } from '../../services';
const THEME_NAMES = OUI_THEMES.map(({ value }) => value);

const defaultState = {
theme: THEME_NAMES[0],
theme: THEME_NAMES[3],
changeTheme: (themeValue: OUI_THEME['value']) => {
applyTheme(themeValue);
},
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/guidelines/_get_sass_vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import lightColors from '!!sass-vars-to-js-loader!../../../../src/global_styling/variables/_colors.scss';
import darkColors from '!!sass-vars-to-js-loader!../../../../src/themes/oui/oui_colors_dark.scss';
import lightNextColors from '!!sass-vars-to-js-loader!../../../../src/themes/oui-next/oui_next_colors_light.scss';
import lightNextColors from '!!sass-vars-to-js-loader!../../../../src/themes/oui-next/global_styling/variables/_colors.scss';
import darkNextColors from '!!sass-vars-to-js-loader!../../../../src/themes/oui-next/oui_next_colors_dark.scss';

export const getSassVars = (theme) => {
Expand Down
7 changes: 7 additions & 0 deletions src-docs/src/views/list_group/list_group_extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,12 @@ export default () => (
wrapText
label="Fourth very, very long item with wrapping enabled that will not force truncation"
/>

<OuiListGroupItem
iconType={'package'}
onClick={() => {}}
wrapText
label="Fifth very long item with wrapping enabled and icon included"
/>
</OuiListGroup>
);
13 changes: 13 additions & 0 deletions src/components/list_group/_list_group_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
}
}

.ouiListGroupItem__icon {
height: $ouiSizeL;
}

.ouiListGroupItem-isActive:not(.ouiListGroupItem--ghost) & {
color: $ouiTextColor;
}
Expand All @@ -117,6 +121,7 @@
}

.ouiListGroupItem__icon {
align-self: flex-start;
margin-right: $ouiSizeM;
flex-grow: 0;
flex-shrink: 0;
Expand All @@ -140,13 +145,21 @@
.ouiListGroupItem__text {
line-height: $ouiSize;
}

.ouiListGroupItem__icon {
height: $ouiSize;
}
}

.ouiListGroupItem--large {
.ouiListGroupItem__button,
.ouiListGroupItem__text {
line-height: $ouiSizeXL;
}

.ouiListGroupItem__icon {
height: $ouiSizeXL;
}
}

.ouiListGroupItem--wrapText {
Expand Down

0 comments on commit add57a2

Please sign in to comment.