cjlee112 / spnet

selected papers network web engine
http://thinking.bioinformatics.ucla.edu/2011/07/02/open-peer-review-by-a-selected-papers-network/
GNU General Public License v2.0
40 stars 11 forks source link

Click on posts to reveal their content. #106

Open ketch opened 10 years ago

ketch commented 10 years ago

Related to #105, this PR makes lists of posts appear as just titles initially; clicking on any of them expands it. This is the same behavior already available with checkboxes, but perhaps this interface is a bit more fun.

Some notes:

[/js]
tools.staticdir.on = True
tools.staticdir.dir = "js"
tools.caching.on = True
tools.caching.delay = 7200

I updated the template with this. This avoids duplicated code. If this is not the preferred approach, please let me know.

cjlee112 commented 10 years ago

I really like the way you cleaned up the code! My apologies -- my javascript skills are below rudimentary! Regarding the "look and feel", we may want to seek input from users. My initial feeling is that we might want to tweak this a bit. Some possibilities:

The former sounds clearer and simpler to me...

cjlee112 commented 10 years ago

@ketch I tried out a really basic version of making it look more like gmail (only in the get_person.html page). Take a look. My feeling is this direction will work out nicely if we can adjust the styling to follow the gmail look & feel.

ketch commented 10 years ago

@cjlee112 I like your modifications! I have two comments:

Also, I'm not sure how many things we want to fine-tune now versus merging in the basic idea and then refining. We should definitely get feedback from users. My feeling is that the current users don't mind being guinea pigs and we can get feedback by making a prototype active on the site (rather than asking them to run a Github branch); do you agree?

ketch commented 10 years ago

@cjlee112 I tried to take your modification of get_person.html further in the same direction, making it even more like Gmail. Here's a screenshot:

screen shot 2013-10-27 at 9 22 07 pm

The text is automatically truncated based on the browser window width. The date shows up on the right if the window is wide enough. It would be nice to have a fraction of the window width dedicated to each field; I think I can do this with a bit more work. But is that what you're thinking of, more or less?

Also, I modified the javascript so that clicking on the star also expands the post.

ketch commented 10 years ago

In the last commit, I changed things so that the title, text, and date each occupy a fraction of the browser space. I applied this only to the "Recommendations" and not the "Discussion" so that the two approaches can easily be compared. To see the difference, change the width of your browser window.