From c367410b04b8e56d2064e6879fe4ee84fb4196ac Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Tue, 18 Sep 2018 16:51:48 +0100 Subject: [PATCH 1/4] Pin eslint config version to latest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6cccdab0..6268848cb 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "enzyme-adapter-react-15": "1.0.5", "enzyme-to-json": "3.2.2", "eslint": "3.19.0", - "eslint-config-dabapps": "github:dabapps/eslint-config-dabapps", + "eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v4.0.0", "http-server": "0.9.0", "jest": "20.0.3", "less-loader": "4.0.5", From ad415e373c43d546054166742b5b41307cf17974 Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Tue, 18 Sep 2018 16:35:35 +0100 Subject: [PATCH 2/4] Fix collapse maxHeight issue (replace 'auto' with null) --- src/ts/components/collapse.tsx | 4 +- tests/__snapshots__/collapse.tsx.snap | 56 +++++++++++++-------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/ts/components/collapse.tsx b/src/ts/components/collapse.tsx index 12d199b82..a9731058b 100644 --- a/src/ts/components/collapse.tsx +++ b/src/ts/components/collapse.tsx @@ -122,7 +122,7 @@ export class Collapse extends PureComponent { fadeHeight = DEFAULT_FADE_HEIGHT, open, maxCollapsedHeight, - minHeight = 'auto', + minHeight = null, animationDuration = DEFAULT_DURATION, component: Component = 'div', ...remainingProps @@ -132,7 +132,7 @@ export class Collapse extends PureComponent { const collapseStyle = { minHeight, - maxHeight: opened ? 'auto' : height, + maxHeight: opened ? null : height, position: 'relative' as 'relative', overflow: 'hidden' as 'hidden', transition: `ease-in-out ${animationDuration}ms max-height` diff --git a/tests/__snapshots__/collapse.tsx.snap b/tests/__snapshots__/collapse.tsx.snap index d0fe607b1..44c84801a 100644 --- a/tests/__snapshots__/collapse.tsx.snap +++ b/tests/__snapshots__/collapse.tsx.snap @@ -10,8 +10,8 @@ exports[`Collapse should close to custom height 1`] = ` className="clearfix collapse collapse-open" style={ Object { - "maxHeight": "auto", - "minHeight": "auto", + "maxHeight": null, + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -32,7 +32,7 @@ exports[`Collapse should close to custom height 2`] = ` style={ Object { "maxHeight": 500, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -68,7 +68,7 @@ exports[`Collapse should close to custom height 3`] = ` style={ Object { "maxHeight": 100, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -104,7 +104,7 @@ exports[`Collapse should close to custom height 4`] = ` style={ Object { "maxHeight": 100, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -138,8 +138,8 @@ exports[`Collapse should close to default height 1`] = ` className="clearfix collapse collapse-open" style={ Object { - "maxHeight": "auto", - "minHeight": "auto", + "maxHeight": null, + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -159,7 +159,7 @@ exports[`Collapse should close to default height 2`] = ` style={ Object { "maxHeight": 500, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -194,7 +194,7 @@ exports[`Collapse should close to default height 3`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -229,7 +229,7 @@ exports[`Collapse should close to default height 4`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -260,7 +260,7 @@ exports[`Collapse should match snapshot when collapsed 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -274,8 +274,8 @@ exports[`Collapse should match snapshot when expanded 1`] = ` className="clearfix collapse collapse-open" style={ Object { - "maxHeight": "auto", - "minHeight": "auto", + "maxHeight": null, + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -290,7 +290,7 @@ exports[`Collapse should match snapshot with custom animation duration 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 100ms max-height", @@ -305,7 +305,7 @@ exports[`Collapse should match snapshot with custom collapsed height 1`] = ` style={ Object { "maxHeight": 100, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -335,7 +335,7 @@ exports[`Collapse should match snapshot with customized fade out 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -365,7 +365,7 @@ exports[`Collapse should match snapshot with fade out 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -400,7 +400,7 @@ exports[`Collapse should open from custom height 1`] = ` style={ Object { "maxHeight": 100, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -436,7 +436,7 @@ exports[`Collapse should open from custom height 2`] = ` style={ Object { "maxHeight": 100, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -472,7 +472,7 @@ exports[`Collapse should open from custom height 3`] = ` style={ Object { "maxHeight": 500, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -507,8 +507,8 @@ exports[`Collapse should open from custom height 4`] = ` className="clearfix collapse collapse-open" style={ Object { - "maxHeight": "auto", - "minHeight": "auto", + "maxHeight": null, + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -528,7 +528,7 @@ exports[`Collapse should open from default height 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -563,7 +563,7 @@ exports[`Collapse should open from default height 2`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -598,7 +598,7 @@ exports[`Collapse should open from default height 3`] = ` style={ Object { "maxHeight": 500, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -632,8 +632,8 @@ exports[`Collapse should open from default height 4`] = ` className="clearfix collapse collapse-open" style={ Object { - "maxHeight": "auto", - "minHeight": "auto", + "maxHeight": null, + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", @@ -649,7 +649,7 @@ exports[`Collapse should take regular element attributes 1`] = ` style={ Object { "maxHeight": 0, - "minHeight": "auto", + "minHeight": null, "overflow": "hidden", "position": "relative", "transition": "ease-in-out 200ms max-height", From 3b901be1521da8c112e7625afe967855b7a21445 Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Tue, 18 Sep 2018 16:31:55 +0100 Subject: [PATCH 3/4] Disable prettier eslint --- .eslintrc.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index d6f8f9377..9a293a79e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,5 +2,8 @@ "extends": [ "dabapps/base", "dabapps/commonjs" - ] + ], + "rules": { + "prettier/prettier": 0 + } } From c7736de5755e8148dfefaf2a952660f3c35f5d96 Mon Sep 17 00:00:00 2001 From: Jake 'Sid' Smith Date: Tue, 18 Sep 2018 16:55:06 +0100 Subject: [PATCH 4/4] 0.8.38 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6268848cb..c83e23ee4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dabapps/roe", - "version": "0.8.37", + "version": "0.8.38", "description": "A Collection of React Components for Project Development", "main": "dist/js/index.js", "types": "dist/js/index.d.ts",