ScienceCommons / api

API for interacting with Curate Science model
http://curatescience.org
MIT License
2 stars 4 forks source link

when replication study added, all replication studies (including pre-existing ones) are incorrectly hidden #216

Closed eplebel closed 9 years ago

eplebel commented 9 years ago

replication studies now expand by default upon page load, but @manzhikov 's changes (https://github.com/manzhikov/www/commit/fd4062635ed1fffb103f3cfe9462f1f6fcfaec94) has now caused a bug whereby when a replication study is added, all replication studies (including pre-existing ones) are incorrectly hidden.

Steps:

  1. On an article page with at least one original and replication study (e.g., https://curatescience-staging.herokuapp.com/beta/#/articles/335246), click the add replication icon to add a replication study
  2. On the add replication window, search "Pashler" and for the first article ((2011) LeBel & Pashler - jpsp), add LeBel & Pashler (2011) as a replication study

Notice that the replication study is added, however, all replication studies are now hidden in the replication table. Note that if you close the add replication window and click the expand replications icon, the replication studies are revealed.

alexkyllo commented 9 years ago

I think I've fixed this issue with this change, just pushed to staging so you can test it out there. https://github.com/ScienceCommons/www/commit/f2909a48c43db35e69cb09a6347a6b1257adb57b

PR opened: https://github.com/ScienceCommons/www/pull/45

eplebel commented 9 years ago

The problem does seem to have been fixed, however, after adding/linking a replication study, the "Add replication" window unexpectedly disappears (the logic of keeping it open is that a user will often be adding/linking more than one replication study to an original study).

alexkyllo commented 9 years ago

Oh, ok. I wasn't sure what behavior you wanted there. That's what line 214 that was commented out does, it closes the modal when you link a replication. I had uncommented it, but I just went in and deleted it. It's been deployed to staging, so now when you link a replication the modal shouldn't disappear anymore.

eplebel commented 9 years ago

Great, thanks for the quick fix!!