Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): calendar sidebar redesign #464

Merged
merged 44 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
705ee07
Merge pull request #1 from Longhorn-Developers/main
EthanL06 Oct 21, 2024
e0aff38
Merge branch 'Longhorn-Developers:main' into main
EthanL06 Oct 23, 2024
da127d1
feat: update calendar sidebar, footer, and header with Figma design
EthanL06 Dec 23, 2024
b83207c
chore: run lint
EthanL06 Dec 23, 2024
5754c1c
Merge pull request #4 from Longhorn-Developers/main
EthanL06 Dec 23, 2024
eae6253
Merge remote-tracking branch 'origin/main' into feature/sidebar-redesign
EthanL06 Dec 23, 2024
5e4c38a
feat: update header with Figma design
EthanL06 Dec 23, 2024
2f30ce2
chore: run lint
EthanL06 Dec 23, 2024
aca0594
chore: remove unused vars
EthanL06 Dec 23, 2024
c87643f
chore: fix types
EthanL06 Dec 23, 2024
c5aab8a
fix: adjust sidebar minimum width
EthanL06 Dec 26, 2024
c437aaf
fix: update LogoIcon layout to ensure text is always displayed
EthanL06 Dec 26, 2024
d34ab80
feat: add spacing constants
EthanL06 Dec 28, 2024
83479b9
fix: add sidebar styling with spacing system and sticky header
EthanL06 Dec 28, 2024
0753f0a
fix: update spacing constants to use rem units
EthanL06 Dec 28, 2024
96f86d2
refactor: replace padding with spacing system and colors with UTRP theme
EthanL06 Dec 28, 2024
ab3eb50
refactor: rename ImportantLinks to ResourceLinks
EthanL06 Dec 28, 2024
9f8e331
refactor: simplify CalendarHeader button component by using icon prop
EthanL06 Dec 28, 2024
a039ea9
feat: add sidebar open and close transition
EthanL06 Dec 28, 2024
4027ece
refactor: rename unused var
EthanL06 Dec 28, 2024
68990ec
Merge branch 'main' into feature/sidebar-redesign
EthanL06 Dec 28, 2024
859c2b2
fix: update social icon color
EthanL06 Dec 31, 2024
fcc3581
feat: improve layout and spacing in calendar components
EthanL06 Jan 3, 2025
59a4993
Merge branch 'feature/sidebar-redesign' of https://github.com/EthanL0…
EthanL06 Jan 3, 2025
46fa071
refactor: remove unused GearSix icon and options handler
EthanL06 Jan 3, 2025
9bd0ec8
feat: update calendar components with new icons and improved spacing
EthanL06 Jan 3, 2025
a4ad6f7
fix: correct class name
EthanL06 Jan 3, 2025
4ca3025
refactor: organize social links into array and update link styling
EthanL06 Jan 3, 2025
7ed1ea3
refactor: remove unused import
EthanL06 Jan 3, 2025
f1804ab
fix: adjust gap spacing in radio button
EthanL06 Jan 8, 2025
af8a0b8
fix: update divider component to use theme offwhite1
EthanL06 Jan 8, 2025
f89cd43
fix: increase size of outward arrow icon
EthanL06 Jan 8, 2025
3f6332d
feat: add getSpacingInPx function to convert rem to pixels
EthanL06 Jan 8, 2025
11f5d08
fix: update gap spacing in CalendarSchedules component to use spacing…
EthanL06 Jan 8, 2025
d5dbf38
fix: rollback footer social icons to original icons
EthanL06 Jan 8, 2025
12c396b
fix: update Calendar styles to use theme offwhite1 and adjust padding…
EthanL06 Jan 8, 2025
01cf99a
fix: update LargeLogo component to use gap-spacing-3
EthanL06 Jan 8, 2025
f24e72a
Merge branch 'main' into feature/sidebar-redesign
EthanL06 Jan 8, 2025
6894a58
fix: update button variants to 'minimal' and adjust styles for consis…
EthanL06 Jan 8, 2025
1b00026
fix: adjust padding in Calendar component for better layout consistency
EthanL06 Jan 8, 2025
1592d4f
Merge branch 'main' into feature/sidebar-redesign
EthanL06 Jan 8, 2025
75fd48d
fix: increase size of arrow icon
EthanL06 Jan 8, 2025
b2f1bbd
fix: add shrink-0 to radio buttons
EthanL06 Jan 8, 2025
7cc1f25
Merge branch 'main' into feature/sidebar-redesign
EthanL06 Jan 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 49 additions & 36 deletions src/views/components/calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { CalendarContext } from '@views/contexts/CalendarContext';
import useCourseFromUrl from '@views/hooks/useCourseFromUrl';
import { useFlattenedCourseSchedule } from '@views/hooks/useFlattenedCourseSchedule';
import { MessageListener } from 'chrome-extension-toolkit';
import clsx from 'clsx';
import React, { useEffect, useState } from 'react';

