Skip to content

Commit

Permalink
Merge pull request #1620 from codeforboston/main
Browse files Browse the repository at this point in the history
PROD Deploy 9/11
  • Loading branch information
Mephistic authored Sep 11, 2024
2 parents 4b814c2 + 0141a9f commit 313f72a
Show file tree
Hide file tree
Showing 25 changed files with 444 additions and 174 deletions.
13 changes: 13 additions & 0 deletions components/Faq/FaqQandAButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ export const FaqQandAButton = ({ question, answer }: faqQandAProps) => {

useEffect(() => {}, [open])

let supportLink = null

{
question == "How can I support MAPLE?"
? (supportLink = (
<a href="https://www.mapletestimony.org/about/support-maple">
{" this page"}
</a>
))
: null
}

return (
<>
<a
Expand All @@ -30,6 +42,7 @@ export const FaqQandAButton = ({ question, answer }: faqQandAProps) => {
<Collapse in={open}>
<p id="example-collapse-text" className={`mt-3 mb-0`}>
{answer}
{supportLink}
</p>
</Collapse>
</>
Expand Down
6 changes: 3 additions & 3 deletions components/Faq/faqContent.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@
"qAndA": [
{
"question": "Who is behind MAPLE?",
"answer": "We are a collective of open source developers, legal scholars, and policy analysts & advocates seeking to leverage digital technology to improve our capacity and ability to self-govern. The MAPLE platform is a project of the NuLawLab of Northeastern University developed with Code for Boston. We are volunteer-led and operate as a nonprofit project of the 501c3 organization OpenCollective Foundation."
"answer": "We are a collective of open source developers, legal scholars, and policy analysts & advocates seeking to leverage digital technology to improve our capacity and ability to self-govern. The MAPLE platform is a project of the NuLawLab of Northeastern University developed with Code for Boston. We are volunteer-led and operate as an initiative for Partners In Democracy - Education, a 501(c)(3) organization."
},
{
"question": "How can I support MAPLE?",
"answer": "There are lots of ways to support MAPLE! Please visit this page for details on how to help MAPLE grow, share feedback, volunteer with us, or even contribute financially."
"answer": "There are lots of ways to support MAPLE! For details on how to help MAPLE grow, share feedback, volunteer with us, or even contribute financially, please visit "
},
{
"question": "Who do I contact to learn more?",
"answer": "You can reach our volunteer leadership by email at info@mapletestimony.org."
"answer": "You can reach our volunteer leadership by email at admin@mapletestimony.org."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ const OurMissionCardContent = () => {
<Row>
<Col
className={`p-3 fs-6 fs-sm-5 tracking-tight text-start lh-sm pt-4 pb-3 pb-sm-4`}
>
<p className="text-center">{t("mission.callout")}</p>
</Col>
></Col>
</Row>
<Row>
<Col>
Expand All @@ -156,29 +154,6 @@ const OurMissionCardContent = () => {
</Col>
</Row>

<Row className="align-items-end mt-5">
<Col lg={4} className="text-lg-center text-start pb-0">
<StepsImage
fluid
src="/step-1.svg"
alt="step 1 of the legislative process"
/>
</Col>
<Col lg={4} className="text-lg-center text-end pb-0">
<StepsImage
fluid
src="/step-2.svg"
alt="step 2 of the legislative process"
/>
</Col>
<Col lg={4} className="text-lg-center text-start ps-lg-0">
<StepsImage
fluid
src="/step-3.svg"
alt="step 3 of the legislative process"
/>
</Col>
</Row>
{!authenticated && (
<>
<Row className="text-center">
Expand Down
16 changes: 6 additions & 10 deletions components/OurPartnersCardContent/OurPartnersCardContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Row, Col } from "../bootstrap"
import { useTranslation } from "next-i18next"
import Image from "react-bootstrap/Image"
import { Row, Col } from "../bootstrap"

const NuLawLabCardContent = () => {
return (
Expand Down Expand Up @@ -93,22 +94,17 @@ const CodeForBostonCardContent = () => {
}

const OpenCollectiveContent = () => {
const { t } = useTranslation("common")

return (
<>
<Row className="mb-3">
<Col className="text-center align-self-center" md={3}>
<Image
fluid
src="/open_collective_logo.png"
alt="open_collective_logo"
/>
<Image fluid src="/pid.png" alt="partners in democracy logo" />
</Col>
<Col className="align-self-center" md={9}>
<p className="lh-sm tracking-wide fs-5 pt-4 pt-md-0">
MAPLE is a fiscally sponsored initiative of the 501(c)(3), the Open
Collective Foundation (OCF). You can see a full list of our donors
and expenditures on our Open Collective webpage. You can also join
the list and make a donation through the sit.
{t("partners.pid")}
</p>
</Col>
</Row>
Expand Down
8 changes: 4 additions & 4 deletions components/OurTeam/AdvisoryBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const AdvisoryBoard = () => {
<Col className="my-3">
<SectionContainer className="py-1">
<MemberItem
name="Danielle Allen"
descr="Danielle is the James Bryant Conant University Professor at Harvard University, Director of the Allen Lab for Democracy Renovation at Harvard Kennedy School's Ash Center for Democratic Governance and Innovation, and President of Partners in Democracy. She is a professor of political philosophy, ethics, and public policy. She is also a seasoned nonprofit leader, democracy advocate, tech ethicist, distinguished author, and mom."
name="John Griffin"
descr="John Griffin is the Managing Partner for Strategy at Partners in Democracy. He has spent a decade working in Massachusetts policy and politics, including as Massachusetts Policy Director at Democrats for Education Reform. John holds a Master in Public Policy degree from the Harvard Kennedy School."
/>
<Divider />
<MemberItem
Expand All @@ -37,8 +37,8 @@ export const AdvisoryBoard = () => {
/>
<Divider />
<MemberItem
name="Beth Noveck"
descr="Beth Simone Noveck is a professor at Northeastern University, where she directs the Burnes Center for Social Change and its partner project, The Governance Lab (The GovLab) and its MacArthur Research Network on Opening Governance. The author of Solving Public Problems: How to Fix Our Government and Change Our World (Yale Press 2021), named a Best Book of 2021 by Stanford Social Innovation Review, she is a member of the faculty at Northeastern’s Institute for Experiential AI. New Jersey governor Phil Murphy appointed her as the state’s first Chief Innovation Officer and Chancellor Angela Merkel named her to her Digital Council in 2018."
name="David Fields"
descr="David Fields, Ph.D., is Professor of the Practice within the Graduate School of Education at Northeastern University and Senior Fellow with The Burnes Center for Social Change. He brings over 20 years of higher education experience building, launching, and scaling industry aligned programs. At the Burnes Center, his work includes supporting AI for Impact, and its InnovateMA co-op program in partnership with the Commonwealth of Massachusetts."
/>
<Divider />
<MemberItem
Expand Down
26 changes: 19 additions & 7 deletions components/OurTeam/Partners.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTranslation } from "next-i18next"
import styled from "styled-components"
import AboutPagesCard from "../AboutPagesCard/AboutPagesCard"
import { Col, Container, Row } from "../bootstrap"
Expand All @@ -9,32 +10,43 @@ import {
import { PageTitle, PageDescr } from "./CommonComponents"

export const OurPartners = () => {
const { t } = useTranslation("common")

return (
<Container>
<Row>
<Col>
<PageTitle>Our Partners</PageTitle>
<PageTitle>{t("partners.header")}</PageTitle>
</Col>
</Row>
<Row>
<Col className="py-3">
<PageDescr>
The project is developed in partnership between the NuLawLab and
scholars at{" "}
{t("partners.desc1")}
<StyleLink
href="https://www.nulawlab.org"
target="_blank"
rel="noopener noreferrer"
>
{" "}
{t("partners.desc2")}
</StyleLink>{" "}
{t("partners.desc3")}
<StyleLink
href="https://www.bc.edu/bc-web/schools/law.html"
target="_blank"
rel="noopener noreferrer"
>
Boston College Law School
{" "}
{t("partners.desc4")}
</StyleLink>{" "}
and{" "}
{t("partners.desc5")}{" "}
<StyleLink
href="https://cyber.harvard.edu/"
target="_blank"
rel="noopener noreferrer"
>
Harvard University's Berkman Klein Center for Internet & Society
{t("partners.desc6")}
</StyleLink>
.
</PageDescr>
Expand All @@ -56,7 +68,7 @@ export const OurPartners = () => {
</Row>
<Row>
<Col>
<AboutPagesCard title="How to Support Us">
<AboutPagesCard title="Partners in Democracy">
<Row>
<OpenCollectiveContent />
</Row>
Expand Down
34 changes: 27 additions & 7 deletions components/OurTeam/SteeringCommittee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,48 @@ export const SteeringCommittee = () => {
name="Dan Jackson"
descr="Dan Jackson directs Northeastern University School of Law’s NuLawLab, where he draws on his design and law backgrounds to educate the legal inventors of the future."
/>
<Divider />
<MemberItem
name="John Griffin"
descr="John Griffin is the Managing Partner for Strategy at Partners in Democracy. John spent a decade working in Massachusetts policy and politics, including as Massachusetts Policy Director at Democrats for Education Reform. He has experience advising nonprofits, campaigns, and civil society organizations on achieving their policy goals."
/>
<Divider />
<MemberItem
name="Elaine Almquist"
descr="Elaine F. Almquist is the founder and principal of Almquist & Associates, where she advises candidates and organizations on how to build political power, win office, and nurture long-term movements. Elaine has spent twenty years on the ground in campaigns and organizations, and serves on the advisory board of Rank The Vote."
/>
</SectionContainer>
</Col>
</Row>
<Row>
<Col className="my-3">
<SectionContainer>
<SectionTitle className="p-2">
User Experience Design & Engineering Leads
User Experience, Design & Engineering Leads
</SectionTitle>
<MemberItem
name="Alex Ball"
descr="Alex Ball is a full-stack software developer. He enjoys building useful user experiences, learning new technologies, and helping other developers be productive. He currently works at Cyvl.ai on geospatial applications to help governments manage their infrastructure assets."
name="James Vasquez"
descr="James Vasquez is a User Experience Product Designer who has been in the digital product industry for 9 years (professionally, and volunteering for projects). He currently works at CVS Health, mentors UX students at Designlab, and is a Board Member of UXPA Boston. "
/>
<Divider />
<MemberItem
name="Matt King"
descr="Matt King is a Full-Stack Software Engineer. He received a Bachelor's Degree in Computer Science and Cognitive Psychology from Northeastern University."
/>
<Divider />
<MemberItem
name="Sasha Goldberg"
descr="Sasha Goldberg has volunteered with Code for Boston for over seven years and is a full stack developer. Before entering the software development profession, Sasha was a video editor and motion graphic designer."
name="Merritt Baggett"
descr="Merritt Baggett is a freelance React Front-End Web Developer. He received a Bachelor's Degree in Psychology from Virginia Tech."
/>
<Divider />
<MemberItem
name="James Vasquez"
descr="James Vasquez is a User Experience Product Designer who has been in the digital product industry for 9 years (professionally, and volunteering for projects). He currently works at CVS Health, mentors UX students at Designlab, and is a Board Member of UXPA Boston. "
name="Kimin Kim"
descr="Kimin Kim is a Lead Front-end Developer at the Data Lab for Tech Impact with a Bachelor's Degree of Computer Science from Northeastern University. His hobbies are playing volleyball/badminton, eating good food, and learning new skills."
/>
<Divider />
<MemberItem
name="Minqi Chai"
descr="Minqi Chai is a social scientist and user experience researcher, advocating for human-centered approaches in digital transformation. She received her PhD in Political Science and Government from Cornell University."
/>
</SectionContainer>
</Col>
Expand Down
20 changes: 7 additions & 13 deletions components/ProfilePage/FollowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import { Internal } from "components/links"
import { StyledImage } from "./StyledProfileComponents"
import { useTranslation } from "next-i18next"
import { getFunctions, httpsCallable } from "firebase/functions"
import { useAuth } from "../auth"
import { useState, useEffect, useCallback } from "react"
import { FillButton } from "components/buttons"
import { User } from "firebase/auth"
import { Maybe } from "components/db/common"

export const FollowButton = ({
profileId,
uid
user
}: {
profileId?: string
uid?: string
user: Maybe<User>
}) => {
const { t } = useTranslation("profile")
const { user } = useAuth()
const functions = getFunctions()
const followBillFunction = httpsCallable(functions, "followOrg")
const unfollowBillFunction = httpsCallable(functions, "unfollowOrg")

const topicName = `org-${profileId}`
const subscriptionRef = collection(
firestore,
`/users/${uid}/activeTopicSubscriptions/`
`/users/${user?.uid}/activeTopicSubscriptions/`
)
const [queryResult, setQueryResult] = useState("")

Expand All @@ -42,8 +42,8 @@ export const FollowButton = ({
}, [subscriptionRef, profileId, setQueryResult]) // dependencies of orgQuery

useEffect(() => {
uid ? orgQuery() : null
}, [uid, orgQuery]) // dependencies of useEffect
user?.uid ? orgQuery() : null
}, [user?.uid, orgQuery]) // dependencies of useEffect

const handleFollowClick = async () => {
// ensure user is not null
Expand All @@ -52,9 +52,6 @@ export const FollowButton = ({
}

try {
if (!uid) {
throw new Error("User not found")
}
const orgLookup = {
profileId: profileId,
type: "org"
Expand All @@ -76,9 +73,6 @@ export const FollowButton = ({
}

try {
if (!uid) {
throw new Error("User not found")
}
const orgLookup = {
profileId: profileId,
type: "org"
Expand Down
20 changes: 16 additions & 4 deletions components/ProfilePage/ProfileButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { useTranslation } from "next-i18next"
import { Button } from "../bootstrap"
import styled from "styled-components"
import { FillButton, GearButton, ToggleButton } from "components/buttons"
import { Col } from "react-bootstrap"
import { Story } from "stories/atoms/BaseButton.stories"
import { Internal } from "components/links"
import { useProfile, ProfileHook } from "components/db"
import { FollowButton } from "./FollowButton"
import { useFlags } from "components/featureFlags"
import { useAuth } from "../auth"

export const StyledButton = styled(Button).attrs(props => ({
className: `col-12 d-flex align-items-center justify-content-center py-3 text-nowrap`,
Expand Down Expand Up @@ -90,9 +89,22 @@ export function ProfileButtonsUser({
)
}

export function ProfileButtonsOrg({ isUser }: { isUser: boolean }) {
export function ProfileButtonsOrg({
profileId,
isUser
}: {
profileId: string
isUser: boolean
}) {
const { followOrg } = useFlags()
const { user } = useAuth()
return (
<>{isUser ? <EditProfileButton /> : followOrg ? <FollowButton /> : null}</>
<>
{isUser ? (
<EditProfileButton />
) : followOrg && user ? (
<FollowButton profileId={profileId} user={user} />
) : null}
</>
)
}
4 changes: 3 additions & 1 deletion components/ProfilePage/ProfileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export const ProfileHeader = ({
<ProfileDisplayName className={`col-3 col-md-auto`}>
{profile.fullName}
</ProfileDisplayName>
{isOrg ? <ProfileButtonsOrg isUser={isUser} /> : null}
{isOrg ? (
<ProfileButtonsOrg profileId={profileId} isUser={isUser} />
) : null}
</div>
</div>
<div className="col-12 col-md-2 d-flex justify-content-center justify-content-md-end align-items-center ms-md-auto ">
Expand Down
Loading

0 comments on commit 313f72a

Please sign in to comment.