From 5f0acd249e3fd6bc20a2ca82ee7a192adfa1ded2 Mon Sep 17 00:00:00 2001 From: Sebastien LE MOUILLOUR <32456736+smouillour@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:17:23 +0200 Subject: [PATCH 1/3] fix(eslint-config): ignorePattern only at root level for index.js (#5398) --- .changeset/strange-students-collect.md | 5 +++++ tools/scripts-config-eslint/.eslintrc.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/strange-students-collect.md diff --git a/.changeset/strange-students-collect.md b/.changeset/strange-students-collect.md new file mode 100644 index 00000000000..fda55e1a507 --- /dev/null +++ b/.changeset/strange-students-collect.md @@ -0,0 +1,5 @@ +--- +'@talend/eslint-config': patch +--- + +fix: ignorePattern only at root level for index.js diff --git a/tools/scripts-config-eslint/.eslintrc.json b/tools/scripts-config-eslint/.eslintrc.json index 4a92186602a..cb6e81924aa 100644 --- a/tools/scripts-config-eslint/.eslintrc.json +++ b/tools/scripts-config-eslint/.eslintrc.json @@ -122,5 +122,5 @@ } }, // Ignore some JS at project's rool level - "ignorePatterns": ["index.js", ".eslintrc.js"] + "ignorePatterns": ["./index.js", "./.eslintrc.js"] } From da838fe45da81e68d321634c4ca9ac64e4a6b20f Mon Sep 17 00:00:00 2001 From: Volodymyr Koval Date: Mon, 9 Sep 2024 11:32:23 +0300 Subject: [PATCH 2/3] fix(TMC-29799): highlighting selected item in side panel and opening link in new tab (#5397) * fix(TMC-29799): highlighting selected item in side panel and opening link in new tab * fix(TMC-29799): highlighting selected item in side panel and opening link in new tab * fix(TMC-29799): highlighting selected item in side panel and opening link in new tab --- .changeset/hot-kiwis-talk.md | 5 ++++ .../src/SidePanel/SidePanel.connect.js | 25 ++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .changeset/hot-kiwis-talk.md diff --git a/.changeset/hot-kiwis-talk.md b/.changeset/hot-kiwis-talk.md new file mode 100644 index 00000000000..309a9b36d42 --- /dev/null +++ b/.changeset/hot-kiwis-talk.md @@ -0,0 +1,5 @@ +--- +'@talend/react-containers': minor +--- + +fix(TMC-29799): highlighting selected item in side panel and opening link in new tab diff --git a/packages/containers/src/SidePanel/SidePanel.connect.js b/packages/containers/src/SidePanel/SidePanel.connect.js index ad4c5e1e8b6..fb668ba290a 100644 --- a/packages/containers/src/SidePanel/SidePanel.connect.js +++ b/packages/containers/src/SidePanel/SidePanel.connect.js @@ -1,7 +1,9 @@ import get from 'lodash/get'; + import cmf, { cmfConnect } from '@talend/react-cmf'; -import Container, { DEFAULT_STATE } from './SidePanel.container'; + import { ACTION_TYPE_LINK } from './constants'; +import Container, { DEFAULT_STATE } from './SidePanel.container'; const cache = {}; @@ -73,7 +75,13 @@ function getActionsWrapped(actions) { } function getSelectedAction(currentRoute, actions) { - const getFullPath = href => `${window.basename || ''}${href}`.replaceAll('//', '/'); + const getFullPath = href => { + if (!window.basename || window.basename === '/' || href.startsWith(window.basename)) { + return href; + } + + return `${window.basename || ''}${href}`.replaceAll('//', '/'); + }; return actions.find( action => action.href && isBasePathOf(getFullPath(action.href), currentRoute), ); @@ -123,9 +131,18 @@ function getAction(id, currentRoute, state) { */ function getActions(state, ownProps, currentRoute) { if (ownProps.actions) { - const cacheAction = getCache(ownProps.componentId, currentRoute, ownProps.actions); + let actions = ownProps.actions; + + if (window.basename && window.basename !== '/') { + actions = ownProps.actions.map(action => ({ + ...action, + href: `${window.basename}${action.href}`.replaceAll('//', '/'), + })); + } + + const cacheAction = getCache(ownProps.componentId, currentRoute, actions); if (!cacheAction.value) { - cacheAction.value = getActionsWrapped(ownProps.actions); + cacheAction.value = getActionsWrapped(actions); } return cacheAction.value; } else if (ownProps.actionIds) { From ec618b581bb5af00f8772ad897ad4b7b4285a67a Mon Sep 17 00:00:00 2001 From: Talend bot Date: Mon, 9 Sep 2024 11:00:31 +0200 Subject: [PATCH 3/3] chore: prepare release (#5399) Co-authored-by: github-actions[bot] --- .changeset/hot-kiwis-talk.md | 5 ----- .changeset/strange-students-collect.md | 5 ----- packages/containers/CHANGELOG.md | 6 ++++++ packages/containers/package.json | 4 ++-- tools/scripts-config-eslint/CHANGELOG.md | 6 ++++++ tools/scripts-config-eslint/package.json | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 .changeset/hot-kiwis-talk.md delete mode 100644 .changeset/strange-students-collect.md diff --git a/.changeset/hot-kiwis-talk.md b/.changeset/hot-kiwis-talk.md deleted file mode 100644 index 309a9b36d42..00000000000 --- a/.changeset/hot-kiwis-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@talend/react-containers': minor ---- - -fix(TMC-29799): highlighting selected item in side panel and opening link in new tab diff --git a/.changeset/strange-students-collect.md b/.changeset/strange-students-collect.md deleted file mode 100644 index fda55e1a507..00000000000 --- a/.changeset/strange-students-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@talend/eslint-config': patch ---- - -fix: ignorePattern only at root level for index.js diff --git a/packages/containers/CHANGELOG.md b/packages/containers/CHANGELOG.md index b5898e7811f..70a34e64653 100644 --- a/packages/containers/CHANGELOG.md +++ b/packages/containers/CHANGELOG.md @@ -1,5 +1,11 @@ # @talend/react-containers +## 11.2.0 + +### Minor Changes + +- da838fe: fix(TMC-29799): highlighting selected item in side panel and opening link in new tab + ## 11.1.0 ### Minor Changes diff --git a/packages/containers/package.json b/packages/containers/package.json index f53de7221b0..89bee0a69ce 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -67,7 +67,7 @@ "@talend/locales-tui-forms": "^10.2.4", "@talend/locales-design-system": "^7.15.1", "@talend/react-storybook-cmf": "^10.0.0", - "@talend/eslint-config": "^13.2.0", + "@talend/eslint-config": "^13.2.1", "@talend/eslint-plugin": "^1.3.1", "@talend/scripts-core": "^16.5.1", "@talend/scripts-config-babel": "^13.5.0", @@ -95,5 +95,5 @@ "publishConfig": { "access": "public" }, - "version": "11.1.0" + "version": "11.2.0" } diff --git a/tools/scripts-config-eslint/CHANGELOG.md b/tools/scripts-config-eslint/CHANGELOG.md index c111ec020a9..0ad0a27ada9 100644 --- a/tools/scripts-config-eslint/CHANGELOG.md +++ b/tools/scripts-config-eslint/CHANGELOG.md @@ -1,5 +1,11 @@ # @talend/scripts-config-eslint +## 13.2.1 + +### Patch Changes + +- 5f0acd2: fix: ignorePattern only at root level for index.js + ## 13.2.0 ### Minor Changes diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index 45171de386e..dcf5eb78777 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -1,7 +1,7 @@ { "name": "@talend/eslint-config", "description": "Eslint configuration for @talend/scripts-core", - "version": "13.2.0", + "version": "13.2.1", "license": "Apache-2.0", "main": "index.js", "author": "Talend Frontend ",