Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
58b11b4
feat: replace custom routing with react-instantsearch-router-nextjs
seatuna Mar 25, 2025
cb8a31f
remove stale settings.json
jicruz96 Jul 27, 2025
4b6626c
initial commit
mertbagt Jul 28, 2025
144551e
subheading only shows up for newsfeed as intended
mertbagt Jul 28, 2025
1d65bbe
add .vscode/settings.json to .gitignore
jicruz96 Jul 28, 2025
0949ef5
update launch configuration for MAPLE debugging
jicruz96 Jul 28, 2025
08932af
miscellaneous link edit done by nextjs
jicruz96 Jul 28, 2025
f6007c8
debug launch.json config
jicruz96 Jul 28, 2025
c5ec075
extract text to translation ready files -- Communicating with Legisla…
jicruz96 Jul 30, 2025
1c7698f
extract text to translation ready files -- Our Team page
jicruz96 Jul 30, 2025
2b383a6
Merge pull request #1871 from jicruz96/our-team-translation
mertbagt Jul 31, 2025
fbbcddc
Merge pull request #1870 from jicruz96/communicating-with-legislators…
mertbagt Jul 31, 2025
6beaf0e
Merge pull request #1766 from seatuna/ctoon/1753/upgrade-instantsearc…
mertbagt Jul 31, 2025
ab6d380
Ensure page titles are translate-able
jicruz96 Jul 31, 2025
ce930cb
minor function signature change in layout.tsx
jicruz96 Jul 31, 2025
e83b335
add helpful comment
jicruz96 Jul 31, 2025
a38ed8c
Update title for policies page
jicruz96 Jul 31, 2025
2531e42
Merge pull request #1878 from jicruz96/page-title-translations
mertbagt Aug 2, 2025
ee75b44
Merge pull request #1861 from jicruz96/vscode-folder-cleanup
mertbagt Aug 5, 2025
c2e6047
Merge pull request #1859 from mertbagt/newsfeed-subheading
Mephistic Aug 6, 2025
3974f3e
fix(newsletter): Updating newsletter link to new form url, extracting…
Mephistic Aug 6, 2025
c3607a9
Merge pull request #1885 from Mephistic/fix-form
Mephistic Aug 6, 2025
a5dcc41
fix(notifications): Fallback to publicEmail for org users for email n…
Mephistic Aug 6, 2025
fe9cda8
chore(notifications): Make default notification setting for new accou…
Mephistic Aug 6, 2025
0bb7699
Merge pull request #1887 from Mephistic/weekly-notifs
Mephistic Aug 6, 2025
b6e19b9
Merge pull request #1886 from Mephistic/fix-org-email
Mephistic Aug 6, 2025
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ build-storybook.log

/token

cert.txt
cert.txt

# vscode

# lets each user define their own vscode settings
.vscode/settings.json
34 changes: 20 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// adapted from https://nextjs.org/docs/app/guides/debugging#debugging-with-vs-code
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"program": "${workspaceFolder}/app.js",
"name": "Run and Debug MAPLE",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"dev"
],
"env": {
"NODE_OPTIONS": "--inspect"
},
"console": "integratedTerminal",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "Launch in VSCode (with TypeScript)",
"type": "node",
"request": "launch",
"program": "/Users/mrigank/maple/functions/src/notifications/index.ts", // Replace with path to your main entry point (e.g., "index.js")
"sourceMaps": true
"sourceMaps": true,
"serverReadyAction": {
"action": "debugWithChrome",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}"
}
}
]
}
}
11 changes: 0 additions & 11 deletions .vscode/settings.json

This file was deleted.

24 changes: 15 additions & 9 deletions components/Card/CardTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface CardTitleProps {
isUserMatch?: boolean
type?: string
userRole?: string
isNewsfeed?: string
}

