From d5e2f49068aaa1840f9e2ded6b08f8cbd77ed68a Mon Sep 17 00:00:00 2001 From: alinastarkov Date: Thu, 23 May 2019 16:11:34 -0400 Subject: [PATCH 1/4] border is none if not define --- src/dash-table/components/EdgeFactory.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dash-table/components/EdgeFactory.tsx b/src/dash-table/components/EdgeFactory.tsx index f333ab382..3918e129f 100644 --- a/src/dash-table/components/EdgeFactory.tsx +++ b/src/dash-table/components/EdgeFactory.tsx @@ -59,7 +59,7 @@ export default class EdgeFactory { )) { hTarget.setEdge(iTarget, j, hPrevious.getEdge(iPrevious, j), Infinity, true); } - hPrevious.setEdge(iPrevious, j, undefined, -Infinity, true); + hPrevious.setEdge(iPrevious, j, 'none', -Infinity, true); }, R.range(0, hPrevious.columns)); } @@ -82,7 +82,7 @@ export default class EdgeFactory { )) { hTarget.setEdge(i, jTarget, hPrevious.getEdge(i, jPrevious), Infinity, true); } - hPrevious.setEdge(i, jPrevious, undefined, -Infinity, true); + hPrevious.setEdge(i, jPrevious, 'none', -Infinity, true); }, R.range(0, hPrevious.rows)); } @@ -102,7 +102,7 @@ export default class EdgeFactory { hTarget.getWeight(iTarget, j), hNext.getWeight(iNext, j), cutoffWeight - ) && hTarget.setEdge(iTarget, j, undefined, -Infinity, true), + ) && hTarget.setEdge(iTarget, j, 'none', -Infinity, true), R.range(0, hTarget.columns) ); } @@ -123,7 +123,7 @@ export default class EdgeFactory { vTarget.getWeight(i, jTarget), vNext.getWeight(i, jNext), cutoffWeight - ) && vTarget.setEdge(i, jTarget, undefined, -Infinity, true), + ) && vTarget.setEdge(i, jTarget, 'none', -Infinity, true), R.range(0, vTarget.rows) ); } From dc3ce3013f1e9de7c5cd63a719d28b501a78f0a4 Mon Sep 17 00:00:00 2001 From: alinastarkov Date: Thu, 23 May 2019 16:12:06 -0400 Subject: [PATCH 2/4] test cases for css border overwrite bugs --- .../percy-storybook/Border.style.percy.tsx | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/tests/visual/percy-storybook/Border.style.percy.tsx b/tests/visual/percy-storybook/Border.style.percy.tsx index 43ad5c224..50e3c3e6a 100644 --- a/tests/visual/percy-storybook/Border.style.percy.tsx +++ b/tests/visual/percy-storybook/Border.style.percy.tsx @@ -176,6 +176,30 @@ const scenarios: ITest[] = [ }, style_as_list_view: true } + }, { + name: 'hoizontal border between header and first row should be blue', + props: { + css: [{selector: 'th', rule: 'border: 1px solid pink'}], + style_data: {border: '1px solid blue'} + } + }, { + name: 'horizontal border between header and filter should be purple', + props: { + filtering: true, + css: [{selector: 'th', rule: 'border: 1px solid pink'}], + style_filter: {border: '1px solid purple'} + } + }, { + name: 'horizontal border between active cell (0, 0) and header should be pink', + props: { + css: [{selector: 'th', rule: 'border: 1px solid red'}], + active_cell: { + column: 0, + column_id: 'a', + row: 0, + row_id: null + } + } } ]; @@ -290,6 +314,35 @@ const ops_scenarios: ITest[] = [ border: '1px solid red' }] } + }, { + name: 'vertical border between column A and column B should be blue', + props: { + css: [{ selector: 'td[data-dash-column="a"]', rule: 'border: 1px solid green'}], + style_data_conditional: [{ + if: { column_id: 'b' }, + border: '1px solid blue' + }] + } + }, { + name: 'horizontal border between header and column A should be dash green ', + props: { + css: [{ selector: 'th', rule: 'border: 1px solid red'}], + style_data_conditional: [{ + if: { column_id: 'a' }, + border: '1px dashed blue' + }] + } + }, { + name: 'vertical border between active cell (0, 0) and cell on column B should be pink', + props: { + css: [{ selector: 'td[data-dash-column="b"]', rule: 'border: 1px solid blue'}], + active_cell: { + column: 0, + column_id: 'a', + row: 0, + row_id: null + } + } } ]; From e4f614089139ae393e93cc9ef142d0da6c0fc3ad Mon Sep 17 00:00:00 2001 From: alinastarkov Date: Mon, 27 May 2019 10:22:08 -0400 Subject: [PATCH 3/4] edit CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efb7afb14..db55c6590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [3.7.1] - 2019-05-27 +### Fixed +[#434](https://github.com/plotly/dash-table/issues/434) +- Fix CSS borders propeties overwrite style_* borders properties. + ## [3.7.0] - 2019-05-15 ### Added [#397](https://github.com/plotly/dash-table/pull/397), [#410](https://github.com/plotly/dash-table/pull/410) From c0e55d265c1f58821f84b7e587e0c737985dc9a1 Mon Sep 17 00:00:00 2001 From: Haylee Luu Date: Mon, 27 May 2019 13:56:41 -0400 Subject: [PATCH 4/4] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Marc-André Rivet --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db55c6590..66a40111a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [3.7.1] - 2019-05-27 +## [Unreleased] ### Fixed [#434](https://github.com/plotly/dash-table/issues/434) - Fix CSS borders propeties overwrite style_* borders properties.