Skip to content

Commit

Permalink
Merge branch 'fix/tree-set-values-not-updating-the-parent-item' of ht…
Browse files Browse the repository at this point in the history
…tps://github.com/Refinitiv/refinitiv-ui into fix/tree-set-values-not-updating-the-parent-item
  • Loading branch information
Sarin Udompanish committed Oct 21, 2022
2 parents 992ca9f + fd2c311 commit 0fcc124
Show file tree
Hide file tree
Showing 21 changed files with 235 additions and 64 deletions.
11 changes: 11 additions & 0 deletions .github/actions/run-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
description: 'Run test in all packages or only affected packages'
required: false
default: 'affected' # affected|all
target:
description: 'Run test on the package/element'
required: false
default: ''
coverage:
description: 'Include test coverage'
required: false
Expand Down Expand Up @@ -68,13 +72,20 @@ runs:
echo "Updated"
- name: Test
if: ${{ inputs.target == '' || inputs.target == 'all' }}
shell: bash
# Prevent NX caching for mode `all` because it must run all testing, even though the code has not changed.
run: |
[[ "${{ inputs.mode }}" == "affected" ]] && export OPTIONS="--base=${{ inputs.base }}"
[[ "${{ inputs.mode }}" == "all" ]] && export OPTIONS="--skip-nx-cache"
npm run test:${{ inputs.mode }} -- $OPTIONS --parallel=${{ inputs.parallel }} ${{ env.BROWSERS_OPTION }} --includeCoverage ${{ inputs.coverage }} --output minimal
- name: Test Package or Element
if: ${{ inputs.target != '' }}
shell: bash
run: |
npm run test ${{ inputs.target }} -- ${{ env.BROWSERS_OPTION }} --includeCoverage ${{ inputs.coverage }}
- name: BrowserStackLocal Stop # Terminating the BrowserStackLocal tunnel connection
if: ${{ inputs.browserstack == 'true' }}
uses: browserstack/github-actions/setup-local@master
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
node-version: 16.x

- name: Setup caching dependencies
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-npm
with:
path: |
Expand All @@ -29,7 +29,7 @@ runs:
restore-keys: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}

- name: Setup caching build
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-build
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
177 changes: 177 additions & 0 deletions .github/workflows/test_browserstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Test BrowserStack

on:
workflow_dispatch:
inputs:
browsers:
description: 'Browsers'
required: true
type: choice
options:
# Alias browser groups
- default
- supported
# Desktop browsers
- chrome
- firefox
- safari
- edge
# Mobile browsers
- ios
- android
- samsung
# Previous version
- chrome_previous
- firefox_previous
- safari_previous
- edge_previous
- ios_previous
- android_previous
- samsung_previous
target:
description: 'Packages/Elements'
required: true
type: choice
options:
# Packages
- all
- core
- demo-block
- elements
- i18n
- phrasebook
- test-helpers
- translate
# Elements
- accordion
- appstate-bar
- autosuggest
- button
- button-bar
- calendar
- canvas
- card
- chart
- checkbox
- clock
- collapse
- color-dialog
- color-picker
- combo-box
- counter
- datetime-field
- datetime-picker
- dialog
- email-field
- flag
- header
- heatmap
- icon
- interactive-chart
- item
- label
- layout
- led-gauge
- list
- loader
- multi-input
- notification
- number-field
- overlay
- overlay-menu
- pagination
- panel
- password-field
- pill
- progress-bar
- radio-button
- rating
- search-field
- select
- sidebar-layout
- slider
- sparkline
- swing-gauge
- tab
- tab-bar
- text-field
- time-picker
- toggle
- tooltip
- tornado-chart
- tree
- tree-select