import OutwardArrowIcon from '~icons/material-symbols/arrow-outward';
Expand Down Expand Up @@ -61,43 +62,55 @@ export default function Calendar(): JSX.Element {
<CalendarContext.Provider value>
<div className='h-full w-full flex flex-col'>
<div className='h-screen flex overflow-auto'>
{showSidebar && (
<div className='px-spacing7 py-spacing5 h-full min-w-[20.3125rem] flex flex-none flex-col justify-between border-r border-ut-offwhite/75 shadow-[2px_0_10px,rgba(214_210_196_/_.1)] screenshot:hidden'>
<div className='gap-y-spacing5 h-full w-fit flex flex-col overflow-auto'>
<div className='pb-spacing6 sticky top-0 z-50 w-full flex items-center justify-between gap-x-3xl bg-white'>
<LargeLogo />
<Button
variant='single'
color='theme-black'
onClick={() => {
setShowSidebar(!showSidebar);
}}
className='h-fit screenshot:hidden !p-0'
icon={MenuIcon}
/>
</div>
<CalendarSchedules />
<Divider orientation='horizontal' size='100%' />
<ResourceLinks />
<Divider orientation='horizontal' size='100%' />
{/* <TeamLinks /> */}
<a
href={CRX_PAGES.REPORT}
className='gap-spacing1 flex items-center text-ut-burntorange underline-offset-2 hover:underline'
target='_blank'
rel='noreferrer'
onClick={event => {
event.preventDefault();
openReportWindow();
}}
>
<Text variant='p'>Send us Feedback!</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
</div>
<CalendarFooter />
<div
className={clsx(
'gap-y-spacing6 py-spacing5 relative h-full min-h-screen w-full flex flex-none flex-col justify-between overflow-clip whitespace-nowrap border-r border-ut-offwhite/75 shadow-[2px_0_10px,rgba(214_210_196_/_.1)] duration-300 ease-out-expo transition-property-max-width screenshot:hidden',
{
'max-w-[20.3125rem] ': showSidebar,
'max-w-0 pointer-events-none': !showSidebar,
}
)}
tabIndex={showSidebar ? 0 : -1}
aria-hidden={!showSidebar}
{...{ inert: !showSidebar ? '' : undefined }}
EthanL06 marked this conversation as resolved.
Show resolved Hide resolved
>
<div className='px-spacing7 sticky top-0 z-50 w-full flex items-center justify-between gap-x-3xl bg-white'>
<LargeLogo />
<Button
variant='single'
color='theme-black'
onClick={() => {
setShowSidebar(!showSidebar);
}}
className='h-fit screenshot:hidden !p-0'
icon={MenuIcon}
/>
</div>
)}

<div className='gap-y-spacing5 py-spacing5 px-spacing7 relative h-full w-full flex grow flex-col overflow-x-clip overflow-y-auto'>
<CalendarSchedules />
<Divider orientation='horizontal' size='100%' />
EthanL06 marked this conversation as resolved.
Show resolved Hide resolved
<ResourceLinks />
<Divider orientation='horizontal' size='100%' />
{/* <TeamLinks /> */}
<a
href={CRX_PAGES.REPORT}
className='gap-spacing1 flex items-center text-ut-burntorange underline-offset-2 hover:underline'
target='_blank'
rel='noreferrer'
onClick={event => {
event.preventDefault();
openReportWindow();
}}
>
<Text variant='p'>Send us Feedback!</Text>
<OutwardArrowIcon className='h-3 w-3' />
EthanL06 marked this conversation as resolved.
Show resolved Hide resolved
</a>
</div>

<CalendarFooter />
</div>

<div className='h-full min-w-5xl flex flex-grow flex-col overflow-y-auto'>
<CalendarHeader
sidebarOpen={showSidebar}
Expand Down
12 changes: 10 additions & 2 deletions src/views/components/calendar/CalendarFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const handleOpenOptions = async (): Promise<void> => {
*/
export default function CalendarFooter(): JSX.Element {
return (
<footer className='min-w-full w-0 flex items-center justify-between'>
<footer className='px-spacing7 pt-spacing3 min-w-full w-0 flex items-center justify-between bg-white'>
<div className='gap-spacing4 flex'>
<Link className='linkanimate' href='https://www.instagram.com/longhorndevelopers'>
<InstagramIcon className='h-6 w-6 fill-ut-black' />
Expand All @@ -43,7 +43,15 @@ export default function CalendarFooter(): JSX.Element {
<LinkedinIcon className='h-6 w-6 fill-ut-black -mx-0.75' />
</Link>
</div>
<Button variant='single' icon={SettingsIcon} color='ut-black' onClick={handleOpenOptions} />
<div>
<Button
className='h-fit !p-0'
variant='single'
icon={SettingsIcon}
color='ut-black'
onClick={handleOpenOptions}
/>
</div>
</footer>
);
}
Loading