Skip to content

Commit

Permalink
Merge branch 'master' into jmfrancois/chore/ds-no-reakit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois authored Oct 10, 2023
2 parents 074d60b + cd04f75 commit 0432b1c
Show file tree
Hide file tree
Showing 32 changed files with 324 additions and 118 deletions.
6 changes: 0 additions & 6 deletions .changeset/silent-boxes-pretend.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/twelve-pears-admire.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup nodejs'
description: 'Setup nodejs'
author: 'Talend'
secrets:
NPM_TOKEN:
description: 'The NPM token to use'
runs:
using: 'composite'
steps:
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
scope: '@talend'

- name: Install yarn
shell: bash
run: npm i -g yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
11 changes: 3 additions & 8 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"

- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Install Dependencies
run: yarn --frozen-lockfile

Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Upgrade dependencies
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/design-system-component-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
- name: Use Node.js
uses: ./.github/actions/setup-node

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
cache: "yarn"

uses: ./.github/actions/setup-node

- name: Download icons
run: npx @talend/figma-icons-downloader
env:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ jobs:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"

uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile --ignore-scripts

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/pr-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node


- name: Install and build playground
id: build
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/surge-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
environment: pull_request_unsafe

steps:
- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18

- name: Push to surge
run: npx surge teardown ${{ github.event.pull_request.number }}.talend.surge.sh --token ${{ secrets.SURGE_TOKEN }}
- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Push to surge
run: npx surge teardown ${{ github.event.pull_request.number }}.talend.surge.sh --token ${{ secrets.SURGE_TOKEN }}
7 changes: 1 addition & 6 deletions .github/workflows/tests-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Install and tests
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/visual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
cache: "yarn"
- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Install dependencies
run: yarn --frozen-lock
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/yarn-deduplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ jobs:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: yarn-deduplicate
id: deduplicate
Expand Down
11 changes: 11 additions & 0 deletions fork/bootstrap-sass/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 3.5.0

### Minor Changes

- 9d137cb98: \* 275e7da72 2023-08-03 feat(TDOPS-4875): use elevation tokens (#4821)
- bfc02c4fb 2023-07-24 feat(ARCH-720): use design-tokens for colors (#4779)
- c18aabb97 2023-01-12 feat(ARCH-662/scripts-core): move to ESM and remove presets (#4531)
- aa5223cf3 2021-12-20 chore(ARCH-404/CI): decrease time needed (#3564)
- 4842bffc2 2021-11-02 chore: wake up the playground to test UMDs (#3428)
- 667cd0a50 2021-10-05 chore: upgrade dependencies (#3459)

## 3.4.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion fork/bootstrap-sass/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@talend/bootstrap-sass",
"version": "3.4.8",
"version": "3.5.0",
"description": "bootstrap-sass is a Sass-powered version of Bootstrap 3, ready to drop right into your Sass powered applications.",
"main": "assets/javascripts/bootstrap.js",
"style": "assets/stylesheets/_bootstrap.scss",
Expand Down
8 changes: 8 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @talend/react-components

## 11.4.4

### Patch Changes

- 1cb4b7b29: fix(TFD-16296): Add ellipsis on collapsible panel header
- Updated dependencies [9d137cb98]
- @talend/bootstrap-theme@8.2.0

## 11.4.3

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"@talend/bootstrap-theme": "^8.1.3",
"@talend/bootstrap-theme": "^8.2.0",
"@talend/design-tokens": "^2.9.0",
"@talend/react-a11y": "^1.1.0",
"@talend/icons": "^6.60.1",
Expand Down Expand Up @@ -69,13 +69,13 @@
},
"devDependencies": {
"@storybook/addon-actions": "^7.4.1",
"@talend/bootstrap-theme": "^8.1.3",
"@talend/bootstrap-theme": "^8.2.0",
"@talend/design-system": "^7.15.1",
"@talend/icons": "^6.60.1",
"@talend/locales-design-system": "^7.3.0",
"@talend/locales-tui-components": "^9.5.0",
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-react-webpack": "^16.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
Expand Down Expand Up @@ -113,5 +113,5 @@
"publishConfig": {
"access": "public"
},
"version": "11.4.3"
"version": "11.4.4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ $tc-collapsible-panel-padding-larger: $padding-larger !default;
display: flex;
align-items: center;
justify-content: space-between;
min-width: 0; // trick to avoid conflict between flex and overflow

> * {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ export const Header = () => (
<div className="col-lg-offset-1 col-lg-10">
<h1>Collapsible Panel Headers</h1>
<CollapsiblePanel id="panel-header-1" header={[{ label: 'Simple header' }]} />
<CollapsiblePanel
id="panel-header-1"
header={[
{
label:
'Simple header with a very very very very long label that should not completly appear and not push other element outside the headerSimple header with a very very very very long label that should not completly appear and not push other element outside the header',
},
buttonDownload,
]}
>
Panel content
</CollapsiblePanel>
<CollapsiblePanel
id="panel-header-2"
header={[{ label: 'Header with actions' }, { element }]}
Expand Down
6 changes: 6 additions & 0 deletions packages/http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @talend/http

## 2.4.0

### Minor Changes

- 72a8f20dc: feat(TDP-12106): improve interceptors to return a promise, have access to request and a business context from caller

## 2.3.0

### Minor Changes
Expand Down
37 changes: 37 additions & 0 deletions packages/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,40 @@ async function test() {
const response = await http.get('/api/v1/my-resource');
}
```

## Interceptors

You can add global response interceptors to catch or modify responses before resolve.

```es6
import { addHttpResponseInterceptor, http, HTTP_METHODS } from '@talend/http';
import type { TalendRequest } from '@talend/http';

addHttpResponseInterceptor('my-interceptor', async (response: Response, request: TalendRequest) => {
if (request.method === HTTP_METHODS.GET) {
// your custom logic here
}

return response;
});
```

You can add multiple interceptors. Each will be called in the order of registration and will receive the same request parameter, but response parameter will be the one returned by previous interceptor. If interceptor returns void, then it'll return received response.

Once your interceptor is not needed anymore, you can unregister it with `removeHttpResponseInterceptor` function of `@talend/http` package.

You can identify some requests in interceptor by using `context` property in fetch function config:

```es6
import { addHttpResponseInterceptor, http, HTTP_METHODS } from '@talend/http';

http.get('/api/v1/data', { context: { intercept: true } });

addHttpResponseInterceptor('my-interceptor', async (response: Response, request: TalendRequest) => {
const { context } = request;
if (request.method === HTTP_METHODS.GET && context.intercept) {
// your custom logic here
}
return response;
});
```
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@talend/http",
"version": "2.3.0",
"version": "2.4.0",
"description": "HTTP helper",
"license": "Apache-2.0",
"repository": {
Expand Down
Loading

0 comments on commit 0432b1c

Please sign in to comment.