From d0877875ddd181d80205465780ae88a6c34cc754 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 2 Oct 2019 09:38:02 +0200 Subject: [PATCH 1/3] remove bottom border for collapsed panels --- .../packages/ui-components/src/repos/DiffFile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scm-ui-components/packages/ui-components/src/repos/DiffFile.js b/scm-ui-components/packages/ui-components/src/repos/DiffFile.js index f268940709..c483feecba 100644 --- a/scm-ui-components/packages/ui-components/src/repos/DiffFile.js +++ b/scm-ui-components/packages/ui-components/src/repos/DiffFile.js @@ -19,6 +19,10 @@ const styles = { panel: { fontSize: "1rem" }, + /* remove bottom border for collapsed panels */ + panelCollapsed: { + borderBottom: "none" + }, /* breaks into a second row when buttons and title become too long */ level: { @@ -283,7 +287,7 @@ class DiffFile extends React.Component { ? fileControlFactory(file, this.setCollapse) : null; return ( -
+
Date: Wed, 2 Oct 2019 10:26:43 +0200 Subject: [PATCH 2/3] add handling for binary files, correct typo --- .../ui-components/src/repos/DiffFile.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scm-ui-components/packages/ui-components/src/repos/DiffFile.js b/scm-ui-components/packages/ui-components/src/repos/DiffFile.js index c483feecba..712ad2f91b 100644 --- a/scm-ui-components/packages/ui-components/src/repos/DiffFile.js +++ b/scm-ui-components/packages/ui-components/src/repos/DiffFile.js @@ -21,7 +21,9 @@ const styles = { }, /* remove bottom border for collapsed panels */ panelCollapsed: { - borderBottom: "none" + "& .panel-heading": { + borderBottom: "none" + } }, /* breaks into a second row when buttons and title become too long */ @@ -111,7 +113,7 @@ class DiffFile extends React.Component { toggleCollapse = () => { const { file } = this.props; - if (file && !file.isBinaray) { + if (file && !file.isBinary) { this.setState(state => ({ collapsed: !state.collapsed })); @@ -279,15 +281,20 @@ class DiffFile extends React.Component {
); } - const collapseIcon = !file.isBinary ? ( - - ) : null; + const collapseIcon = + file && !file.isBinary ? : null; const fileControls = fileControlFactory ? fileControlFactory(file, this.setCollapse) : null; return ( -
+
Date: Wed, 2 Oct 2019 10:57:47 +0000 Subject: [PATCH 3/3] Close branch feature/collapsed_panel