From 0063f26108a45cdbdbef18ef2b0254fb07f42934 Mon Sep 17 00:00:00 2001 From: Tom Caiger Date: Fri, 6 Dec 2024 16:53:57 +1300 Subject: [PATCH] style tweaks --- .../src/features/Tasks/TaskPageHeader.tsx | 8 +++----- .../src/features/Tasks/TasksTable/TasksTable.tsx | 5 +++++ .../datatrak-web/src/layout/MainPageLayout.tsx | 1 + packages/datatrak-web/src/layout/TasksLayout.tsx | 5 ++++- .../src/views/Tasks/TasksDashboardPage.tsx | 15 +++++---------- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/packages/datatrak-web/src/features/Tasks/TaskPageHeader.tsx b/packages/datatrak-web/src/features/Tasks/TaskPageHeader.tsx index b5bbce1438..3633af488f 100644 --- a/packages/datatrak-web/src/features/Tasks/TaskPageHeader.tsx +++ b/packages/datatrak-web/src/features/Tasks/TaskPageHeader.tsx @@ -27,6 +27,9 @@ const Wrapper = styled.div` display: flex; align-items: self-start; padding-inline-end: 2.7rem; + ${({ theme }) => theme.breakpoints.down('sm')} { + padding-inline-end: 0.5rem; + } `; const HeadingContainer = styled.div` @@ -59,11 +62,6 @@ const ContentWrapper = styled.div` align-items: center; justify-content: flex-end; width: 100%; - ${({ theme }) => theme.breakpoints.down('xs')} { - padding-inline-start: 1rem; - flex-direction: column; - padding-inline-end: 0.6rem; - } `; export const TaskPageHeader = ({ diff --git a/packages/datatrak-web/src/features/Tasks/TasksTable/TasksTable.tsx b/packages/datatrak-web/src/features/Tasks/TasksTable/TasksTable.tsx index 29c70e9261..9936616ae7 100644 --- a/packages/datatrak-web/src/features/Tasks/TasksTable/TasksTable.tsx +++ b/packages/datatrak-web/src/features/Tasks/TasksTable/TasksTable.tsx @@ -36,6 +36,11 @@ const Container = styled.div` } ${({ theme }) => theme.breakpoints.down('sm')} { + border: none; + border-radius: 0; + th.MuiTableCell-root { + border: none; + } table .MuiTableRow-head:nth-child(2) { display: none; } diff --git a/packages/datatrak-web/src/layout/MainPageLayout.tsx b/packages/datatrak-web/src/layout/MainPageLayout.tsx index c1ab8e3edb..1d2534d9c0 100644 --- a/packages/datatrak-web/src/layout/MainPageLayout.tsx +++ b/packages/datatrak-web/src/layout/MainPageLayout.tsx @@ -39,6 +39,7 @@ const useHeaderVisibility = () => { ROUTES.SURVEY_SELECT, ROUTES.ACCOUNT_SETTINGS, ROUTES.TASKS, + ROUTES.TASK_DETAILS, ]; return !headerLessRoutePatterns.some(pathPattern => matchPath(pathPattern, pathname)); diff --git a/packages/datatrak-web/src/layout/TasksLayout.tsx b/packages/datatrak-web/src/layout/TasksLayout.tsx index 72ae03a0d4..af95a13eca 100644 --- a/packages/datatrak-web/src/layout/TasksLayout.tsx +++ b/packages/datatrak-web/src/layout/TasksLayout.tsx @@ -11,9 +11,12 @@ import { StickyMobileHeader } from './StickyMobileHeader.tsx'; import { useIsMobile } from '../utils'; const HeaderLessFullHeightContainer = styled.div` - height: calc(100vh - ${HEADER_HEIGHT} - ${TITLE_BAR_HEIGHT}); display: flex; flex-direction: column; + + ${({ theme }) => theme.breakpoints.up('sm')} { + height: calc(100vh - ${HEADER_HEIGHT} - ${TITLE_BAR_HEIGHT}); + } `; const PageContainer = styled(BasePageContainer)` diff --git a/packages/datatrak-web/src/views/Tasks/TasksDashboardPage.tsx b/packages/datatrak-web/src/views/Tasks/TasksDashboardPage.tsx index 258b7583b7..7a2ec15970 100644 --- a/packages/datatrak-web/src/views/Tasks/TasksDashboardPage.tsx +++ b/packages/datatrak-web/src/views/Tasks/TasksDashboardPage.tsx @@ -12,16 +12,11 @@ import { TasksContentWrapper } from '../../layout'; import { TaskMetrics } from '../../components/TaskMetrics'; const ButtonContainer = styled.div` - padding-block-end: 0.5rem; - margin-block-start: 1rem; - ${({ theme }) => theme.breakpoints.up('sm')} { - margin-inline-start: auto; - margin-block-start: 0; - padding-block-end: 0; - } - ${({ theme }) => theme.breakpoints.down('xs')} { - align-self: self-end; - } + //padding-block-end: 0.5rem; + //margin-block-start: 1rem; + //margin-inline-start: auto; + //margin-block-start: 0; + //padding-block-end: 0; `; const CreateButton = styled(Button).attrs({