Skip to content

Enhance EmailAgendaItemCard with improved styling, date formatting, and status display.#451

Open
Onuiteshi wants to merge 5 commits into
mainfrom
feat/46-agenda-item-email-card
Open

Enhance EmailAgendaItemCard with improved styling, date formatting, and status display.#451
Onuiteshi wants to merge 5 commits into
mainfrom
feat/46-agenda-item-email-card

Conversation

@Onuiteshi

@Onuiteshi Onuiteshi commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description
Resolves #46

The EmailAgendaItemCard component previously only showed the item reference, title, and summary. This PR enhances it to match the information hierarchy of the website card.

Before: Reference + title (as a link) + plain summary text only.

After: Meeting date, decision body, title (as a styled link), status badge (when present), decision recommendations (when present), and summary all inside a card with a left accent border, subtle container border, and consistent typography.

Testing instructions
Local:

  1. Run npm run docker:start && npm run dev
  2. Go to /actions, search "housing"
  3. Click Get Email Alerts, enter any email
  4. Check maildev at http://localhost:1080

Preview deployment:

  1. Open the preview URL and go to /actions
  2. Search any topic, click Get Email Alerts, enter your real email
  3. Check your inbox for the subscription confirmation email

Checklist

  • This PR addresses all requirements described in the issue
  • I have commented my code, particularly in hard-to-understand areas
  • I have performed a self-review of my code
  • I have tested these changes in my local environment
  • I have tested these changes in the preview site generated by this PR (you must finish opening the PR first)
  • I have made corresponding changes to the documentation (if relevant)

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🚀 Preview URL for this PR: https://d6384c16-civic-dashboard-web.civic-dashboard.workers.dev

@jeromegv
jeromegv requested a review from 17cliu June 8, 2026 13:50
@jeromegv
jeromegv requested a review from joykare June 20, 2026 15:49

@17cliu 17cliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wow, this looks really good! 🌟

before after
Image Image

apologies for the late review on this. just two questions; otherwise, lgtm!

import { Heading, Hr, Link, Section, Text } from '@react-email/components';
import { Fragment } from 'react';

const MAX_ITEMS = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just wanted to confirm -- this is on purpose? we want to limit the update emails to just two cards and force readers to click through to the website?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think we have a limit right now? I think most people would not expect a limit (or would expect a much higher limit)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes this was intentional. Previously there was no limit so a popular tag like "housing" could dump hundreds of items into a single email which isn't a great experience. I bumped it to 5 as a reasonable balance between giving enough context and not overwhelming the inbox.

Also worth noting, the items previously had no guaranteed order so older ones could show up at the top. They now show the most recent first so subscribers always see what's newest. The "And X more results" link at the bottom takes them to the site to see everything.
Was there a specific reason the previous behaviour had no limit? If the team thinks 5 is still too low I can take it higher

@17cliu @jeromegv

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes this was intentional. Previously there was no limit so a popular tag like "housing" could dump hundreds of items into a single email which isn't a great experience.

This might be because of the testing in the dev environnment. Once a agenda item has been sent by email to subscribers, we switch it the value of notificationSent to true, and it doesn't get sent again. So normally, it's only the "new" housing element of a single day that is sent, so its not hundreds, but more like just a few.

I'll have few more comments, BRB.

style={{ fontSize: '16px' }}
dangerouslySetInnerHTML={{ __html: sanitize(item.agendaItemSummary) }}
/>
{formattedStatus && <Text style={statusBadge}>{formattedStatus}</Text>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, i think it'd be nice to prefix this with Status: , as we do on the website. otherwise, it could be confusing. for example with the "no action required" status, readers might think this is saying that there is no action required of them, rather than that being just what the council concluded.

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great point!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea, I have added the "Status:" prefix to match the website card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Implement agenda item card for email template

3 participants