codeforboston / maple

MAPLE makes it easy for anyone to view and submit testimony to the Massachusetts Legislature about the bills that will shape our future.
https://mapletestimony.org
MIT License
44 stars 118 forks source link

About Copy Updates #1614

Closed mertbagt closed 1 month ago

mertbagt commented 1 month ago

Summary

issue #1604

change copy and update logo where requested

  1. About -> Team -> Partners -> Partners in Democracy
  2. About -> Support Maple -> Donate
  3. About -> FAQ -> The MAPLE Team + Getting Involved

added translation support for About -> Team -> Partners -> Page Descr

Checklist

Screenshots

image

image

image

Known issues

N/A

Steps to test/reproduce

  1. Go to the relevant subpages
  2. Check that the requested copy is updated
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 1:48am
mvictor55 commented 1 month ago

Hi @mertbagt this looks good! Two final changes:

  1. Can we hyperlink "this page" to the link shown? Instead of actually showing the text of the link image

  2. On the How to Support MAPLE page, under "volunteer" can we change the email shown to "admin@mapletestimony.org" image

mertbagt commented 1 month ago

Hi @mertbagt this looks good! Two final changes:

2) done; link updated


1) the faq questions and answers come from a json file with a series of strings that are mapped to the component. If I put HTML link code there it is rendered literally instead of being rendered as a link.

image

I have looked into alternative approaches:

image

this does not seem advisable

image

I'm not sure it's worth installing another library just for an edge case. However, at least this method doesn't seem to have the serious security risks of the first method, should we decide that it's worth pursueing

Mephistic commented 1 month ago

Hi @mertbagt this looks good! Two final changes:

2. done; link updated

1. the faq questions and answers come from a json file with a series of strings that are mapped to the component.  If I put HTML link code there it is rendered literally instead of being rendered as a link.

image

I have looked into alternative approaches:

image

this does not seem advisable

image

I'm not sure it's worth installing another library just for an edge case. However, at least this method doesn't seem to have the serious security risks of the first method, should we decide that it's worth pursueing

Yeah, 👍 to avoiding dangerouslySetInnerHTML wherever possible (even though it's probably safe here since it's just loading static text that we control).

That said, could we use the <Trans> component from react-i18next here to interpolate the link? See: https://react.i18next.com/latest/trans-component#overriding-react-component-props-v11.5.0

mertbagt commented 1 month ago

I gotta head out but I'll give <Trans> a shot when I get back tonight, thanks!

🚀

mertbagt commented 1 month ago

@Mephistic @mvictor55

Forget my comment about the FAQ hyperlink; TL;DR I'm a big dummy and this should work a lot better*

*just remember the FAQ link takes you to prod where it still has the old info@ address but that should be updated to admin@ on dev