From e882d5bf614227c9d5d43b1aec7397e196c3f6b2 Mon Sep 17 00:00:00 2001 From: tnagorra Date: Fri, 6 Sep 2024 23:07:56 +0545 Subject: [PATCH] Add attendees section in daily standup - Move deadlines section to second page in daily standup - Use screen from SizeContext --- src/components/Page/index.tsx | 10 +- src/utils/common.ts | 4 + .../DayView/WorkItemRow/index.tsx | 8 +- src/views/DailyJournal/index.tsx | 8 +- .../DailyStandup/DeadlineSection/index.tsx | 162 +++++++++++++++++ .../DeadlineSection/styles.module.css | 30 +++ src/views/DailyStandup/Slide/index.tsx | 2 +- src/views/DailyStandup/StartSection/index.tsx | 130 +++++++++++++ .../StartSection/styles.module.css | 16 ++ src/views/DailyStandup/index.tsx | 172 ++++-------------- src/views/DailyStandup/styles.module.css | 30 --- src/views/Home/index.tsx | 5 +- 12 files changed, 396 insertions(+), 181 deletions(-) create mode 100644 src/views/DailyStandup/DeadlineSection/index.tsx create mode 100644 src/views/DailyStandup/DeadlineSection/styles.module.css create mode 100644 src/views/DailyStandup/StartSection/index.tsx create mode 100644 src/views/DailyStandup/StartSection/styles.module.css diff --git a/src/components/Page/index.tsx b/src/components/Page/index.tsx index 1919561..f4778d1 100644 --- a/src/components/Page/index.tsx +++ b/src/components/Page/index.tsx @@ -55,7 +55,7 @@ function Page(props: Props) { onSwipeRight, } = props; - const { width } = useContext(SizeContext); + const { screen } = useContext(SizeContext); const [storedConfig, setStoredConfig] = useLocalStorage('timur-config'); @@ -117,11 +117,11 @@ function Page(props: Props) { !startSidebarShown && styles.startSidebarCollapsed, debouncedStartSidebarCollapsed && styles.debouncedStartSidebarCollapsed, debouncedEndSidebarCollapsed && styles.debouncedEndSidebarCollapsed, - (!endSidebarShown || width <= 900) && styles.endSidebarCollapsed, + (!endSidebarShown || screen === 'mobile') && styles.endSidebarCollapsed, startSidebarShown && !!startAsideContent && styles.startSidebarVisible, endSidebarShown && !!endAsideContent - && width > 900 + && screen === 'desktop' && styles.endSidebarVisible, className, )} @@ -160,7 +160,7 @@ function Page(props: Props) { {children} - {endAsideContent && width > 900 && ( + {endAsideContent && screen === 'desktop' && ( - {windowWidth >= 900 && ( + {screen === 'desktop' && ( )} - {windowWidth >= 900 && ( + {screen === 'desktop' && (