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

resource pages #49

Open
2 of 7 tasks
davelandry opened this issue Jan 3, 2020 · 3 comments
Open
2 of 7 tasks

resource pages #49

davelandry opened this issue Jan 3, 2020 · 3 comments
Assignees

Comments

@davelandry
Copy link
Member

davelandry commented Jan 3, 2020

  • About the Site (/en/resources/about)
  • Data Sources (/en/resources/data)
  • Methodology (/en/resources/methodology)
  • Permissions (/en/resources/permissions)
  • FAQs (/en/resources/faqs)
  • Publications (previously /publications, but please make it /en/resources/publications and include a redirect)
  • API (previously /api, but please make it /en/resources/api and include a redirect)
@davelandry
Copy link
Member Author

davelandry commented Feb 20, 2020

@nicoperezmundaca I just reviewed your implementation with Alex, and we think it's overkill for what we need.

  • It was confusing to track down how everything gets rendered. It would actually be easier to edit text in JSX, because you'd be able to see exactly where certain text lives on the page, rather than trying to hunt it down in the locale file by key. Move all of the content into JSX, and if needed, make smaller components for re-used elements (like team bios).
  • The URL query param method is also overkill, please just to routes that match the routes of the old site (I'm going to update the checklist above with these routes). You can still use a variable in the route to conditionally render the correct component (ie. path="/:lang/resources/:page"

@davelandry davelandry changed the title about pages resource pages Feb 20, 2020
@davelandry
Copy link
Member Author

@nicoperezmundaca I set up the page route:

<Route exact path="/:lang/resources/:page" component={Resources} />

Take a look at how that component conditionally renders: https://github.com/Datawheel/oec-website/blob/6cd9b4220819a243136e4e2743ba91524e6a28e4/app/pages/Resources/index.jsx

Don't worry about CSS too much, just content. I can go in and tweak styles later.

@davelandry
Copy link
Member Author

@nicoperezmundaca while you're hooking these up, can you also add <Helmet /> elements for the window titles? Here's how I did it on Privacy/Terms: c03941c

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

No branches or pull requests

3 participants