Skip to content

Commit

Permalink
feat: add newly announced 2024 orgs (nishantwrp#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantwrp authored Feb 21, 2024
1 parent 984f5fe commit f93c849
Show file tree
Hide file tree
Showing 7 changed files with 4,918 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/compile-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
nameFilters,
} = require("./filters")

const YEARS = [2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023]
const YEARS = [2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024]

const getDataPath = year => {
return `api/data/${year}.json`
Expand Down
4,873 changes: 4,873 additions & 0 deletions api/data/2024.json

Large diffs are not rendered by default.

30 changes: 27 additions & 3 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ components:
$ref: "#/components/schemas/OrganizationYear"
2023:
$ref: "#/components/schemas/OrganizationYear"
2024:
$ref: "#/components/schemas/OrganizationYear"
OrganizationSingleYear:
type: object
required:
Expand Down Expand Up @@ -182,7 +184,7 @@ paths:
operationId: orgsAll
summary: All Organizations
description: |
Get the data of all the organizations that participated in Google Summer of Code from 2016 to 2023.
Get the data of all the organizations that participated in Google Summer of Code from 2016 to 2024.
responses:
'200':
description: OK
Expand All @@ -192,6 +194,28 @@ paths:
type: array
items:
$ref: "#/components/schemas/Organizations"
/2024.json:
get:
operationId: orgs2024
summary: 2024 Organizations
description: |
Get the data of all the organizations that participated in Google Summer of Code 2024.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
year:
type: number
archive_url:
type: string
organizations:
type: array
items:
$ref: "#/components/schemas/OrganizationSingleYear"
/2023.json:
get:
operationId: orgs2023
Expand All @@ -213,7 +237,7 @@ paths:
organizations:
type: array
items:
$ref: "#/components/schemas/OrganizationSingleYear"
$ref: "#/components/schemas/OrganizationSingleYear"
/2022.json:
get:
operationId: orgs2022
Expand All @@ -235,7 +259,7 @@ paths:
organizations:
type: array
items:
$ref: "#/components/schemas/OrganizationSingleYear"
$ref: "#/components/schemas/OrganizationSingleYear"
/2021.json:
get:
operationId: orgs2021
Expand Down
4 changes: 2 additions & 2 deletions src/components/notification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const Notification = () => {
return (
<Message positive style={style}>
<Message.Header>
Organizations participating in GSoC 2023 have been announced. View them
Organizations participating in GSoC 2024 have been announced. View them
in the official site{" "}
<a
href="https://summerofcode.withgoogle.com/programs/2023/organizations"
href="https://summerofcode.withgoogle.com/programs/2024/organizations"
target="_blank"
>
<u>here</u>
Expand Down
10 changes: 5 additions & 5 deletions src/components/org-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const OrgInfo = ({ data }) => {
return <span className="org-info-topic">{topic}</span>
})

// const isParticipatingIn2023 = "2023" in data.years
const isParticipatingIn2024 = "2024" in data.years

return (
<div className="org-info-container">
Expand All @@ -53,16 +53,16 @@ const OrgInfo = ({ data }) => {
}}
></div>
</div>
{/* {isParticipatingIn2023 && (
{isParticipatingIn2024 && (
<Message color="orange" style={{ margin: "1%" }}>
<Message.Header>
{data.name} is participating in{" "}
<OutboundLink
href={data.years["2023"].projects_url}
href={data.years["2024"].projects_url}
rel="noreferrer"
target="_blank"
>
<u>GSoC 2023</u>
<u>GSoC 2024</u>
</OutboundLink>
. View the{" "}
<OutboundLink
Expand All @@ -87,7 +87,7 @@ const OrgInfo = ({ data }) => {
for this organization.
</Message.Header>
</Message>
)} */}
)}
<div className="org-info-site-container">
<OutboundLink href={data.url} rel="noreferrer" target="_blank">
<Button icon labelPosition="left" color="orange">
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Sidebar = ({ config, showFilters }) => {
<div className="sidebar-content-filters">
<Filter
name="shortcuts"
choices={[{ name: "First-time organizations", frequency: 20 }]}
choices={[{ name: "First-time organizations", frequency: 34 }]}
sortBy="frequency"
/>
<Filter name="years" choices={years} sortBy="name" order="desc" />
Expand Down
10 changes: 9 additions & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "./index.css"
import Layout from "../layouts/layout"
import OrgCard from "../components/org-card"
import SEO from "../components/seo"
import Notification from "../components/notification"
import { Grid } from "semantic-ui-react"
import { useAppSelector, useAppDispatch } from "../store"
import { getSearch } from "../store/search"
Expand Down Expand Up @@ -113,7 +114,7 @@ const getFilteredOrganizations = (organizations, searchQuery, filters) => {
let newFilteredOrganizations = []
for (const organization of filteredOrganizations) {
const orgYears = Object.keys(organization.years)
if (orgYears.length == 1 && orgYears[0] == 2023) {
if (orgYears.length == 1 && orgYears[0] == 2024) {
newFilteredOrganizations.push(organization)
}
}
Expand Down Expand Up @@ -215,6 +216,9 @@ const IndexPage = ({ data }) => {
return (
<Layout>
<SEO title={"Home"} meta={meta} />
<Grid className="index-org-cards-grid">
<Notification />
</Grid>
<div style={{ marginTop: "1rem", textAlign: "center" }}>
<a className="ui orange label">
{filteredOrganizations.length} results
Expand Down Expand Up @@ -293,6 +297,10 @@ export const query = graphql`
num_projects
projects_url
}
_2024 {
num_projects
projects_url
}
}
}
}
Expand Down

0 comments on commit f93c849

Please sign in to comment.