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: Onboarding #265

Merged
merged 23 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
54a72e2
set up a modal for onboarding
SheepTester Sep 18, 2024
7e2c8aa
Show steps and progress bar
SheepTester Sep 22, 2024
d24040e
Change design of buttons
SheepTester Sep 22, 2024
e0ac0b8
Create onboarding page
SheepTester Sep 22, 2024
327ab82
Add animations for steps 1 and 5
SheepTester Sep 22, 2024
551e9bd
temporary images for intro
SheepTester Sep 22, 2024
f0b2381
add rainbow bar to top of page previews
SheepTester Sep 23, 2024
28274cd
Quiet navbar, perhaps?
SheepTester Sep 23, 2024
282f5e2
address some feedback
SheepTester Sep 28, 2024
89fce1d
Move event list to its own component
SheepTester Sep 29, 2024
ef61648
separate event filter into its own component
SheepTester Sep 29, 2024
58532dd
try annotating badges on event card
SheepTester Sep 29, 2024
60d1df8
Merge branch 'main' into feature/onboarding
SheepTester Sep 29, 2024
667d390
Merge branch 'feature/onboarding' of https://github.com/acmucsd/membe…
SheepTester Sep 28, 2024
b5996de
store collection
SheepTester Sep 29, 2024
2d42ed6
Combine Store and Events components
SheepTester Sep 29, 2024
c2f963e
Make annotations look nicer
SheepTester Sep 29, 2024
529a08f
Leaderboard rows
SheepTester Sep 29, 2024
620d083
start onboarding after checking in
SheepTester Sep 29, 2024
50a8dbb
fix type error
SheepTester Sep 29, 2024
5119178
un-component EventList so the diff is cleaner
SheepTester Sep 29, 2024
177d095
move EventsPageProps back where it used to be
SheepTester Sep 29, 2024
490ef60
Remove periods and exclamation marks from onboarding headings
SheepTester Sep 30, 2024
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
4 changes: 4 additions & 0 deletions public/assets/acm-logos/communities/ai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/acm-logos/communities/cyber.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/acm-logos/communities/design.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/acm-logos/communities/hack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions src/components/common/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Typography from '@/components/common/Typography';
import { PropsWithChildren } from 'react';
import style from './style.module.scss';

Expand All @@ -11,6 +12,11 @@ interface IProps {
className?: string;
}

