From 035f7e847aeba9ef3f6d4408dbdba0ebe937dd0b Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Fri, 13 May 2022 11:56:14 +0200 Subject: [PATCH] Fix branch table alignment (#2035) The branch table provides an extension point to add further columns, but the content was not vertically aligned anymore after the changes in #2016. This PR adds the same classes to the extension point columns as the other columns have to assure vertical alignment. --- .../repos/branches/components/AheadBehindTag.tsx | 16 ++++++---------- .../src/repos/branches/components/BranchRow.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/scm-ui/ui-webapp/src/repos/branches/components/AheadBehindTag.tsx b/scm-ui/ui-webapp/src/repos/branches/components/AheadBehindTag.tsx index e2148bbf19..23d999f4e2 100644 --- a/scm-ui/ui-webapp/src/repos/branches/components/AheadBehindTag.tsx +++ b/scm-ui/ui-webapp/src/repos/branches/components/AheadBehindTag.tsx @@ -52,11 +52,11 @@ const Count = styled.span` width: max-content; `; -const Bar = styled.span.attrs(props => ({ +const Bar = styled.span.attrs((props) => ({ style: { width: props.width + "%", - borderRadius: props.direction === "left" ? "25px 0 0 25px" : "0 25px 25px 0" - } + borderRadius: props.direction === "left" ? "25px 0 0 25px" : "0 25px 25px 0", + }, }))` height: 3px; max-width: 100%; @@ -87,17 +87,13 @@ const AheadBehindTag: FC = ({ branch, details, hiddenMobile, verbose }) = : details.changesetsAhead; return ( -
+
- + {behindText} = ({ branch, details, hiddenMobile, verbose }) = direction="left" /> - + {aheadText} = ({ repository, baseUrl, branch, onDelete, details } )} {renderBranchTag()} - {binder.hasExtension("repos.branches.row.details") + {binder.hasExtension("repos.branches.row.details", extensionProps) ? binder - .getExtensions("repos.branches.row.details") - .map((e) => {React.createElement(e, extensionProps)}) + .getExtensions("repos.branches.row.details", extensionProps) + .map((e) => ( + {React.createElement(e, extensionProps)} + )) : null} {deleteButton}