Skip to content

Commit

Permalink
feat(side-by-side): Create loading component (#570)
Browse files Browse the repository at this point in the history
* chore: Update lockfile version

* feat(side-by-side): Create loading component

* chore: Update pnpm version to 9 in CI workflows

* chore: Update Node.js version to 18.x in CI workflows

* chore: Update test
  • Loading branch information
TSenter authored May 9, 2024
1 parent 8e969c9 commit 747baf9
Show file tree
Hide file tree
Showing 9 changed files with 7,945 additions and 5,692 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,36 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm run lint

- name: Run Tests
run: pnpm run test:ember

Expand All @@ -52,26 +59,32 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --no-lockfile

- name: Run Tests
run: pnpm run test:ember

Expand All @@ -96,15 +109,19 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
8 changes: 4 additions & 4 deletions .github/workflows/ember.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down Expand Up @@ -58,12 +58,12 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
21 changes: 21 additions & 0 deletions addon/components/nrg-side-by-side/loading.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<NrgSideBySide class={{@class}} ...attributes>
<:primary>
<div class="ui basic segment">
<NrgLoadingIndicator
@loading={{@loading}}
@centered={{@centered}}
@inline={{@inline}}
@text={{@text}}
@inverted={{@inverted}}
@indeterminate={{@indeterminate}}
@size={{@size}}
>
{{yield to="text"}}
</NrgLoadingIndicator>
</div>
{{yield to="primary"}}
</:primary>
<:secondary>
{{yield to="secondary"}}
</:secondary>
</NrgSideBySide>
5 changes: 5 additions & 0 deletions addon/components/nrg-side-by-side/loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Component from '@glimmer/component';
import { AddNrgDeprecations } from 'ember-nrg-ui/utils/deprecation-handler';

@AddNrgDeprecations()
export default class NrgSideBySideLoadingComponent extends Component {}
1 change: 1 addition & 0 deletions app/components/nrg-side-by-side/loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'ember-nrg-ui/components/nrg-side-by-side/loading';
Loading

0 comments on commit 747baf9

Please sign in to comment.