From 99577163bee52a60f8a40985b9e7a7acd250012b Mon Sep 17 00:00:00 2001 From: Mathieu Huchet Date: Mon, 11 Mar 2024 17:43:31 +0100 Subject: [PATCH 1/4] chore: Remove ally.js --- packages/components/package.json | 1 - packages/components/src/Badge/Badge.module.scss | 4 ++-- .../src/Enumeration/Items/Item/Item.module.scss | 4 ++-- .../src/Enumeration/Items/Items.module.scss | 2 +- .../ColumnChooser/ColumnChooser.module.scss | 2 +- packages/components/src/Status/Status.module.scss | 2 +- packages/components/src/Status/index.js | 1 - .../CellTitle/CellTitle.module.scss | 12 ++++++------ .../src/VirtualizedList/CellTitle/index.js | 1 - .../ListTable/ListTable.module.scss | 2 +- .../RowSelection/RowSelection.module.scss | 8 ++++---- packages/components/src/polyfills/focus-within.js | 3 --- packages/forms/package.json | 1 - tools/scripts-config-jest/package.json | 4 ---- tools/scripts-config-jest/test-setup.js | 6 ------ versions/dependencies.json | 1 - yarn.lock | 15 +-------------- 17 files changed, 19 insertions(+), 50 deletions(-) delete mode 100644 packages/components/src/polyfills/focus-within.js diff --git a/packages/components/package.json b/packages/components/package.json index bcd81b7faff..d17521e1ba7 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -42,7 +42,6 @@ "@talend/react-a11y": "^3.0.1", "@talend/react-bootstrap": "^2.2.2", "@talend/utils": "^3.0.4", - "ally.js": "^1.4.1", "classnames": "^2.5.1", "d3": "^7.8.5", "date-fns": "^3.3.1", diff --git a/packages/components/src/Badge/Badge.module.scss b/packages/components/src/Badge/Badge.module.scss index a358c4056c2..189a56fc50a 100644 --- a/packages/components/src/Badge/Badge.module.scss +++ b/packages/components/src/Badge/Badge.module.scss @@ -154,7 +154,7 @@ $tc-badge-disabled-opacity: 0.62; &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { outline: none; } } @@ -356,7 +356,7 @@ $tc-badge-disabled-opacity: 0.62; &-dropdown { .tc-badge-button { &:not(.tc-badge-disabled) { - &:global(.ally-focus-within) { + &:focus-within { border-color: tokens.$coral-color-accent-border; } } diff --git a/packages/components/src/Enumeration/Items/Item/Item.module.scss b/packages/components/src/Enumeration/Items/Item/Item.module.scss index 9b13876c4ff..21dfe239eb8 100644 --- a/packages/components/src/Enumeration/Items/Item/Item.module.scss +++ b/packages/components/src/Enumeration/Items/Item/Item.module.scss @@ -118,7 +118,7 @@ $item-checkbox-width: 20px; } .tc-enumeration-item:hover, -.tc-enumeration-item:global(.ally-focus-within) { +.tc-enumeration-item:focus-within { .tc-enumeration-item-actions { visibility: visible; } @@ -126,6 +126,6 @@ $item-checkbox-width: 20px; // disable hover if item is selected .tc-enumeration-item:hover:not(.selected-item), -.tc-enumeration-item:not(.selected-item):global(.ally-focus-within) { +.tc-enumeration-item:not(.selected-item):focus-within { background-color: tokens.$coral-color-neutral-background-medium; } diff --git a/packages/components/src/Enumeration/Items/Items.module.scss b/packages/components/src/Enumeration/Items/Items.module.scss index 899d33ca72d..11cb8438d89 100644 --- a/packages/components/src/Enumeration/Items/Items.module.scss +++ b/packages/components/src/Enumeration/Items/Items.module.scss @@ -15,7 +15,7 @@ $tc-enumeration-height: 40vh !default; [role='row']:first-child { &:hover, - &:global(.ally-focus-within) { + &:focus-within { box-shadow: inset 0 21px 3px -20px $shadow; } } diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss index 85a76b77b27..6c194ca44de 100644 --- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss +++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss @@ -52,7 +52,7 @@ $tc-height: 2.5rem; border-bottom: $tc-popover-border-width solid tokens.$coral-color-neutral-border-weak; } - &:global(.ally-focus-within), + &:focus-within, &:hover { background: tokens.$coral-color-neutral-background-medium; } diff --git a/packages/components/src/Status/Status.module.scss b/packages/components/src/Status/Status.module.scss index 923bd97383a..dd534857d92 100644 --- a/packages/components/src/Status/Status.module.scss +++ b/packages/components/src/Status/Status.module.scss @@ -72,7 +72,7 @@ $tc-status-space-btn-icon-label: 5px !default; } &.action:hover, - &.action:global(.ally-focus-within) { + &.action:focus-within { .tc-status-icon, .tc-status-label { opacity: 0; diff --git a/packages/components/src/Status/index.js b/packages/components/src/Status/index.js index 6460c6f6541..e72ad284296 100644 --- a/packages/components/src/Status/index.js +++ b/packages/components/src/Status/index.js @@ -1,4 +1,3 @@ -import '../polyfills/focus-within'; import { Status } from './Status.component'; export default Status; diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss b/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss index 2eebe92d2cd..c87de2dddac 100644 --- a/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss +++ b/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss @@ -68,7 +68,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; .tc-list-title-filter { &:not(.tc-list-title-disabled) { &:hover, - &:global(.ally-focus-within) { + &:focus-within { .icon { color: tokens.$coral-color-accent-text; filter: none; @@ -86,7 +86,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { opacity: 1; width: 100%; @@ -100,7 +100,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row.active) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { // background: linear-gradient(90deg, tokens.$coral-color-neutral-background, tokens.$coral-color-accent-background $padding-large); } @@ -111,7 +111,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row.selected) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { // background: linear-gradient(90deg, tokens.$coral-color-neutral-background, tokens.$coral-color-accent-background $padding-large); } @@ -125,7 +125,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { overflow: visible !important; :global(.tc-list-title-cell), @@ -138,7 +138,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { /* avoid scrolling over x axis */ width: auto !important; right: 0 !important; diff --git a/packages/components/src/VirtualizedList/CellTitle/index.js b/packages/components/src/VirtualizedList/CellTitle/index.js index d952c1c822a..17ea41751dd 100644 --- a/packages/components/src/VirtualizedList/CellTitle/index.js +++ b/packages/components/src/VirtualizedList/CellTitle/index.js @@ -1,4 +1,3 @@ -import '../../polyfills/focus-within'; import TitleColumn, { cellType, titleColumnConfiguration } from './TitleColumn.component'; export { cellType, TitleColumn }; diff --git a/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss b/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss index 253e0644c02..35cc5fdd741 100644 --- a/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss +++ b/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss @@ -21,7 +21,7 @@ $tc-list-table-cell-padding: $padding-small !default; &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background-color: tokens.$coral-color-neutral-background-medium; .cell { diff --git a/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss b/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss index 5aaec997f5d..1d7df26836c 100644 --- a/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss +++ b/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss @@ -7,7 +7,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -17,7 +17,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -35,7 +35,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -45,7 +45,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } diff --git a/packages/components/src/polyfills/focus-within.js b/packages/components/src/polyfills/focus-within.js deleted file mode 100644 index 5e7b61ca231..00000000000 --- a/packages/components/src/polyfills/focus-within.js +++ /dev/null @@ -1,3 +0,0 @@ -import ally from 'ally.js'; - -setTimeout(ally.style.focusWithin); diff --git a/packages/forms/package.json b/packages/forms/package.json index 574805458de..595ce9fbb98 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -70,7 +70,6 @@ "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", - "ally.js": "^1.4.1", "i18next": "^23.10.0", "i18next-scanner-typescript": "^1.2.0", "jest-in-case": "^1.0.2", diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index a1067a67708..a018e83ecce 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -36,7 +36,6 @@ }, "peerDependencies": { "@talend/design-system": ">= 8.1.0", - "ally.js": ">= 1.4.1", "i18next": ">= 23.5.1", "classnames": ">= 2.3.2", "jest-axe": ">= 8.0.0", @@ -48,9 +47,6 @@ "@talend/design-system": { "optional": true }, - "ally.js": { - "optional": true - }, "classnames": { "optional": true }, diff --git a/tools/scripts-config-jest/test-setup.js b/tools/scripts-config-jest/test-setup.js index a69f837392c..1bee61ecb9e 100644 --- a/tools/scripts-config-jest/test-setup.js +++ b/tools/scripts-config-jest/test-setup.js @@ -36,12 +36,6 @@ try { warnMessageOptionalDep('jest-axe'); } -try { - jest.mock('ally.js'); -} catch (e) { - warnMessageOptionalDep('ally.js'); -} - // add missing ResizeObserver class ResizeObserver { observe() { diff --git a/versions/dependencies.json b/versions/dependencies.json index 08048d0c9c1..541e20e8fd9 100644 --- a/versions/dependencies.json +++ b/versions/dependencies.json @@ -3,7 +3,6 @@ "angular": "^1.5.9", "ag-grid-community": "^24.0.0", "ag-grid-react": "^24.0.0", - "ally.js": "^1.4.1", "babel-polyfill": "^6.26.0", "popper.js": "1.16.1", "ag-grid": "^24.0.0", diff --git a/yarn.lock b/yarn.lock index c579be40d56..893cb1af96e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5709,14 +5709,6 @@ all-contributors-cli@^6.26.1: optionalDependencies: prettier "^2" -ally.js@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/ally.js/-/ally.js-1.4.1.tgz#9fb7e6ba58efac4ee9131cb29aa9ee3b540bcf1e" - integrity sha512-ZewdfuwP6VewtMN36QY0gmiyvBfMnmEaNwbVu2nTS6zRt069viTgkYgaDiqu6vRJ1VJCriNqV0jGMu44R8zNbA== - dependencies: - css.escape "^1.5.0" - platform "1.3.3" - ansi-colors@^4.1.1, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -7664,7 +7656,7 @@ css-what@^6.0.1, css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -css.escape@^1.5.0, css.escape@^1.5.1: +css.escape@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== @@ -14741,11 +14733,6 @@ pkg-dir@^7.0.0: dependencies: find-up "^6.3.0" -platform@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.3.tgz#646c77011899870b6a0903e75e997e8e51da7461" - integrity sha512-VJK1SRmXBpjwsB4YOHYSturx48rLKMzHgCqDH2ZDa6ZbMS/N5huoNqyQdK5Fj/xayu3fqbXckn5SeCS1EbMDZg== - polished@^4.2.2: version "4.3.1" resolved "https://registry.yarnpkg.com/polished/-/polished-4.3.1.tgz#5a00ae32715609f83d89f6f31d0f0261c6170548" From 28d6acd708b3dd9eebbe8400406bde7f75e3198d Mon Sep 17 00:00:00 2001 From: Mathieu Huchet Date: Mon, 15 Apr 2024 14:55:47 +0200 Subject: [PATCH 2/4] clean cdn stuff --- fork/module-to-cdn/meta/ally.js/meta.json | 48 ----------------------- fork/module-to-cdn/modules.json | 9 ----- packages/theme/src/theme/_forms.scss | 2 +- 3 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 fork/module-to-cdn/meta/ally.js/meta.json diff --git a/fork/module-to-cdn/meta/ally.js/meta.json b/fork/module-to-cdn/meta/ally.js/meta.json deleted file mode 100644 index 9b9c7264bb6..00000000000 --- a/fork/module-to-cdn/meta/ally.js/meta.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "https://unpkg.com/ally.js@1.0.0/ally.min.js": { - "integrity": "sha384-+mBUGQ8QnpJ7E9fGbU/Nh3YVdEPA69pO+S4MK+nZpt06JrEn7ZTrAxbK/rqTPFCr", - "lastModified": "Wed, 18 Nov 2015 13:05:03 GMT", - "size": 81396 - }, - "https://unpkg.com/ally.js@1.0.1/ally.min.js": { - "integrity": "sha384-h20t/6Ijz0cRf/7MRBDuSZBrqmY3y43kegW2OxHdAw1ax3wBga7m6XLuw2MNNRqv", - "lastModified": "Fri, 20 Nov 2015 10:02:53 GMT", - "size": 81396 - }, - "https://unpkg.com/ally.js@1.1.0/ally.min.js": { - "integrity": "sha384-Dx/ITyyGOtuw2IWZFJwzkSUGe/wGeP9Isez9tC5cvMIp1rhFC5yutmd8OBqYq8zU", - "lastModified": "Thu, 17 Mar 2016 21:22:24 GMT", - "size": 128808 - }, - "https://unpkg.com/ally.js@1.1.1/ally.min.js": { - "integrity": "sha384-NOvyABFluikhoa8DE0CmJAsycIv2T2c/vcW9BAK+Wi7Mdq2kCTVC4aB/s8YzyWB1", - "lastModified": "Sat, 06 Aug 2016 11:13:39 GMT", - "size": 129064 - }, - "https://unpkg.com/ally.js@1.2.0/ally.min.js": { - "integrity": "sha384-hVodXuZGT5mru6W2Q5Rf7gvvYC1f3hszKeH9dlOdWc0PyF/Z5tF1mlhpOmYb9urX", - "lastModified": "Tue, 23 Aug 2016 17:12:46 GMT", - "size": 126596 - }, - "https://unpkg.com/ally.js@1.3.0/ally.min.js": { - "integrity": "sha384-4P7H3L5vog2MJJzWBeWIcNCCzx1HLw7jKSRt8MTHasFotI4v5m0jWRS7tprfOV94", - "lastModified": "Sat, 17 Sep 2016 14:33:49 GMT", - "size": 74367 - }, - "https://unpkg.com/ally.js@1.3.1/ally.min.js": {}, - "https://unpkg.com/ally.js@1.3.2/ally.min.js": { - "integrity": "sha384-ncIGDAncV3rUAkomDSl/6FkTIHCIFDZKl+Q6tG4LE4B/Hwd8OE5zoSjcBximJl8H", - "lastModified": "Tue, 15 Nov 2016 15:01:57 GMT", - "size": 75248 - }, - "https://unpkg.com/ally.js@1.4.0/ally.min.js": { - "integrity": "sha384-Y4Gq0IAVeAD2NQF8FxeVd1J7O0RgGA8Z/O+sHakN4b1h1EFN5p+SD80/vrMNfdly", - "lastModified": "Thu, 12 Jan 2017 21:55:03 GMT", - "size": 77497 - }, - "https://unpkg.com/ally.js@1.4.1/ally.min.js": { - "integrity": "sha384-4tafTflqhz9+1XxuLkwXUSVJwcvdeh2fYCsnGB+P9eMHX+XDG87+zYEIF1GlJ5H1", - "lastModified": "Tue, 31 Jan 2017 18:12:06 GMT", - "size": 76942 - } -} \ No newline at end of file diff --git a/fork/module-to-cdn/modules.json b/fork/module-to-cdn/modules.json index e143a31c60a..bf8fbf2b718 100644 --- a/fork/module-to-cdn/modules.json +++ b/fork/module-to-cdn/modules.json @@ -221,15 +221,6 @@ } } }, - "ally.js": { - "var": "ally", - "versions": { - ">= 1.0.0": { - "development": "/ally.min.js", - "production": "/ally.min.js" - } - } - }, "angular": { "var": "angular", "versions": { diff --git a/packages/theme/src/theme/_forms.scss b/packages/theme/src/theme/_forms.scss index b9437070dfe..ff59e10b41a 100644 --- a/packages/theme/src/theme/_forms.scss +++ b/packages/theme/src/theme/_forms.scss @@ -141,7 +141,7 @@ .radio-inline, .checkbox, .checkbox-inline { - &.ally-focus-within label { + &:focus-within label { outline: none; } } From bdb4fed7c2c0596be39b6fb41d3a2c4783c992f3 Mon Sep 17 00:00:00 2001 From: Mathieu Huchet Date: Mon, 29 Jul 2024 10:57:00 +0200 Subject: [PATCH 3/4] put back cdn config for compat --- fork/module-to-cdn/modules.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fork/module-to-cdn/modules.json b/fork/module-to-cdn/modules.json index efd03dd7dd0..0f38e9c82d7 100644 --- a/fork/module-to-cdn/modules.json +++ b/fork/module-to-cdn/modules.json @@ -225,6 +225,15 @@ } } }, + "ally.js": { + "var": "ally", + "versions": { + ">= 1.0.0": { + "development": "/ally.min.js", + "production": "/ally.min.js" + } + } + }, "angular": { "var": "angular", "versions": { From 8cb5fc9588c18a51318af61c5ac82ba0603c8ce6 Mon Sep 17 00:00:00 2001 From: Mathieu Huchet Date: Mon, 29 Jul 2024 11:48:25 +0200 Subject: [PATCH 4/4] changeset --- .changeset/light-chicken-dress.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changeset/light-chicken-dress.md diff --git a/.changeset/light-chicken-dress.md b/.changeset/light-chicken-dress.md new file mode 100644 index 00000000000..8a668ee404c --- /dev/null +++ b/.changeset/light-chicken-dress.md @@ -0,0 +1,9 @@ +--- +'@talend/scripts-config-jest': minor +'@talend/react-components': minor +'@talend/module-to-cdn': minor +'@talend/react-forms': minor +'@talend/bootstrap-theme': minor +--- + +chore: Remove ally.js