/**
* Equivalent to
* {@link https://www.figma.com/design/YQjQ1ruLtMICqnzzxBXxOL/ACM-Portal---Onboarding-Screens?node-id=158-1208&t=GsDtnYW4YBMPSN8C-4|"Desktop and mobile buttons"}
* in the Figma
*/
const Button = (props: PropsWithChildren<IProps>) => {
const {
variant = 'primary',
Expand All @@ -20,7 +26,7 @@ const Button = (props: PropsWithChildren<IProps>) => {
size = 'default',
onClick,
children,
className,
className = '',
} = props;

return (
Expand All @@ -33,7 +39,9 @@ const Button = (props: PropsWithChildren<IProps>) => {
data-destructive={destructive}
data-size={size}
>
{children}
<Typography variant="h5/medium" component="span">
{children}
</Typography>
</button>
);
};
Expand Down
31 changes: 8 additions & 23 deletions src/components/common/Button/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

.button {
align-items: center;
background-color: #62b0ff;
background-color: var(--theme-primary-2);
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
color: #fff;
color: var(--theme-background);
cursor: pointer;
display: flex;
height: auto;
justify-content: center;
min-height: 2rem;
padding: 4px 1rem;
transition: 0.3s ease-in-out transform;

padding: 4px 1.5rem;
width: fit-content;

&[data-size='default'] {
Expand All @@ -22,24 +19,20 @@

&[data-size='small'] {
min-height: 2rem;
padding: 4px 1rem;
}

&[data-variant='primary'] {
background-color: #62b0ff;
border: 1px solid #fff;
color: #fff;

&[data-destructive='true'] {
background-color: #ef626c;
border: 1px solid #fff;
color: #fff;
}
}

&[data-variant='secondary'] {
background-color: #fff;
border: 1px solid #62b0ff;
color: #62b0ff;
background-color: var(--theme-elevated-background);
border: 1px solid var(--theme-elevated-stroke);
color: var(--theme-text-on-background-1);

&[data-destructive='true'] {
background-color: #fff;
Expand All @@ -48,16 +41,8 @@
}
}

&:hover {
transform: scale(1.04);

&:disabled {
cursor: wait;
transform: scale(1);
}
}

&:disabled {
background-color: vars.$disabled !important;
cursor: default;
}
}
5 changes: 4 additions & 1 deletion src/components/common/LinkButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Typography from '@/components/common/Typography';
import type { URL } from '@/lib/types';
import Link from 'next/link';
import { PropsWithChildren } from 'react';
Expand All @@ -21,7 +22,9 @@ const LinkButton = (props: PropsWithChildren<IProps>) => {
data-size={size}
href={href}
>
{children}
<Typography variant="h5/medium" component="span">
{children}
</Typography>
</Link>
);
};
Expand Down
32 changes: 9 additions & 23 deletions src/components/common/LinkButton/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

.button {
align-items: center;
background-color: #62b0ff;
background-color: var(--theme-primary-2);
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
color: #fff;
color: var(--theme-background);
cursor: pointer;
display: flex;
height: auto;
justify-content: center;
min-height: 2rem;
padding: 4px 1rem;
transition: 0.3s ease-in-out transform;

padding: 4px 1.5rem;
width: fit-content;

&[data-size='default'] {
Expand All @@ -21,24 +19,20 @@

&[data-size='small'] {
min-height: 2rem;
padding: 4px 1rem;
}

&[data-variant='primary'] {
background-color: #62b0ff;
border: 1px solid #fff;
color: #fff;

&[data-destructive='true'] {
background-color: #ef626c;
border: 1px solid #fff;
color: #fff;
}
}

&[data-variant='secondary'] {
background-color: #fff;
border: 1px solid #62b0ff;
color: #62b0ff;
background-color: var(--theme-elevated-background);
border: 1px solid var(--theme-elevated-stroke);
color: var(--theme-text-on-background-1);

&[data-destructive='true'] {
background-color: #fff;
Expand All @@ -47,16 +41,8 @@
}
}

&:hover {
transform: scale(1.04);

&:disabled {
cursor: wait;
transform: scale(1);
}
}

&:disabled {
background-color: vars.$disabled !important;
cursor: default;
}
}
21 changes: 14 additions & 7 deletions src/components/layout/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import styles from './style.module.scss';

interface NavbarProps {
accessType?: UserAccessType;
quiet?: boolean;
}
const Navbar = ({ accessType }: NavbarProps) => {
const Navbar = ({ accessType, quiet }: NavbarProps) => {
SheepTester marked this conversation as resolved.
Show resolved Hide resolved
const size = useWindowSize();
const headerRef = useRef<HTMLHeadElement>(null);

Expand Down Expand Up @@ -50,14 +51,20 @@ const Navbar = ({ accessType }: NavbarProps) => {
if (!accessType) {
return (
<header className={styles.header}>
<div className={styles.content}>
<Link href={config.homeRoute} className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
<span className={styles.headerTitle}>Membership Portal</span>
</Link>
<div className={`${styles.content} ${quiet ? styles.quiet : ''}`}>
{quiet ? (
<span className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
</span>
) : (
<Link href={config.homeRoute} className={styles.navLeft}>
<Image src={LightModeLogo} alt="ACM General Logo" width={48} height={48} />
<span className={styles.headerTitle}>Membership Portal</span>
</Link>
)}
<ThemeToggle />
</div>
<hr className={`${styles.wainbow} ${styles.loggedOut}`} />
{!quiet ? <hr className={`${styles.wainbow} ${styles.loggedOut}`} /> : null}
</header>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/layout/Navbar/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
width: 100%;
z-index: 20;

&.quiet {
border-bottom: 1px solid var(--theme-elevated-stroke);
height: vars.$header-height;
}

.toggleIcon {
background-color: inherit;
display: none;
Expand Down Expand Up @@ -64,7 +69,6 @@

.navLeft {
align-items: center;
cursor: pointer;
display: flex;
gap: 1.25rem;
height: 100%;
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/Navbar/style.module.scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type Styles = {
mobileSwitch: string;
navLeft: string;
portalLinks: string;
quiet: string;
toggleIcon: string;
wainbow: string;
};
Expand Down
5 changes: 3 additions & 2 deletions src/components/layout/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import styles from './style.module.scss';

interface LayoutProps {
accessType?: UserAccessType;
quietNavbar?: boolean;
}

const PageLayout = ({ accessType, children }: PropsWithChildren<LayoutProps>) => (
const PageLayout = ({ accessType, quietNavbar, children }: PropsWithChildren<LayoutProps>) => (
<>
<Navbar accessType={accessType} />
<Navbar accessType={accessType} quiet={quietNavbar} />
<main className={styles.content}>{children}</main>
</>
);
Expand Down
Loading