env:
TARGET: ${{ inputs.target }}
BROWSERS: ${{ inputs.browsers }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_BUILD: "Test BrowserStack ${{ github.run_number }}"

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Test Input
shell: bash
run: |
echo "TARGET1: $TARGET"
echo "TARGET2: ${{ env.TARGET }}"
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Setup resources and environment
uses: ./.github/actions/setup
id: setup

- name: Install Dependencies
if: steps.setup.outputs.cache-dependencies-hit != 'true'
run: npm ci --ignore-scripts --audit=false --fund=false

- name: Reset NX # temporary
run: npm run reset

- name: Build
if: steps.setup.outputs.cache-build-hit != 'true'
run: npm run build

lint:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup resources and environment
uses: ./.github/actions/setup

- name: Lint
run: npm run lint:affected -- --base=$BASE_SHA

test:
needs: lint
name: "Test ${{ github.event.inputs.target }} / ${{ github.event.inputs.browsers }} browser"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Test on BrowserStack"
uses: ./.github/actions/run-test
with:
browsers: ${{ env.BROWSERS }}
target: ${{ env.TARGET }}
mode: 'all'
browserstack: 'true'
username: ${{ env.BROWSERSTACK_USERNAME }}
access-key: ${{ env.BROWSERSTACK_ACCESS_KEY }}
parallel: 3
4 changes: 2 additions & 2 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
16 changes: 13 additions & 3 deletions browsers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const BrowserStack = {
'default', // default browsers alias
'supported', // supported browsers alias
'ios',
'android'
'android',
'samsung',
'ios_previous',
'android_previous',
'samsung_previous'
]
};
// Copy supported browsers to available browsers
Expand Down Expand Up @@ -57,8 +61,14 @@ BrowserStack.config = {
safari_previous: { ...defaultOSX, browser: 'safari', os_version: 'Big Sur' },

// Mobile Devices
ios: { ...defaultDevice, device : 'iPhone 13', os: 'ios', os_version : '15.0' },
android: { ...defaultDevice, device : 'Google Pixel 6', os: 'android', os_version : '12.0' }
ios: { ...defaultDevice, browser: 'iphone', device : 'iPhone 14', os: 'ios', os_version : '16' },
android: { ...defaultDevice, browser: 'android', device : 'Google Pixel 6', os: 'android', os_version : '12.0' },
samsung: { ...defaultDevice, browser: 'samsung', device : 'Samsung Galaxy S22', os: 'android', os_version : '12.0' },

// Mobile Devices Previous versions
ios_previous: { ...defaultDevice, browser: 'iphone', device : 'iPhone 13', os: 'ios', os_version : '15' },
android_previous: { ...defaultDevice, browser: 'android', device : 'Google Pixel 5', os: 'android', os_version : '11.0' },
samsung_previous: { ...defaultDevice, browser: 'samsung', device : 'Samsung Galaxy S21', os: 'android', os_version : '11.0' }
};

module.exports = {
Expand Down
18 changes: 1 addition & 17 deletions documents/src/pages/build-app/framework-integration/angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,7 @@ import '@refinitiv-ui/elements/panel/themes/halo/dark';
import '@refinitiv-ui/elements/text-field/themes/halo/dark';
import '@refinitiv-ui/elements/password-field/themes/halo/dark';
```

If you're using Angular 13++ or using Webpack 5, you can import module by using a shorter path.

```javascript
import '@refinitiv-ui/elements/loader';
import '@refinitiv-ui/elements/button';
import '@refinitiv-ui/elements/panel';
import '@refinitiv-ui/elements/text-field';
import '@refinitiv-ui/elements/password-field';

import '@refinitiv-ui/halo-theme/dark/imports/native-elements';
import '@refinitiv-ui/elements/loader/themes/halo/dark';
import '@refinitiv-ui/elements/button/themes/halo/dark';
import '@refinitiv-ui/elements/panel/themes/halo/dark';
import '@refinitiv-ui/elements/text-field/themes/halo/dark';
import '@refinitiv-ui/elements/password-field/themes/halo/dark';
```
If you're using webpack 4, you can set path aliases in `webpack.config.js` similar to [Vanilla](./tutorials/vanilla-js#webpack-4).

At this stage EF elements should be ready to use!. You can use them like any other native HTML elements.

Expand Down
Loading

0 comments on commit 0fcc124

Please sign in to comment.