From 3f2576114b144d937f5a0de39bdf01d975b2fbbe Mon Sep 17 00:00:00 2001 From: Ilya Nee Date: Mon, 29 Apr 2019 16:20:42 +0200 Subject: [PATCH 1/3] Snapshots update --- src/components/Item/VisualizationItem/Item.js | 5 ++++- .../__tests__/__snapshots__/Item.spec.js.snap | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Item/VisualizationItem/Item.js b/src/components/Item/VisualizationItem/Item.js index c5b2cb2da..ed9940bb6 100644 --- a/src/components/Item/VisualizationItem/Item.js +++ b/src/components/Item/VisualizationItem/Item.js @@ -97,6 +97,8 @@ export class Item extends Component { super(props); this.d2 = context.d2; + + this.contentRef = React.createRef(); } async componentDidMount() { @@ -268,7 +270,7 @@ export class Item extends Component { ? { height: item.originalHeight - HEADER_HEIGHT - PADDING_BOTTOM, } - : { height: '100%' }; + : { height: this.contentRef.offsetHeight }; }; render() { @@ -285,6 +287,7 @@ export class Item extends Component {
(this.contentRef = ref)} > {this.state.configLoaded && this.getPluginComponent()}
diff --git a/src/components/Item/VisualizationItem/__tests__/__snapshots__/Item.spec.js.snap b/src/components/Item/VisualizationItem/__tests__/__snapshots__/Item.spec.js.snap index 68061e12a..66e9a0c1e 100644 --- a/src/components/Item/VisualizationItem/__tests__/__snapshots__/Item.spec.js.snap +++ b/src/components/Item/VisualizationItem/__tests__/__snapshots__/Item.spec.js.snap @@ -167,7 +167,7 @@ ShallowWrapper { "children": false, "className": "dashboard-item-content", }, - "ref": null, + "ref": [Function], "rendered": false, "type": "div", }, @@ -296,7 +296,7 @@ ShallowWrapper { "children": false, "className": "dashboard-item-content", }, - "ref": null, + "ref": [Function], "rendered": false, "type": "div", }, From 8522167afb2294b7c380c786a5c08c99e1f8adad Mon Sep 17 00:00:00 2001 From: Ilya Nee Date: Mon, 29 Apr 2019 17:36:16 +0200 Subject: [PATCH 2/3] Update data visualizer plugin version --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a6fb16c45..ba2a95bd0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@dhis2/d2-ui-rich-text": "^5.3.10", "@dhis2/d2-ui-sharing-dialog": "^5.3.10", "@dhis2/d2-ui-translation-dialog": "^5.3.10", - "@dhis2/data-visualizer-plugin": "^32.0.3", + "@dhis2/data-visualizer-plugin": "^32.0.5", "@dhis2/ui": "1.0.0-beta.15", "@dhis2/ui-core": "^1.1.3", "@material-ui/core": "^3.9.2", diff --git a/yarn.lock b/yarn.lock index 9b8e0c5bc..44aae6412 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1096,13 +1096,13 @@ recompose "^0.26.0" rxjs "^5.5.7" -"@dhis2/data-visualizer-plugin@^32.0.3": - version "32.0.3" - resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-32.0.3.tgz#70552cb7b4f3240d4eebb14f685788b49dd5d145" - integrity sha512-1aFTOz7KiCcEmyZNGJDjpdbIW2kUrQTXPTCGjHXFF8EorTXBPf4Avw+rEKajGuhlJ9f1+gCGr21BP6rQOgZOUA== +"@dhis2/data-visualizer-plugin@^32.0.5": + version "32.0.5" + resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-32.0.5.tgz#0747fcd63cd965e0f23f3839bb18838d1f44f56d" + integrity sha512-+Cgekg39AGSnO1KpRNkUA6QgHGLeILqlcTFYmsYjMlm+Rb6lhdIpE1lE+NjQz03vHlSxH34p7bwMd2OC9chYnA== dependencies: "@material-ui/core" "^3.1.2" - d2-charts-api "32.0.1" + d2-charts-api "32.0.5" lodash-es "^4.17.11" react "^16.6.0" react-dom "^16.6.0" @@ -3601,10 +3601,10 @@ cyclist@~0.2.2: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= -d2-charts-api@32.0.1: - version "32.0.1" - resolved "https://registry.yarnpkg.com/d2-charts-api/-/d2-charts-api-32.0.1.tgz#f402a5352a08fe3281a437652afc2dc8fd7fd22e" - integrity sha512-s6VlDLCkcjNluOXwUp1csa/6ZaNDBtbu9RWmaa8kb5gPpc1BDovwx0lE34FPrEUIefF5JNpisl3fwlrLrH592Q== +d2-charts-api@32.0.5: + version "32.0.5" + resolved "https://registry.yarnpkg.com/d2-charts-api/-/d2-charts-api-32.0.5.tgz#ff2f0dccdfc0f1ca0a60685ccb74ad87008002f4" + integrity sha512-2ZjnJoPptNZDc3K/UFJ/KAYDCKXShK0iENC6v6hshEc16TAwTDpV1Ke1kmjfV7aDXM/Reg5HT0vs6cckTno8Dg== dependencies: d2-utilizr "0.2.13" d3-color "1.0.1" From f22ebbdc744e94851a5af633d8a9a29719a0fcb7 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 30 Apr 2019 10:03:48 +0200 Subject: [PATCH 3/3] upgrade plugin which has critical fixes --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ba2a95bd0..cbeac3795 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@dhis2/d2-ui-rich-text": "^5.3.10", "@dhis2/d2-ui-sharing-dialog": "^5.3.10", "@dhis2/d2-ui-translation-dialog": "^5.3.10", - "@dhis2/data-visualizer-plugin": "^32.0.5", + "@dhis2/data-visualizer-plugin": "32.0.6", "@dhis2/ui": "1.0.0-beta.15", "@dhis2/ui-core": "^1.1.3", "@material-ui/core": "^3.9.2", diff --git a/yarn.lock b/yarn.lock index 44aae6412..1bddebf21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1096,13 +1096,13 @@ recompose "^0.26.0" rxjs "^5.5.7" -"@dhis2/data-visualizer-plugin@^32.0.5": - version "32.0.5" - resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-32.0.5.tgz#0747fcd63cd965e0f23f3839bb18838d1f44f56d" - integrity sha512-+Cgekg39AGSnO1KpRNkUA6QgHGLeILqlcTFYmsYjMlm+Rb6lhdIpE1lE+NjQz03vHlSxH34p7bwMd2OC9chYnA== +"@dhis2/data-visualizer-plugin@32.0.6": + version "32.0.6" + resolved "https://registry.yarnpkg.com/@dhis2/data-visualizer-plugin/-/data-visualizer-plugin-32.0.6.tgz#9cbc7c90ac76ebda4f74469a05437f972d8a71e1" + integrity sha512-+M3Nqh4fboSmLLIeJpFExM5ukL+JnaeFjecAZT/Ltv2dfG+G2HB84Gdgn3S8zaAALNJC6QfJ1bIu0l4dzkVOpA== dependencies: "@material-ui/core" "^3.1.2" - d2-charts-api "32.0.5" + d2-charts-api "32.0.6" lodash-es "^4.17.11" react "^16.6.0" react-dom "^16.6.0" @@ -3601,10 +3601,10 @@ cyclist@~0.2.2: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= -d2-charts-api@32.0.5: - version "32.0.5" - resolved "https://registry.yarnpkg.com/d2-charts-api/-/d2-charts-api-32.0.5.tgz#ff2f0dccdfc0f1ca0a60685ccb74ad87008002f4" - integrity sha512-2ZjnJoPptNZDc3K/UFJ/KAYDCKXShK0iENC6v6hshEc16TAwTDpV1Ke1kmjfV7aDXM/Reg5HT0vs6cckTno8Dg== +d2-charts-api@32.0.6: + version "32.0.6" + resolved "https://registry.yarnpkg.com/d2-charts-api/-/d2-charts-api-32.0.6.tgz#e733a5417a78186a0c4a9cce72bc616aa9dfbf79" + integrity sha512-pV+f+6oajrRcFn38Zo0m7arIcKUcMeQaGqkFLeg71YuGJC/iojEUQjhixPoTl+arHz+PTtok3o0nN73hKISU3Q== dependencies: d2-utilizr "0.2.13" d3-color "1.0.1"