Skip to content

Commit 4b5f7fa

Browse files
hasparussaihaj
andauthored
2025 Code of Conduct page (#2029)
* Allow barebones MDX imports in Server Components * Style Code of Conduct text * Add a barebones hero (pink for now) * Accept subtitle prop in Hero * Add colorScheme=neutral to Hero props * Change colors in neutral Hero * Tweak the placeholder color * Make the stripes green and fix dark mode * Add HeroConfCard * Revert "Add HeroConfCard" This reverts commit a76b3a7. * Update links to point to new CoC page * Add a Hero to Resources page * Reexport Nextra's rehype plugins (remark plugins are already exported) * Extract headings without Nextra * Install the same version of GitHub Slugger as Nextra * Pass ESLint --------- Co-authored-by: Saihajpreet Singh <[email protected]>
1 parent 6fdbedc commit 4b5f7fa

File tree

16 files changed

+400
-56
lines changed

16 files changed

+400
-56
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ module.exports = {
109109
rules: {
110110
"mdx/remark": "error",
111111
"no-unused-expressions": "off",
112+
"react/jsx-no-undef": "off",
112113
},
113114
},
114115
{

next.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ export default withLess(
2727
withNextra({
2828
// reactStrictMode: true, provoke duplicated codemirror editors
2929
webpack(config) {
30+
// #region MDX
31+
const mdxRule = config.module.rules.find(rule =>
32+
rule.test?.test?.(".mdx"),
33+
)
34+
if (mdxRule) {
35+
mdxRule.resourceQuery = {
36+
not: /raw/,
37+
}
38+
}
39+
// Instead of transforming MDX, with ?source we can get
40+
// the raw content to process in a Server Component.
41+
config.module.rules.push({
42+
test: /\.mdx$/i,
43+
resourceQuery: /raw/,
44+
type: "asset/source",
45+
})
46+
// #endregion MDX
47+
48+
// #region SVGs
3049
const fileLoaderRule = config.module.rules.find(rule =>
3150
rule.test?.test?.(".svg"),
3251
)
@@ -62,6 +81,7 @@ export default withLess(
6281
},
6382
},
6483
)
84+
// #endregion SVGs
6585

6686
return config
6787
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"codemirror-graphql": "1.3.2",
3434
"date-fns": "^2.30.0",
3535
"fast-glob": "^3.3.3",
36+
"github-slugger": "2.0.0",
3637
"graphql": "16.10.0",
3738
"gray-matter": "^4.0.3",
3839
"hast-util-to-string": "3.0.1",

patches/[email protected]

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,18 @@ index af0891e3c2084edd326f40e6e18107b193640e0b..885858fa17285fb75649cf0ebd2576d1
99
import { createElement } from "react";
1010
const DEFAULT_COMPONENTS = {
1111
img: (props) => createElement(
12+
diff --git a/package.json b/package.json
13+
index 0625691ebc1d79d7b7d22bb3b001f00a57519772..53d4b0c951a762ae056004789c9aca819e0ade62 100644
14+
--- a/package.json
15+
+++ b/package.json
16+
@@ -20,6 +20,10 @@
17+
"import": "./dist/server/remark-plugins/index.js",
18+
"types": "./dist/server/remark-plugins/index.d.ts"
19+
},
20+
+ "./rehype-plugins": {
21+
+ "import": "./dist/server/rehype-plugins/index.js",
22+
+ "types": "./dist/server/rehype-plugins/index.d.ts"
23+
+ },
24+
"./hooks": {
25+
"import": "./dist/client/hooks/index.js",
26+
"types": "./dist/client/hooks/index.d.ts"

pnpm-lock.yaml

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/conf/2024/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function Page() {
5454
</div>
5555
<div className="flex items-center gap-10">
5656
<svg
57-
className="w-[50%]"
57+
className="w-1/2"
5858
viewBox="0 0 1239 142"
5959
fill="currentColor"
6060
xmlns="http://www.w3.org/2000/svg"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
The Linux Foundation and its project communities are dedicated to providing a harassment-free experience for participants at all of our events, whether they are held in person or virtually. Linux Foundation events are working conferences intended for professional networking and collaboration within the open source community. They exist to encourage the open exchange of ideas and expression and require an environment that recognizes the inherent worth of every person and group. While at Linux Foundation events or related ancillary or social events, any participants, including members, speakers, attendees, volunteers, sponsors, exhibitors, booth staff and anyone else, must not engage in harassment in any form.
2+
3+
This Code of Conduct may be revised at any time by The Linux Foundation and the terms are non-negotiable. Your registration for or attendance at any Linux Foundation event, whether it's held in person or virtually, indicates your agreement to abide by this policy and its terms.
4+
5+
<Callout>
6+
## Expected Behavior
7+
8+
All event participants, whether they are attending an in-person event or a virtual event, are expected to behave in accordance with professional standards, with both this Code of Conduct as well as their respective employer's policies governing appropriate workplace behavior and applicable laws.
9+
</Callout>
10+
11+
## Unacceptable Behavior
12+
13+
Harassment will not be tolerated in any form, whether in person or virtually, including, but not limited to, harassment based on gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age, religion or any other status protected by laws in which the conference or program is being held. Harassment includes the use of abusive, offensive or degrading language, intimidation, stalking, harassing photography or recording, inappropriate physical contact, sexual imagery and unwelcome sexual advances or requests for sexual favors. Any report of harassment at one of our events, whether in person or virtual, will be addressed immediately. Participants asked to stop any harassing behavior are expected to comply immediately. Anyone who witnesses or is subjected to unacceptable behavior should notify a conference organizer at once.
14+
15+
Individuals who participate (or plan to participate) in Linux Foundation events, whether its an in-person event or a virtual event, should conduct themselves at all times in a manner that comports with both the letter and spirit of this policy prohibiting harassment and abusive behavior, whether before, during or after the event. This includes statements made in social media postings, on-line publications, text messages, and all other forms of electronic communication.
16+
17+
Speakers should not use sexual language, images, or any language or images that would constitute harassment as defined above in their talks. Exhibitor booths serve as a platform for presenting businesses and/or projects and should maintain a professional and inclusive presence; therefore, the use of sexualized images, activities, materials, or attire, including costumes and uniforms that contribute to a sexualized environment, is strictly prohibited. Additionally, booths must not be utilized for political campaigning or promoting political causes, including the display or engagement in activities or materials that support such endeavors.
18+
19+
<Callout>
20+
## Consequences of Unacceptable Behavior
21+
22+
If a participant engages in harassing behavior, whether in person or virtually, the conference organizers may take any action they deem appropriate depending on the circumstances, ranging from issuance of a warning to the offending individual to expulsion from the conference with no refund. The Linux Foundation reserves the right to exclude any participant found to be engaging in harassing behavior from participating in any further Linux Foundation events, trainings or other activities.
23+
24+
If a participant (or individual wishing to participate in a Linux Foundation event, in-person and/or virtual), through postings on social media or other online publications or another form of electronic communication, engages in conduct that violates this policy, whether before, during or after a Linux Foundation event, The Linux Foundation may take appropriate corrective action, which could include imposing a temporary or permanent ban on an individual's participation in future Linux Foundation events.
25+
</Callout>
26+
27+
## What To Do If You Witness or Are Subject To Unacceptable Behavior
28+
29+
If you are being harassed, notice that someone else is being harassed, or have any other concerns relating to harassment, please contact a member of the conference staff immediately. You are also encouraged to contact Angela Brown, Senior VP & General Manager of Events, at [[email protected]](mailto:[email protected]).
30+
31+
<Callout>
32+
## Incident Response
33+
34+
Our staff has taken incident response training and responds to harassment reports quickly and thoroughly. As referenced above, if a participant engages in harassing behavior, whether in-person or virtually, the conference organizers may take any action they deem appropriate, ranging from issuance of a warning to the offending individual to expulsion from the conference with no refund, depending on the circumstances. The Linux Foundation reserves the right to exclude any participant found to be engaging in harassing behavior from participating in any further Linux Foundation events, trainings or other activities.
35+
36+
Conference staff will also provide support to victims, including, but not limited to:
37+
- Providing an Escort
38+
- Contacting Hotel/Venue Security or Local Law Enforcement
39+
- Briefing Key Event Staff For Response/Victim Assistance
40+
- And otherwise assisting those experiencing harassment to ensure that they feel safe for the duration of the conference.
41+
</Callout>
42+
43+
## Health and Safety Requirements
44+
45+
It is necessary for all attendees to cooperate and protect one another. For this reason, The Linux Foundation's events may have health and safety requirements (the "Health and Safety Requirements"). The specific requirements may vary from event to event, and will be communicated in writing prior to and during the event.
46+
47+
If an attendee fails to comply with any of the Health and Safety Requirements, The Linux Foundation may (but is not obligated to) take appropriate corrective action, which could include immediate removal from the event and venue without a refund, and/or imposing a temporary or permanent ban on an individual's participation in future Linux Foundation events.
48+
49+
<Callout>
50+
## Pre-Event Concerns
51+
52+
If you are planning to attend an upcoming event, whether in-person or virtually and have concerns regarding another individual who may be present, please contact Angela Brown ([[email protected]](mailto:[email protected])). Precautions will be taken to ensure your comfort and safety, including, but not limited to providing an escort, prepping onsite event staff, keeping victim and harasser from attending the same talks/social events and providing onsite contact cell phone numbers for immediate contact.
53+
</Callout>
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import type { Metadata } from "next"
2+
import clsx from "clsx"
3+
4+
import { Anchor } from "@/app/conf/_design-system/anchor"
5+
import { ServerComponentMarkdown } from "@/app/conf/_components/server-component-markdown"
6+
import { Button } from "@/app/conf/_design-system/button"
7+
8+
import { NavbarPlaceholder } from "../components/navbar"
9+
import { Hero, HeroStripes } from "../components/hero"
10+
import "../resources/prose.css"
11+
12+
import markdown from "./code-of-conduct.mdx?raw"
13+
14+
export const metadata: Metadata = {
15+
title: "Code of Conduct | GraphQLConf 2025",
16+
}
17+
18+
const components = {
19+
a: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {
20+
return (
21+
<Anchor
22+
{...props}
23+
href={props.href ?? ""}
24+
className={clsx(props.className, "typography-link")}
25+
/>
26+
)
27+
},
28+
ul: (props: React.HTMLAttributes<HTMLUListElement>) => {
29+
return <ul {...props} className={clsx(props.className, "-mt-6")} />
30+
},
31+
Callout: (props: React.HTMLAttributes<HTMLDivElement>) => {
32+
return (
33+
<div
34+
{...props}
35+
className={clsx(
36+
props.className,
37+
"gql-prose-inner -mx-4 w-fit border border-neu-300 bg-neu-50 p-4 dark:border-neu-100 dark:bg-neu-50/50 max-md:border-x-0 xl:my-4",
38+
)}
39+
/>
40+
)
41+
},
42+
}
43+
44+
export default function ResourcesPage() {
45+
return (
46+
<>
47+
<NavbarPlaceholder className="top-0 bg-neu-100 before:bg-white/30 dark:bg-[#181A12] dark:before:bg-blk/40" />
48+
<Hero
49+
pageName="Code of conduct"
50+
subtitle="The Linux Foundation"
51+
colorScheme="neutral"
52+
stripes={
53+
<HeroStripes
54+
className="-scale-x-100 dark:data-[loaded=true]:opacity-80"
55+
evenClassName="bg-[linear-gradient(180deg,hsl(var(--color-sec-light))_0%,hsl(319deg_100%_90%_/_0.2)_100%)] dark:bg-[linear-gradient(180deg,hsl(var(--color-sec-dark))_0%,hsl(var(--color-neu-100))_100%)]"
56+
oddClassName="bg-[linear-gradient(180deg,hsl(319deg_100%_90%_/_0.2)_0%,hsl(var(--color-sec-base))_100%)] dark:bg-[linear-gradient(180deg,hsl(var(--color-sec-dark))_0%,hsl(var(--color-neu-0))_100%)]"
57+
/>
58+
}
59+
>
60+
<Button
61+
href="https://events.linuxfoundation.org/about/code-of-conduct/"
62+
className="mt-[18px] w-fit"
63+
>
64+
See on The Linux Foundation
65+
</Button>
66+
</Hero>
67+
<main className="gql-all-anchors-focusable gql-conf-navbar-strip text-neu-900 before:bg-white/40 before:dark:bg-blk/30">
68+
<div className="gql-conf-container gql-conf-section xl:mb-16 xl:mt-8">
69+
<ServerComponentMarkdown
70+
markdown={markdown}
71+
extractToc
72+
render={({ mdx, data }) => {
73+
return (
74+
<div className="gql-prose md:max-lg:[&>:not(:first-child)]:mx-4">
75+
<aside className="gql-sticky-aside row-span-8 -mt-1 w-fit sm:max-xl:grid sm:max-xl:grid-cols-2 sm:max-xl:bg-neu-100 sm:max-xl:p-4 dark:sm:max-xl:bg-neu-50/50 xl:max-w-[284px]">
76+
{data.toc.map(({ value, id, depth }) => (
77+
<a
78+
key={id}
79+
data-depth={depth}
80+
className="raw typography-menu block p-4 py-2 text-neu-800 hover:bg-neu-100 hover:text-neu-900 dark:hover:bg-neu-50 max-xl:-ml-4"
81+
style={{
82+
paddingLeft: (depth - 2) * 16 + 16,
83+
}}
84+
href={`#${id}`}
85+
>
86+
{value}
87+
</a>
88+
))}
89+
</aside>
90+
{mdx({ components })}
91+
</div>
92+
)
93+
}}
94+
/>
95+
</div>
96+
</main>
97+
</>
98+
)
99+
}

src/app/conf/2025/components/call-for-proposals.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function NotesTab() {
104104
All speakers are required to adhere to our{" "}
105105
<Link
106106
className="typography-link dark:text-neu-50"
107-
href="/conf/2025/resources/#code-of-conduct"
107+
href="/conf/2025/code-of-conduct"
108108
>
109109
Code of Conduct
110110
</Link>

0 commit comments

Comments
 (0)