alliance-genome / agr_archive_initial_prototype

Source code for the Alliance of Genome Resources web portal
http://prod.alliancegenome.org/
MIT License
6 stars 11 forks source link

AGR-490 : Integrate Wordpress Posts with AGR portal #373

Closed LucyHut closed 7 years ago

LucyHut commented 7 years ago

Still work in progress but it's worth pulling in the following new features.

  1. The "News & Events" page
  2. Individual post pages
sibyl229 commented 7 years ago

Hi @LucyHut this is quite some hard work! Really appreciate it.

I noticed an issue that I suspect might have to do with how routing is setup here. Here is what I tried:

Issues with routing:

render() {
  return (
    <div>
    {/* some shared display, such as a header */}
    {this.props.children}
    {/* some shared display, such as a footer */}
    </div>
  );
}

Here is an example similar to what you want to do in the React-router tutorial https://github.com/ReactTraining/react-router/blob/v2.8.1/docs/Introduction.md#with-react-router

Please let me know if you have questions

LucyHut commented 7 years ago

@sibyl229 , thank so much for the feedback --- I also noticed the issue and suspected the routing. I will review the link and give it another try 👍

LucyHut commented 7 years ago

@sibyl229, after few research it looks like IndexRoute abstraction is no longer supported starting react-router 4.0 - so I'm exploring different options .

sibyl229 commented 7 years ago

Hi @LucyHut the version we are currently at AGR using is 2.8.1 https://github.com/alliance-genome/agr/blob/development/webapp/package.json#L26

sibyl229 commented 7 years ago

react router 4.0 is very different and not backward compatible. So it will probably have a more widespread impact on the codebase. If we need to upgrade, it's probably good to discuss among the group first, and/or try it in another branch.

LucyHut commented 7 years ago

@sibyl229, I went with the news and posts having the "posts" route and the pages have the initial wordpress route. It seems to be working fine now.