export const CardTitle = (props: CardTitleProps) => {
Expand All @@ -29,7 +30,8 @@ export const CardTitle = (props: CardTitleProps) => {
isUserMatch,
subheader,
type,
userRole
userRole,
isNewsfeed
} = props

return (
Expand All @@ -44,14 +46,18 @@ export const CardTitle = (props: CardTitleProps) => {
subheader={subheader}
type={type}
/>
<CardTitleFollowing
billId={billId}
header={header}
subheader={subheader}
isBillMatch={isBillMatch}
isUserMatch={isUserMatch}
type={type}
/>
{isNewsfeed ? (
<CardTitleFollowing
billId={billId}
header={header}
subheader={subheader}
isBillMatch={isBillMatch}
isUserMatch={isUserMatch}
type={type}
/>
) : (
<></>
)}
</CardBootstrap.Body>
</CardBootstrap.Body>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Row, Col } from "../bootstrap"
import Image from "react-bootstrap/Image"
import styled from "styled-components"
import { useTranslation } from "next-i18next"

const StyledImage = styled(Image)`
width: 12.5rem;
Expand All @@ -27,9 +28,9 @@ const WritingContent = () => (
<Row className="align-items-center">
<Col xs={12} md={8} lg={{ span: 7, offset: 1 }}>
<p>
You can submit your thoughts on a bill to the Committee hearing it
before the date of their public hearing. This website, the MAPLE
platform, focuses on this mechanism.
{useTranslation("learnComponents").t(
"communicating.testifyInWriting.content"
)}
</p>
</Col>
<Col md={4} lg={3}>
Expand Down Expand Up @@ -58,8 +59,9 @@ const OralContent = () => (
lg={{ span: 7, order: 1 }}
>
<p>
You can attend a public hearing for a bill of interest to you and sign
up for a slot to speak before the Committee.
{useTranslation("learnComponents").t(
"communicating.testifyOrally.content"
)}
</p>
</Col>
</Row>
Expand All @@ -69,12 +71,9 @@ const WriteOrCallContent = () => (
<Row className="align-items-center">
<Col xs={12} md={8} lg={{ span: 7, offset: 1 }}>
<p>
You can contact your legislators any time by looking up their contact
information on the MA Legislature website. Your voice will probably
carry the most weight with the House and Senate representatives of your
own district, but you are free to contact Committee Chairs or any other
member of the legislature with your opinions. You could request a
meeting in person.
{useTranslation("learnComponents").t(
"communicating.writeOrCall.content"
)}
</p>
</Col>
<Col md={4} lg={3}>
Expand Down
2 changes: 1 addition & 1 deletion components/EditProfilePage/ProfileSettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function ProfileSettingsModal({

const handleToggleNotifications = async () => {
if (notifications === "None") {
setNotifications("Monthly")
setNotifications("Weekly")
} else {
setNotifications("None")
}
Expand Down
3 changes: 2 additions & 1 deletion components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import CustomDropdown, {
CustomDropdownProps
} from "components/Footer/CustomFooterDropdown"
import { FooterContainer } from "./FooterContainer"
import { NEWSLETTER_SIGNUP_URL } from "components/common"

export type PageFooterProps = {
children?: any
Expand Down Expand Up @@ -282,7 +283,7 @@ const PageFooter = (props: PageFooterProps) => {
{t("legal.disclaimer")}
{" - "}
<a
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
href={NEWSLETTER_SIGNUP_URL}
style={{ color: "white" }}
target="_blank"
rel="noopener noreferrer"
Expand Down
5 changes: 3 additions & 2 deletions components/HeroHeader/HeroHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ScrollTrackingItem from "../ScrollTrackEffect/ScrollTrackerItem"
import styles from "./HeroHeader.module.css"
import { useTranslation } from "next-i18next"
import { capitalize } from "lodash"
import { NEWSLETTER_SIGNUP_URL, TRAINING_CALENDAR_URL } from "../common"

const HeroHeader = ({ authenticated }) => {
const { t } = useTranslation("common")
Expand Down Expand Up @@ -59,7 +60,7 @@ const HeroHeader = ({ authenticated }) => {
<p>
{t("newcomer")}{" "}
<a
href="https://calendar.google.com/calendar/embed?src=998f62323926f0b0076e7f578d3ca72b1bc94c4efa2f24be57b11f52b1b88595%40group.calendar.google.com&ctz=America%2FNew_York"
href={TRAINING_CALENDAR_URL}
style={{ color: "white" }}
target="_blank"
rel="noopener noreferrer"
Expand All @@ -70,7 +71,7 @@ const HeroHeader = ({ authenticated }) => {
</p>
<p>
<a
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
href={NEWSLETTER_SIGNUP_URL}
style={{ color: "white" }}
target="_blank"
rel="noopener noreferrer"
Expand Down
6 changes: 3 additions & 3 deletions components/LearnTestimonyComponents/LearnComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ const CommunicatingWithLegislators = () => {
</h1>
<p className={"ms-1 fs-4"}>{t("communicating.intro")}</p>

<CommWithLegCard title={t("communicating.testifyInWriting")}>
<CommWithLegCard title={t("communicating.testifyInWriting.title")}>
<WritingContent />
</CommWithLegCard>

<CommWithLegCard title={t("communicating.testifyOrally")}>
<CommWithLegCard title={t("communicating.testifyOrally.title")}>
<OralContent />
</CommWithLegCard>

<CommWithLegCard title={t("communicating.writeOrCall")}>
<CommWithLegCard title={t("communicating.writeOrCall.title")}>
<WriteOrCallContent />
</CommWithLegCard>
</Col>
Expand Down
7 changes: 3 additions & 4 deletions components/Newsfeed/Newsfeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,14 @@ export default function Newsfeed() {
const [settingsModal, setSettingsModal] = useState<"show" | null>(null)
const [notifications, setNotifications] = useState<
"Weekly" | "Monthly" | "None"
>(notificationFrequency ? notificationFrequency : "Monthly")
>(notificationFrequency ? notificationFrequency : "Weekly")
const [isProfilePublic, setIsProfilePublic] = useState<false | true>(
isPublic ? isPublic : false
)

const onSettingsModalOpen = () => {
setSettingsModal("show")
setNotifications(
notificationFrequency ? notificationFrequency : "Monthly"
)
setNotifications(notificationFrequency ? notificationFrequency : "Weekly")
setIsProfilePublic(isPublic ? isPublic : false)
}

Expand Down Expand Up @@ -230,6 +228,7 @@ export default function Newsfeed() {
testimonyId={element.testimonyId}
type={element.type}
userRole={element.userRole}
isNewsfeed={"enable newsfeed specific subheading"}
/>
</div>
))}
Expand Down
2 changes: 2 additions & 0 deletions components/NewsfeedCard/NewsfeedCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const NewsfeedCard = (props: {
timestamp: Timestamp
type: string
userRole?: string
isNewsfeed?: string
}) => {
const date = props.timestamp.toDate()
const formattedTimestamp = `${date.toLocaleDateString()}`
Expand All @@ -40,6 +41,7 @@ export const NewsfeedCard = (props: {
timestamp={formattedTimestamp}
type={props.type}
userRole={props.userRole}
isNewsfeed={"enable newsfeed specific subheading"}
/>
)

Expand Down
15 changes: 9 additions & 6 deletions components/OurTeam/OurTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { SteeringCommittee } from "./SteeringCommittee"
import { AdvisoryBoard } from "./AdvisoryBoard"
import { OurPartners } from "./Partners"
import { useMediaQuery } from "usehooks-ts"
import { useTranslation } from "next-i18next"

export const OurTeam = () => {
const isMobile = useMediaQuery("(max-width: 768px)")
Expand Down Expand Up @@ -36,28 +37,29 @@ export const OurTeam = () => {
}

const TabGroup = () => {
const { t } = useTranslation("our-team")
return (
<Row className="p-3 g-0">
<Col md={4} className="text-center">
<Nav className="our-team-tab flex-column">
<Nav.Item>
<Nav.Link eventKey="steering_committee">
Steering Committee
{t("steering.title")}
</Nav.Link>
</Nav.Item>
</Nav>
</Col>
<Col md={4} className="text-center">
<Nav className="our-team-tab flex-column">
<Nav.Item>
<Nav.Link eventKey="advisory_board">Advisory Board</Nav.Link>
<Nav.Link eventKey="advisory_board">{t("advisory.title")}</Nav.Link>
</Nav.Item>
</Nav>
</Col>
<Col md={4} className="text-center">
<Nav className="our-team-tab flex-column">
<Nav.Item>
<Nav.Link eventKey="partners">Partners</Nav.Link>
<Nav.Link eventKey="partners">{t("partners.title")}</Nav.Link>
</Nav.Item>
</Nav>
</Col>
Expand All @@ -66,6 +68,7 @@ const TabGroup = () => {
}

const TabDropdown = () => {
const { t } = useTranslation("our-team")
const [selectedTab, setSelectedTab] = useState<string>("Steering Committee")

const handleTabClick = (tabTitle: string) => {
Expand All @@ -85,23 +88,23 @@ const TabDropdown = () => {
eventKey="steering_committee"
onClick={() => handleTabClick("Steering Committee")}
>
Steering Committee
{t("steering.title")}
</Dropdown.Item>
<Dropdown.Divider />
<Dropdown.Item
className="p-2"
eventKey="advisory_board"
onClick={() => handleTabClick("Advisory Board")}
>
Advisory Board
{t("advisory.title")}
</Dropdown.Item>
<Dropdown.Divider />
<Dropdown.Item
className="p-2"
eventKey="partners"
onClick={() => handleTabClick("Partners")}
>
Partners
{t("partners.title")}
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
Expand Down
3 changes: 2 additions & 1 deletion components/auth/TermsOfServiceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button, Col, Modal, Row, Stack } from "../bootstrap"
import { External } from "components/links"
import { NavLink } from "../Navlink"
import { useTranslation } from "next-i18next"
import { NEWSLETTER_SIGNUP_URL } from "components/common"

export default function TermsOfServiceModal({
show,
Expand Down Expand Up @@ -80,7 +81,7 @@ export default function TermsOfServiceModal({
</Row>
<Row>
<NavLink
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
href={NEWSLETTER_SIGNUP_URL}
other={{
className: `text-center fs-5 mt-4 text-secondary`,
target: "_blank",
Expand Down
6 changes: 3 additions & 3 deletions components/auth/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function useCreateUserWithEmailAndPassword(isOrg: boolean) {
setProfile(credentials.user.uid, {
fullName,
orgCategories: categories,
notificationFrequency: "Monthly",
notificationFrequency: "Weekly",
email: credentials.user.email
}),
sendEmailVerification(credentials.user)
Expand All @@ -85,7 +85,7 @@ export function useCreateUserWithEmailAndPassword(isOrg: boolean) {
await Promise.all([
setProfile(credentials.user.uid, {
fullName,
notificationFrequency: "Monthly",
notificationFrequency: "Weekly",
email: credentials.user.email,
public: true
}),
Expand Down Expand Up @@ -136,7 +136,7 @@ export function useSignInWithPopUp() {
await Promise.all([
setProfile(credentials.user.uid, {
fullName: credentials.user.displayName ?? "New User",
notificationFrequency: "Monthly",
notificationFrequency: "Weekly",
email: credentials.user.email,
public: true
})
Expand Down
Loading