From 229206b14e28723c99c7ce2e09909496125a726d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Thu, 19 Dec 2019 15:18:06 -0500 Subject: [PATCH 01/17] use dash react 16.12 branch --- .circleci/config.yml | 6 +++--- demo/index.html | 4 ++-- package-lock.json | 22 +++++++++++----------- package.json | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e43219c5..70aef2a5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -110,7 +110,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -215,7 +215,7 @@ jobs: name: Install dependencies (dash) command: | . venv/bin/activate - git clone --depth 1 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ../.. diff --git a/demo/index.html b/demo/index.html index 613c17016..85bdad8de 100644 --- a/demo/index.html +++ b/demo/index.html @@ -5,8 +5,8 @@
- - + + diff --git a/package-lock.json b/package-lock.json index bfb777da7..4897340ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "dash-table", - "version": "4.5.0", + "version": "4.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -17164,9 +17164,9 @@ } }, "react": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.9.0.tgz", - "integrity": "sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==", + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz", + "integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -17430,15 +17430,15 @@ } }, "react-dom": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.9.0.tgz", - "integrity": "sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==", + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz", + "integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.15.0" + "scheduler": "^0.18.0" } }, "react-draggable": { @@ -18300,9 +18300,9 @@ "dev": true }, "scheduler": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.15.0.tgz", - "integrity": "sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz", + "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", diff --git a/package.json b/package.json index 783f675e3..c328f5502 100644 --- a/package.json +++ b/package.json @@ -98,9 +98,9 @@ "papaparse": "^5.1.0", "ramda": "^0.26.1", "raw-loader": "^3.1.0", - "react": "16.9.0", + "react": "16.12.0", "react-docgen": "^4.1.1", - "react-dom": "16.9.0", + "react-dom": "16.12.0", "react-select": "^1.3.0", "remarkable": "^2.0.0", "sheetclip": "^0.3.0", @@ -128,4 +128,4 @@ "node": ">=8.11.0", "npm": ">=6.1.0" } -} \ No newline at end of file +} From ff3a4ff18c9850f51dd753a13621e87409cfc093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Mon, 2 Mar 2020 16:30:02 -0500 Subject: [PATCH 02/17] new branch --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70aef2a5c..af6babdf4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -110,7 +110,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -215,7 +215,7 @@ jobs: name: Install dependencies (dash) command: | . venv/bin/activate - git clone --depth 1 -b exp-react-16.12 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ../.. From 1f0da30ac664dcea38989cea6ba45c7e93f64747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Mon, 2 Mar 2020 16:34:28 -0500 Subject: [PATCH 03/17] no exp- --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea61d14f1..ee13187bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ./../.. @@ -113,7 +113,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -219,7 +219,7 @@ jobs: name: Install dependencies (dash) command: | . venv/bin/activate - git clone --depth 1 -b exp-react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ../.. From f38bcc221005ba410ba7e4b2c172afdbcc326333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Tue, 3 Mar 2020 10:44:29 -0500 Subject: [PATCH 04/17] UNSAFE lifecycle methods --- src/core/components/IsolatedInput/index.tsx | 2 +- src/dash-table/components/CellInput/index.tsx | 2 +- src/dash-table/components/ControlledTable/index.tsx | 4 ++-- src/dash-table/components/Table/index.tsx | 2 +- src/dash-table/components/Tooltip/index.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/components/IsolatedInput/index.tsx b/src/core/components/IsolatedInput/index.tsx index c3280c8eb..45d574555 100644 --- a/src/core/components/IsolatedInput/index.tsx +++ b/src/core/components/IsolatedInput/index.tsx @@ -40,7 +40,7 @@ export default class IsolatedInput extends PureComponent { return this.props as PropsWithDefaults; } - componentWillReceiveProps(nextProps: IProps) { + UNSAFE_componentWillReceiveProps(nextProps: IProps) { const { value } = this.props; const { value: nextValue } = nextProps; diff --git a/src/dash-table/components/CellInput/index.tsx b/src/dash-table/components/CellInput/index.tsx index 5c02ab2e8..63f932915 100644 --- a/src/dash-table/components/CellInput/index.tsx +++ b/src/dash-table/components/CellInput/index.tsx @@ -97,7 +97,7 @@ export default class CellInput extends PureComponent { this.propagateChange(); } - componentWillReceiveProps(nextProps: ICellProps) { + UNSAFE_componentWillReceiveProps(nextProps: ICellProps) { const { value: nextValue } = nextProps; if (this.state.value !== nextValue) { diff --git a/src/dash-table/components/ControlledTable/index.tsx b/src/dash-table/components/ControlledTable/index.tsx index 67611e64d..fd0793464 100644 --- a/src/dash-table/components/ControlledTable/index.tsx +++ b/src/dash-table/components/ControlledTable/index.tsx @@ -132,7 +132,7 @@ export default class ControlledTable extends PureComponent this.handleResize(); } - componentWillMount() { + UNSAFE_componentWillMount() { // Fallback method for paste handling in Chrome // when no input element has focused inside the table window.addEventListener('resize', this.forceHandleResize); @@ -146,7 +146,7 @@ export default class ControlledTable extends PureComponent document.removeEventListener('paste', this.handlePaste); } - componentWillUpdate() { + UNSAFE_componentWillUpdate() { this.updateStylesheet(); } diff --git a/src/dash-table/components/Table/index.tsx b/src/dash-table/components/Table/index.tsx index 927fd3386..27b6bfae6 100644 --- a/src/dash-table/components/Table/index.tsx +++ b/src/dash-table/components/Table/index.tsx @@ -49,7 +49,7 @@ export default class Table extends Component { const { applyFocus: currentApplyFocus, workFilter: { map: currentMap, value } } = state; diff --git a/src/dash-table/components/Tooltip/index.tsx b/src/dash-table/components/Tooltip/index.tsx index c9e5e7ee5..0710efec9 100644 --- a/src/dash-table/components/Tooltip/index.tsx +++ b/src/dash-table/components/Tooltip/index.tsx @@ -41,7 +41,7 @@ export default class Tooltip extends PureComponent }; } - componentWillReceiveProps(nextProps: ITooltipProps) { + UNSAFE_componentWillReceiveProps(nextProps: ITooltipProps) { const { delay, duration } = nextProps.tooltip; if (isEqual( From 364200d76ef084a4ede613bf0bb720d7da5e5699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 4 Mar 2020 10:36:03 -0500 Subject: [PATCH 05/17] react 16.13 --- demo/index.html | 4 ++-- package-lock.json | 22 +++++++++++----------- package.json | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/demo/index.html b/demo/index.html index 85bdad8de..55aad84a5 100644 --- a/demo/index.html +++ b/demo/index.html @@ -5,8 +5,8 @@
- - + + diff --git a/package-lock.json b/package-lock.json index f0dd90d4e..39462095e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "dash-table", - "version": "4.5.1", + "version": "4.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -23699,9 +23699,9 @@ } }, "react": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz", - "integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.0.tgz", + "integrity": "sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -23979,15 +23979,15 @@ } }, "react-dom": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz", - "integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.0.tgz", + "integrity": "sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.18.0" + "scheduler": "^0.19.0" } }, "react-draggable": { @@ -25109,9 +25109,9 @@ "dev": true }, "scheduler": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz", - "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.0.tgz", + "integrity": "sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA==", "dev": true, "requires": { "loose-envify": "^1.1.0", diff --git a/package.json b/package.json index b2ab97811..b1d3bd499 100644 --- a/package.json +++ b/package.json @@ -86,9 +86,9 @@ "papaparse": "^5.1.1", "ramda": "^0.26.1", "raw-loader": "^3.1.0", - "react": "16.12.0", + "react": "16.13.0", "react-docgen": "^4.1.1", - "react-dom": "16.12.0", + "react-dom": "16.13.0", "react-select": "^1.3.0", "remarkable": "^2.0.0", "sheetclip": "^0.3.0", From 8c734a8f83934e7b85267895dd745a61f03d56d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 4 Mar 2020 13:58:58 -0500 Subject: [PATCH 06/17] react 16.12 --- package-lock.json | 20 ++++++++++---------- package.json | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39462095e..42d93ca1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23699,9 +23699,9 @@ } }, "react": { - "version": "16.13.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.0.tgz", - "integrity": "sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==", + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz", + "integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -23979,15 +23979,15 @@ } }, "react-dom": { - "version": "16.13.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.0.tgz", - "integrity": "sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==", + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz", + "integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.19.0" + "scheduler": "^0.18.0" } }, "react-draggable": { @@ -25109,9 +25109,9 @@ "dev": true }, "scheduler": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.0.tgz", - "integrity": "sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz", + "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", diff --git a/package.json b/package.json index b1d3bd499..b2ab97811 100644 --- a/package.json +++ b/package.json @@ -86,9 +86,9 @@ "papaparse": "^5.1.1", "ramda": "^0.26.1", "raw-loader": "^3.1.0", - "react": "16.13.0", + "react": "16.12.0", "react-docgen": "^4.1.1", - "react-dom": "16.13.0", + "react-dom": "16.12.0", "react-select": "^1.3.0", "remarkable": "^2.0.0", "sheetclip": "^0.3.0", From d58dd638f33e6e55fd2b0b9b72ec5de6eebb8eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 4 Mar 2020 15:07:23 -0500 Subject: [PATCH 07/17] react 16.12 --- demo/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/index.html b/demo/index.html index 55aad84a5..85bdad8de 100644 --- a/demo/index.html +++ b/demo/index.html @@ -5,8 +5,8 @@
- - + + From faa43de1b1fc659803e515b0b2fcde1c1cc8b076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Thu, 5 Mar 2020 18:57:04 -0500 Subject: [PATCH 08/17] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c769c228a..f2d9bde46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] +### Changed +- [#713](https://github.com/plotly/dash-table/pull/713) Update from React 16.8.6 to 16.13.0 + ## [4.6.1] - 2020-02-27 ### Added - [#711](https://github.com/plotly/dash-table/pull/711) Added R examples to package help From 36085a2b16bf6889def95d146ba0013b61063d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Thu, 5 Mar 2020 18:58:14 -0500 Subject: [PATCH 09/17] react 16.13 --- demo/index.html | 4 ++-- package-lock.json | 20 ++++++++++---------- package.json | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/demo/index.html b/demo/index.html index 85bdad8de..55aad84a5 100644 --- a/demo/index.html +++ b/demo/index.html @@ -5,8 +5,8 @@
- - + + diff --git a/package-lock.json b/package-lock.json index 42d93ca1d..39462095e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23699,9 +23699,9 @@ } }, "react": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz", - "integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.0.tgz", + "integrity": "sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -23979,15 +23979,15 @@ } }, "react-dom": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz", - "integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.0.tgz", + "integrity": "sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.18.0" + "scheduler": "^0.19.0" } }, "react-draggable": { @@ -25109,9 +25109,9 @@ "dev": true }, "scheduler": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz", - "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.0.tgz", + "integrity": "sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA==", "dev": true, "requires": { "loose-envify": "^1.1.0", diff --git a/package.json b/package.json index 6bd38eb5f..3113a9c67 100644 --- a/package.json +++ b/package.json @@ -86,9 +86,9 @@ "papaparse": "^5.1.1", "ramda": "^0.26.1", "raw-loader": "^3.1.0", - "react": "16.12.0", + "react": "16.13.0", "react-docgen": "^4.1.1", - "react-dom": "16.12.0", + "react-dom": "16.13.0", "react-select": "^1.3.0", "remarkable": "^2.0.0", "sheetclip": "^0.3.0", From 305e41415d7bbad9e63e42f48fcdcb920dbe1eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 12:49:22 -0500 Subject: [PATCH 10/17] update test to wait for table --- tests/integration/review_app/test_app_df_graph.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index a7de35c40..15862151d 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -7,10 +7,15 @@ import dash_core_components as dcc import dash_html_components as html import dash_table +import time + +from selenium.webdriver.common.by import By +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.wait import WebDriverWait ID_PREFIX = "app_data_updating_graph" IDS = {"table": ID_PREFIX, "container": "{}-container".format(ID_PREFIX)} - +_TIMEOUT = 10 def test_rapp002_df_graph(dash_duo): df = pd.read_csv( @@ -149,4 +154,12 @@ def update_graph(rows, selected_rows): dash_duo.start_server(app) dash_duo.wait_for_element("#waitfor") + + # Wait for table + WebDriverWait(dash_duo.driver, _TIMEOUT).until( + EC.presence_of_element_located( + (By.CSS_SELECTOR, "#{}".format(IDS["table"])) + ) + ) + dash_duo.percy_snapshot("rapp002 - loaded") From d186cdb31e81d9fdfa1b2f1f977d80668ac60d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 12:55:40 -0500 Subject: [PATCH 11/17] lint --- tests/integration/review_app/test_app_df_graph.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index 15862151d..6561a583a 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -17,6 +17,7 @@ IDS = {"table": ID_PREFIX, "container": "{}-container".format(ID_PREFIX)} _TIMEOUT = 10 + def test_rapp002_df_graph(dash_duo): df = pd.read_csv( os.path.realpath( @@ -157,9 +158,7 @@ def update_graph(rows, selected_rows): # Wait for table WebDriverWait(dash_duo.driver, _TIMEOUT).until( - EC.presence_of_element_located( - (By.CSS_SELECTOR, "#{}".format(IDS["table"])) - ) + EC.presence_of_element_located((By.CSS_SELECTOR, "#{}".format(IDS["table"]))) ) dash_duo.percy_snapshot("rapp002 - loaded") From 7bbfb923260e2c9c21c8d90d4a511a48e5d76c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 16:23:19 -0500 Subject: [PATCH 12/17] use fixture instead --- tests/integration/review_app/test_app_df_graph.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index 6561a583a..629394122 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -156,9 +156,6 @@ def update_graph(rows, selected_rows): dash_duo.start_server(app) dash_duo.wait_for_element("#waitfor") - # Wait for table - WebDriverWait(dash_duo.driver, _TIMEOUT).until( - EC.presence_of_element_located((By.CSS_SELECTOR, "#{}".format(IDS["table"]))) - ) + dash_duo.wait_for_element("#{}".format(IDS["TABLE"]) dash_duo.percy_snapshot("rapp002 - loaded") From deede662f22ec225fa16cdf3421a7fbe758a49bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 16:23:42 -0500 Subject: [PATCH 13/17] fixture --- tests/integration/review_app/test_app_df_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index 629394122..9c81babce 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -156,6 +156,6 @@ def update_graph(rows, selected_rows): dash_duo.start_server(app) dash_duo.wait_for_element("#waitfor") - dash_duo.wait_for_element("#{}".format(IDS["TABLE"]) + dash_duo.wait_for_element("#{}".format(IDS["table"]) dash_duo.percy_snapshot("rapp002 - loaded") From d87497b270957858a31b7734f54b332a9c9c85ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 16:27:32 -0500 Subject: [PATCH 14/17] typo... --- tests/integration/review_app/test_app_df_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index 9c81babce..e37aa6d92 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -156,6 +156,6 @@ def update_graph(rows, selected_rows): dash_duo.start_server(app) dash_duo.wait_for_element("#waitfor") - dash_duo.wait_for_element("#{}".format(IDS["table"]) + dash_duo.wait_for_element("#{}".format(IDS["table"])) dash_duo.percy_snapshot("rapp002 - loaded") From 76a94659715ed5c094f372f4f231038099cd6c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 16:52:21 -0500 Subject: [PATCH 15/17] use safe lifecycle methods --- .../components/ControlledTable/index.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/dash-table/components/ControlledTable/index.tsx b/src/dash-table/components/ControlledTable/index.tsx index fd0793464..c633c8e36 100644 --- a/src/dash-table/components/ControlledTable/index.tsx +++ b/src/dash-table/components/ControlledTable/index.tsx @@ -115,6 +115,12 @@ export default class ControlledTable extends PureComponent } componentDidMount() { + // Fallback method for paste handling in Chrome + // when no input element has focused inside the table + window.addEventListener('resize', this.forceHandleResize); + document.addEventListener('mousedown', this.handleClick); + document.addEventListener('paste', this.handlePaste); + const { active_cell, selected_cells, @@ -132,25 +138,14 @@ export default class ControlledTable extends PureComponent this.handleResize(); } - UNSAFE_componentWillMount() { - // Fallback method for paste handling in Chrome - // when no input element has focused inside the table - window.addEventListener('resize', this.forceHandleResize); - document.addEventListener('mousedown', this.handleClick); - document.addEventListener('paste', this.handlePaste); - } - componentWillUnmount() { window.removeEventListener('resize', this.forceHandleResize); document.removeEventListener('mousedown', this.handleClick); document.removeEventListener('paste', this.handlePaste); } - UNSAFE_componentWillUpdate() { - this.updateStylesheet(); - } - componentDidUpdate() { + this.updateStylesheet(); this.applyStyle(); this.handleResize(); this.handleDropdown(); From a77b1592c1caef144be2a64f380a05e3e5291c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Fri, 6 Mar 2020 17:14:13 -0500 Subject: [PATCH 16/17] format/lint --- .flake8 | 2 +- package.json | 2 +- .../review_app/test_app_df_backend_paging.py | 12 ++++++------ tests/integration/review_app/test_app_df_graph.py | 5 ----- tests/selenium/test_markdown_copy_paste.py | 2 +- tests/selenium/test_pagination.py | 9 +-------- tests/unit/format_test.py | 6 +++--- 7 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.flake8 b/.flake8 index f994d595b..25750c831 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -ignore = E203, E266, E501, E731, W503 +ignore = C901, E203, E266, E501, E731, W503 max-line-length = 88 max-complexity = 18 select = B,C,E,F,W,T4 \ No newline at end of file diff --git a/package.json b/package.json index 3113a9c67..63fc996e0 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "private::build:py": "dash-generate-components src/dash-table/dash/DataTable.js dash_table -p package-info.json && cp dash_table_base/** dash_table/ && dash-generate-components src/dash-table/dash/DataTable.js dash_table -p package-info.json --r-prefix 'dash'", "private::host_js": "http-server ./dash_table -c-1 --silent", "private::lint:ts": "tslint --project tsconfig.json --config tslint.json", - "private::lint:py": "flake8 --exclude=DataTable.py,__init__.py,_imports_.py dash_table && black --check --exclude dash_table .", + "private::lint:py": "flake8 --exclude=DataTable.py,__init__.py,_imports_.py dash_table tests && black --check --exclude dash_table .", "private::wait_js": "wait-on http://localhost:8080", "private::opentests": "cypress open", "private::test.python": "python -m unittest tests/unit/format_test.py", diff --git a/tests/integration/review_app/test_app_df_backend_paging.py b/tests/integration/review_app/test_app_df_backend_paging.py index bd6109eaa..0f3118684 100644 --- a/tests/integration/review_app/test_app_df_backend_paging.py +++ b/tests/integration/review_app/test_app_df_backend_paging.py @@ -204,9 +204,9 @@ def section_title(title): @app.callback( Output(IDS["table"], "data"), - [Input(IDS["table"], "page_current"), Input(IDS["table"], "page_size"),], + [Input(IDS["table"], "page_current"), Input(IDS["table"], "page_size")], ) - def update_graph(page_current, page_size): + def update_data(page_current, page_size): return df.iloc[ page_current * page_size : (page_current + 1) * page_size ].to_dict("rows") @@ -243,7 +243,7 @@ def update_graph(page_current, page_size, sort_by): Input(IDS["table-multi-sorting"], "sort_by"), ], ) - def update_graph(page_current, page_size, sort_by): + def update_multi_data(page_current, page_size, sort_by): # print(sort_by) if len(sort_by): dff = df.sort_values( @@ -267,7 +267,7 @@ def update_graph(page_current, page_size, sort_by): Input(IDS["table-filtering"], "filter_query"), ], ) - def update_graph(page_current, page_size, filter_query): + def updat_filtering_data(page_current, page_size, filter_query): # print(filter_query) filtering_expressions = filter_query.split(" && ") dff = df @@ -298,7 +298,7 @@ def update_graph(page_current, page_size, filter_query): Input(IDS["table-sorting-filtering"], "filter_query"), ], ) - def update_graph(page_current, page_size, sort_by, filter_query): + def update_sorting_filtering_data(page_current, page_size, sort_by, filter_query): filtering_expressions = filter_query.split(" && ") dff = df for filter_query in filtering_expressions: @@ -367,7 +367,7 @@ def update_table(page_current, page_size, sort_by, filter_query): Output(IDS["table-paging-with-graph-container"], "children"), [Input(IDS["table-paging-with-graph"], "data")], ) - def update_graph(rows): + def update_children(rows): dff = pd.DataFrame(rows) return html.Div( [ diff --git a/tests/integration/review_app/test_app_df_graph.py b/tests/integration/review_app/test_app_df_graph.py index e37aa6d92..60dfecd9a 100644 --- a/tests/integration/review_app/test_app_df_graph.py +++ b/tests/integration/review_app/test_app_df_graph.py @@ -7,11 +7,6 @@ import dash_core_components as dcc import dash_html_components as html import dash_table -import time - -from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.wait import WebDriverWait ID_PREFIX = "app_data_updating_graph" IDS = {"table": ID_PREFIX, "container": "{}-container".format(ID_PREFIX)} diff --git a/tests/selenium/test_markdown_copy_paste.py b/tests/selenium/test_markdown_copy_paste.py index 1bcab4443..602e4e2d2 100644 --- a/tests/selenium/test_markdown_copy_paste.py +++ b/tests/selenium/test_markdown_copy_paste.py @@ -22,7 +22,7 @@ def get_app(): id="table", data=df[0:250], columns=[ - {"id": "Complaint ID", "name": "Complaint ID", "presentation": "markdown",}, + {"id": "Complaint ID", "name": "Complaint ID", "presentation": "markdown"}, {"id": "Product", "name": "Product", "presentation": "markdown"}, {"id": "Sub-product", "name": "Sub-product"}, {"id": "Issue", "name": "Issue", "presentation": "markdown"}, diff --git a/tests/selenium/test_pagination.py b/tests/selenium/test_pagination.py index 3d4c046b4..324206ad1 100644 --- a/tests/selenium/test_pagination.py +++ b/tests/selenium/test_pagination.py @@ -1,14 +1,11 @@ import dash -from dash.dependencies import Input, Output, State +from dash.dependencies import Input, Output from dash.exceptions import PreventUpdate -import dash_core_components as dcc -import dash_html_components as html from dash_table import DataTable import pytest from selenium.webdriver.common.keys import Keys -from selenium.webdriver.common.action_chains import ActionChains import math import pandas as pd @@ -148,8 +145,6 @@ def test_tpag006_ops_input_invalid_with_enter(test, value, expected_value): target = test.table("table") - text00 = target.cell(0, 0).get_text() - assert target.paging.current.get_value() == "1" target.paging.current.click() @@ -166,8 +161,6 @@ def test_tpag007_ops_input_invalid_with_unfocus(test, value, expected_value): target = test.table("table") - text00 = target.cell(0, 0).get_text() - assert target.paging.current.get_value() == "1" target.paging.current.click() diff --git a/tests/unit/format_test.py b/tests/unit/format_test.py index 63bc5cd35..21aa1ebf9 100644 --- a/tests/unit/format_test.py +++ b/tests/unit/format_test.py @@ -223,16 +223,16 @@ def test_invalid_trim_type(self): def test_valid_decimal_delimiter(self): Format().decimal_delimiter("x") - def test_valid_decimal_delimiter(self): + def test_valid_decimal_delimiter_multi_char(self): self.assertRaises(ValueError, Format().decimal_delimiter, "xyz") def test_invalid_decimal_delimiter(self): self.assertRaises(TypeError, Format().decimal_delimiter, 7) - def test_valid_group_delimiator(self): + def test_valid_group_delimitator(self): Format().group_delimiter("y") - def test_valid_group_delimiator(self): + def test_valid_group_delimitator_multi_char(self): self.assertRaises(ValueError, Format().group_delimiter, "xyz") def test_invalid_group_delimiter(self): From 783a0db4cdda57601adc71cc934cb9a9dedc3de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Tue, 10 Mar 2020 11:42:50 -0400 Subject: [PATCH 17/17] Dash dev branch --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee13187bd..b5624d095 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ./../.. @@ -113,7 +113,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install -r dev-requirements.txt --quiet - git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev] --quiet - run: @@ -219,7 +219,7 @@ jobs: name: Install dependencies (dash) command: | . venv/bin/activate - git clone --depth 1 -b react-16.13 git@github.com:plotly/dash.git dash-main + git clone --depth 1 git@github.com:plotly/dash.git dash-main pip install -e ./dash-main[dev,testing] --quiet cd dash-main/dash-renderer && npm run build && pip install -e . && cd ../..