From ddd718fd23cd0e99dcff80e5877ab9df776404d5 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Tue, 14 Nov 2023 08:44:36 +0100 Subject: [PATCH] refactor/reshape table (#5328) This PR fixes a couple of issues with the pagination bar: * Fixes an issue where padding bottom would be broken due to disabling padding on the parent container * Remove padding on the entire table to create more space and remove header bar border radius as per discussion with @nicolaesocaciu --- .../CellSortable/CellSortable.tsx | 4 +++- .../SortableTableHeader/SortableTableHeader.tsx | 2 ++ .../FeatureEnvironmentSeen.tsx | 6 +++++- .../ActionsCell/ActionsCell.tsx | 3 ++- .../PaginatedProjectFeatureToggles.tsx | 17 +++++++++++++++-- .../RowSelectCell/RowSelectCell.tsx | 9 +++++++-- frontend/src/themes/app.css | 7 ------- 7 files changed, 34 insertions(+), 14 deletions(-) diff --git a/frontend/src/component/common/Table/SortableTableHeader/CellSortable/CellSortable.tsx b/frontend/src/component/common/Table/SortableTableHeader/CellSortable/CellSortable.tsx index c753a3673a..aab789a71b 100644 --- a/frontend/src/component/common/Table/SortableTableHeader/CellSortable/CellSortable.tsx +++ b/frontend/src/component/common/Table/SortableTableHeader/CellSortable/CellSortable.tsx @@ -31,6 +31,7 @@ interface ICellSortableProps { isFlex?: boolean; isFlexGrow?: boolean; onClick?: MouseEventHandler; + styles: React.CSSProperties; } export const CellSortable: FC = ({ @@ -46,6 +47,7 @@ export const CellSortable: FC = ({ isFlex, isFlexGrow, onClick = () => {}, + styles, }) => { const { setAnnouncement } = useContext(AnnouncerContext); const [title, setTitle] = useState(''); @@ -109,7 +111,7 @@ export const CellSortable: FC = ({ ({ return ( - + + + + + )} diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx index cf76bc1d7d..5154110991 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx @@ -87,10 +87,11 @@ export const ActionsCell: VFC = ({ }; return ( - + ({ + padding: `${theme.spacing(2.5)} ${theme.spacing( + 3.125, + )}`, + })} > - + } >
= ({ checked, title, }) => ( - - + + ); diff --git a/frontend/src/themes/app.css b/frontend/src/themes/app.css index 6bfe9b5a98..2928b6c012 100644 --- a/frontend/src/themes/app.css +++ b/frontend/src/themes/app.css @@ -60,13 +60,6 @@ button { bottom: 0; left: 0; transform: translateX(-100%); - /* background-image: linear-gradient( - 90deg, - rgba(255, 255, 255, 0) 0, - rgba(255, 255, 255, 0.2) 100%, - rgba(255, 255, 255, 0.5) 100%, - rgba(255, 255, 255, 0) - ); */ animation: shimmer 3s infinite; content: ''; z-index: 5001;