-
Notifications
You must be signed in to change notification settings - Fork 6
Improvements to donate page #22
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
Open
oohwooh
wants to merge
6
commits into
master
Choose a base branch
from
improve-donate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
abb902d
fix line height
oohwooh 72e0f38
initial draft
oohwooh 025efbe
rework things a bit and remove exceptionally verbose comments
oohwooh 96f1639
fix misquote
oohwooh 785fa04
some more small changes and end everything with callback
oohwooh 1ce54c8
minor styling changes on graphs
oohwooh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| import * as m from "@codeday/i18n/messages"; | ||
| import { Box, Grid, Text } from "@codeday/topo/Atom"; | ||
| import { useColorMode } from "@codeday/topo/Theme"; | ||
| import React from "react"; | ||
|
|
||
| // Federal Reserve Bank of New York, "Labor Market for Recent College Graduates." | ||
| const CS_UNEMPLOYMENT_BY_YEAR = [ | ||
| { year: "2024", value: 3.9}, | ||
| { year: "2025", value: 6.1 }, | ||
| { year: "2026", value: 7.0 }, | ||
| ]; | ||
| const ALL_MAJORS_REFERENCE = { year: "2026", value: 4.2, label: "All majors" }; | ||
| const MAX_VALUE = Math.max( | ||
| ...CS_UNEMPLOYMENT_BY_YEAR.map((d) => d.value), | ||
| ALL_MAJORS_REFERENCE.value, | ||
| ); | ||
| const CHART_HEIGHT = 160; | ||
|
|
||
| function Bar({ value, emphasize }: { value: number; emphasize?: boolean }) { | ||
| const { colorMode } = useColorMode(); | ||
| return ( | ||
| <Box | ||
| w="100%" | ||
| roundedTop="md" | ||
| height={`${(value / MAX_VALUE) * CHART_HEIGHT}px`} | ||
| bg={emphasize ? "current.primary" : colorMode === "light" ? "gray.300" : "gray.700"} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default function EmploymentChart(props: any) { | ||
| const mostRecentYear = CS_UNEMPLOYMENT_BY_YEAR[CS_UNEMPLOYMENT_BY_YEAR.length - 1].year; | ||
| const referenceTop = | ||
| CHART_HEIGHT - (ALL_MAJORS_REFERENCE.value / MAX_VALUE) * CHART_HEIGHT; | ||
|
|
||
| return ( | ||
| <Box {...props}> | ||
| <Text mb={4} fontSize="md" color="current"> | ||
| {m.www_donate_chart_employment_heading()} | ||
| </Text> | ||
|
|
||
| <Box> | ||
| <Grid | ||
| templateColumns={`repeat(${CS_UNEMPLOYMENT_BY_YEAR.length}, 1fr)`} | ||
| gap={4} | ||
| pb={1} | ||
| > | ||
| {CS_UNEMPLOYMENT_BY_YEAR.map((d) => ( | ||
| <Text key={d.year} mb={0} fontSize="sm" fontWeight="bold" textAlign="center"> | ||
| {d.value}% | ||
| </Text> | ||
| ))} | ||
| </Grid> | ||
|
|
||
| <Box | ||
| position="relative" | ||
| height={`${CHART_HEIGHT}px`} | ||
| borderBottomWidth={2} | ||
| borderColor="current.border" | ||
| > | ||
| <Grid | ||
| templateColumns={`repeat(${CS_UNEMPLOYMENT_BY_YEAR.length}, 1fr)`} | ||
| gap={4} | ||
| h="100%" | ||
| alignItems="end" | ||
| > | ||
| {CS_UNEMPLOYMENT_BY_YEAR.map((d) => ( | ||
| <Bar key={d.year} value={d.value} emphasize={d.year === mostRecentYear} /> | ||
| ))} | ||
| </Grid> | ||
|
|
||
| <Box | ||
| position="absolute" | ||
| left={0} | ||
| right={0} | ||
| top={`${referenceTop}px`} | ||
| borderTopWidth={2} | ||
| borderStyle="dashed" | ||
| borderColor="current.text" | ||
| > | ||
| <Text | ||
| position="absolute" | ||
| right={0} | ||
| top={-5} | ||
| mb={0} | ||
| fontSize="xs" | ||
| fontWeight="bold" | ||
| color="current.text" | ||
| whiteSpace="nowrap" | ||
| > | ||
| {ALL_MAJORS_REFERENCE.label}: {ALL_MAJORS_REFERENCE.value}% | ||
| </Text> | ||
| </Box> | ||
| </Box> | ||
|
|
||
| <Grid | ||
| templateColumns={`repeat(${CS_UNEMPLOYMENT_BY_YEAR.length}, 1fr)`} | ||
| gap={4} | ||
| pt={1} | ||
| > | ||
| {CS_UNEMPLOYMENT_BY_YEAR.map((d) => ( | ||
| <Text | ||
| key={d.year} | ||
| mb={0} | ||
| fontSize="sm" | ||
| fontWeight={d.year === mostRecentYear ? "bold" : "normal"} | ||
| textAlign="center" | ||
| > | ||
| {d.year} | ||
| </Text> | ||
| ))} | ||
| </Grid> | ||
| </Box> | ||
|
|
||
| <Text mt={4} mb={0} fontSize="xs" color="current.textLight"> | ||
| {m.www_donate_chart_employment_source()} | ||
| </Text> | ||
| </Box> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import * as m from "@codeday/i18n/messages"; | ||
| import { Box, Grid, Text } from "@codeday/topo/Atom"; | ||
| import { useColorMode } from "@codeday/topo/Theme"; | ||
| import React from "react"; | ||
|
|
||
| // Veris Insights employer survey (reported by Fortune) | ||
| const SHORTLIST_ONLY_BY_YEAR = [ | ||
| { year: "2022", value: 17 }, | ||
| { year: "2025", value: 26 }, | ||
| ]; | ||
| const MAX_VALUE = Math.max(...SHORTLIST_ONLY_BY_YEAR.map((d) => d.value)); | ||
| const CHART_HEIGHT = 160; | ||
|
|
||
| function Bar({ value, emphasize }: { value: number; emphasize?: boolean }) { | ||
| const { colorMode } = useColorMode(); | ||
| return ( | ||
| <Box | ||
| w="100%" | ||
| roundedTop="md" | ||
| height={`${(value / MAX_VALUE) * CHART_HEIGHT}px`} | ||
| bg={emphasize ? "current.primary" : colorMode === "light" ? "gray.300" : "gray.700"} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default function PrestigeGapChart(props: any) { | ||
| const mostRecentYear = SHORTLIST_ONLY_BY_YEAR[SHORTLIST_ONLY_BY_YEAR.length - 1].year; | ||
| return ( | ||
| <Box {...props}> | ||
| <Text mb={4} fontSize="md" color="current"> | ||
| {m.www_donate_chart_prestige_heading()} | ||
| </Text> | ||
|
|
||
| <Box> | ||
| <Grid templateColumns={`repeat(${SHORTLIST_ONLY_BY_YEAR.length}, 1fr)`} gap={4} pb={1}> | ||
| {SHORTLIST_ONLY_BY_YEAR.map((d) => ( | ||
| <Text key={d.year} mb={0} fontSize="sm" fontWeight="bold" textAlign="center"> | ||
| {d.value}% | ||
| </Text> | ||
| ))} | ||
| </Grid> | ||
|
|
||
| <Grid | ||
| templateColumns={`repeat(${SHORTLIST_ONLY_BY_YEAR.length}, 1fr)`} | ||
| gap={4} | ||
| h={`${CHART_HEIGHT}px`} | ||
| alignItems="end" | ||
| borderBottomWidth={2} | ||
| borderColor="current.border" | ||
| > | ||
| {SHORTLIST_ONLY_BY_YEAR.map((d) => ( | ||
| <Bar key={d.year} value={d.value} emphasize={d.year === mostRecentYear} /> | ||
| ))} | ||
| </Grid> | ||
|
|
||
| <Grid templateColumns={`repeat(${SHORTLIST_ONLY_BY_YEAR.length}, 1fr)`} gap={4} pt={1}> | ||
| {SHORTLIST_ONLY_BY_YEAR.map((d) => ( | ||
| <Text | ||
| key={d.year} | ||
| mb={0} | ||
| fontSize="sm" | ||
| fontWeight={d.year === mostRecentYear ? "bold" : "normal"} | ||
| textAlign="center" | ||
| > | ||
| {d.year} | ||
| </Text> | ||
| ))} | ||
| </Grid> | ||
| </Box> | ||
|
|
||
| <Text mt={4} mb={0} fontSize="xs" color="current.textLight"> | ||
| {m.www_donate_chart_prestige_source()} | ||
| </Text> | ||
| </Box> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import { Box, Grid, Image, Text, VStack } from "@codeday/topo/Atom"; | ||
| import React from "react"; | ||
|
|
||
|
|
||
| export interface AlumniStory { | ||
| name: string; | ||
| photoUrl: string; | ||
| thenLabel: string; | ||
| nowLabel: string; | ||
| quote: string; | ||
| } | ||
|
|
||
| export const ALUMNI_STORIES: AlumniStory[] = [ | ||
| { | ||
| name: "Luiza Cartaxo", | ||
| photoUrl: | ||
| "https://f2.codeday.org/d5pti1xheuyu/4ZIbKznpY100CznvLxg0ob/83f81f937519a2243577d68872f6e771/Maria-Luiza-Cartaxo-Picture-768x1024.jpeg?h=320&fit=fill&w=320", | ||
| thenLabel: "Student at Bellevue College", | ||
| nowLabel: "Software Engineer II at Boeing", | ||
| quote: | ||
| "As an international student in a programming major, you guys totally helped me to start my wonderful career path! In a three years degree, I had you guys as my first experience, Meta as my second, and Microsoft as my third, and this last one gave me a full time return offer.", | ||
| }, | ||
| { | ||
| name: "Kelly Dong", | ||
| photoUrl: | ||
| "https://f2.codeday.org/d5pti1xheuyu/1cEMO2exWuCteESR5E0dzf/7a80d8c52958c77257f6be693223522c/Kelly_Dong.jpeg?h=320&fit=fill&w=320", | ||
| thenLabel: "Student at New York City College", | ||
| nowLabel: "Software Engineer at BNY", | ||
| quote: | ||
| "I loved being able to work as a team and gain real world experience about coding but at the same time also having the opportunity to learn something new.", | ||
| }, | ||
| { | ||
| name: "Daniel Lobaton", | ||
| photoUrl: | ||
| "https://f2.codeday.org/d5pti1xheuyu/50CgDg3alYgGekfYS3lLmd/b1be3c8a0f56fef878aa1ec5c8a21992/Daniel_Lobaton.jpg?h=320&fit=fill&w=320", | ||
| thenLabel: "Student at University of Florida", | ||
| nowLabel: "Software Engineer at Microsoft", | ||
| quote: | ||
| "Being a Venezuelan immigrant, Labs was the first time that I got true exposure to a community of tech people that I could rely on. Fast forward a couple of years and now I'm three and a half months away from graduating college and have a job as a SWE at the Microsoft HQ right after I graduate.", | ||
| }, | ||
| ]; | ||
|
|
||
|
|
||
| export default function StoryList(props: any) { | ||
| return ( | ||
| <VStack> | ||
| {ALUMNI_STORIES.map((story) => ( | ||
| <Box key={story.name} mb={8}> | ||
| <Grid templateColumns="auto 1fr" gap={4} alignItems="center" mb={3}> | ||
| <Box | ||
| rounded="full" | ||
| overflow="hidden" | ||
| w={16} | ||
| h={16} | ||
| backgroundColor="gray.200" | ||
| flexShrink={0} | ||
| > | ||
| <Image src={story.photoUrl} alt={story.name} w="100%" /> | ||
| </Box> | ||
| <Box> | ||
| <Text mb={0} fontWeight="bold"> | ||
| {story.name} | ||
| </Text> | ||
| <Text mb={0} fontSize="sm" color="current.textLight"> | ||
| {story.thenLabel} | ||
| </Text> | ||
| <Text mb={0} fontSize="sm" fontWeight="bold"> | ||
| Now: {story.nowLabel} | ||
| </Text> | ||
| </Box> | ||
| </Grid> | ||
| <Text fontSize="sm" fontStyle="italic" color="current.textLight"> | ||
| “{story.quote}” | ||
| </Text> | ||
| </Box> | ||
| ))} | ||
| </VStack> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
apps/www/src/components/Page/index.tsx:69,minimalmakesMenucontainfalse, butHeaderalways renders its mobile hamburger. On/donateat mobile widths, clicking it opens an otherwise empty full-screen menu (only the logo and close control), leaving a visible non-functional navigation control.Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.