Skip to content

Conversation

@n1b11
Copy link
Collaborator

@n1b11 n1b11 commented Jan 27, 2026

Summary

This changes adds a notification banner to the home page announcing the new transcription banner. The banner can be closed using the x button and will remain closed for future visits after it has been closed once. The banner will stop appearing automatically after March 1, 2026.
closes #2030

Screenshots

Screenshot 2026-01-26 at 11 57 32 PM

Steps to test/reproduce

  1. Click on "try it out", confirm that the hearings page is opened
  2. Click the "x", confirm that the banner is closed

To restore the banner after closing, clear the local storage for the page.

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
maple-dev Ready Ready Preview, Comment Jan 28, 2026 0:14am

Request Review

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally don't review Draft PRs (so apologies in advance if any of these comments are already on your radar), but I was going over other PRs anyway and thought a few notes might be helpful.

endDate: Date
children: React.ReactElement
}) {
const isOpen = localStorage.getItem("isBannerClosed")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there's a useLocalStorage hook provided by use-hooks that could help simplify this: https://usehooks-ts.com/react-hook/use-local-storage

@@ -0,0 +1,48 @@
import { Row } from "react-bootstrap"
import styles from "./AnouncementBanner.module.css"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this module.css file in the PR - does it exist? If not, we should remove this import.

If so, you've hit an embarassing point for us - we made a point to move MAPLE away from CSS modules to styled-components a while ago, but missed the home page in the transition 🤦 (I think someone picked up the ticket before leaving the project). If this needs more complicated styles, we should prefer styled-components.

That said, I think this already looks great on dev with just the utility classes.

}

const now: Date = new Date()
console.log(open, isOpen)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please remember to remove the log statement before we merge

<p className="mb-0">
<span className="fw-bold">New on MAPLE:</span>{" "}
<span>
Looking to learn about the latest action in a committee?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For raw copy text like this, we should extract strings for I18n:

  • In the component itself, we should either use a useTranslation hook (e.g. const { t } = useTranslation("common")) or a <Trans> component
  • Where we would have text previously, we should provide the hook a translation key (e.g. instead of "New on MAPLE:", t("announcement.heading"))
  • In the public/locales/en folder, we should add a mapping of translation keys to raw copy text in a relevant JSON file (e.g. announcement: { heading: "New on MAPLE:"})
    • By default, the homepage just uses common.json. IMO that's fine for this - we can make something more announcement specific later when we want to add a second announcement.

There's examples of how we handle this in MAPLE throughout the codebase - useTranslation is easily searchable, and the <Trans> component is mainly used for text that contains hyperlinks (like

)

(Translations aren't fully wired up yet, but we want the text to be ready to go when we're ready to move on that project)

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for the quick turn-around on this!

@Mephistic Mephistic merged commit a26d0b5 into codeforboston:main Jan 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Feature Banner for Homepage

2 participants