Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render all page headers on backend, remove react-helmet component #495

Closed
3 tasks
glenbraun opened this issue Nov 30, 2020 · 2 comments · Fixed by #1018
Closed
3 tasks

Render all page headers on backend, remove react-helmet component #495

glenbraun opened this issue Nov 30, 2020 · 2 comments · Fixed by #1018
Assignees
Labels
Full Stack Both front- and back-end work required

Comments

@glenbraun
Copy link
Collaborator

glenbraun commented Nov 30, 2020

We recently added support for rendering meta headers on the backend, and should do that for all pages

Checklist

  • Add page handlers in context_preload.py

  • Remove Header component on frontend

  • Remove React Helmet dependency

Trello Card

@glenbraun glenbraun added the Full Stack Both front- and back-end work required label Dec 2, 2020
@PeterBreen
Copy link
Collaborator

PeterBreen commented May 19, 2023

Here's some code examples of how to do this, as several pages already have backend meta tag rendering:

For the About page, the information is defined here:
https://github.com/DemocracyLab/CivicTechExchange/blob/master/civictechprojects/helpers/context_preload.py#L87-L91

and then we use FrontEndSection to make sure that information goes where it belongs:
https://github.com/DemocracyLab/CivicTechExchange/blob/master/civictechprojects/helpers/context_preload.py#L183

And the about page has the correct meta information:
image

The component we want to remove, Headers.jsx (which uses React Helmet) is here: https://github.com/DemocracyLab/CivicTechExchange/blob/master/common/components/common/Headers.jsx and only used in two places. Unfortunately, they're the two most complicated to replace - they need to respond to whatever project or group data is loaded.

@PeterBreen PeterBreen changed the title Render all page headers on backend Render all page headers on backend, remove react-helmet component May 19, 2023
@QuanGiap QuanGiap self-assigned this Aug 10, 2023
marlonkeating added a commit that referenced this issue Nov 2, 2023
…s-on-backend-remove-react-helmet-component

solve #495 render all page headers on backend remove react helmet component
@marlonkeating
Copy link
Contributor

Fixed by #1018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Stack Both front- and back-end work required
Projects
None yet
4 participants