ScienceCommons / curate_science

Transparency & credibility curation products for all research stakeholders.
https://CurateScience.org
MIT License
13 stars 6 forks source link

final fixes/tweaks for beta contract #2 #94

Closed eplebel closed 4 years ago

eplebel commented 4 years ago

remaining from tweaks to tweaks requests:

eplebel commented 4 years ago

wow article card already looks a lot more beautiful with https://github.com/ScienceCommons/curate_science/compare/0a33ac82e5...8b3aa664cb!; a few tweaks to the tweaks:

oh and another thing:

eplebel commented 4 years ago

wow, all of these tweaks (https://github.com/ScienceCommons/curate_science/compare/8a0e064b66...117395d751) are perfect, looking really scrumptious!

at the fear of appearing insufficiently humble, you do realize @mickaobrien that you've built/implemented one of the most deliciously beautiful web products (UIs) in the entire academic science space!!? (and it's just the beginning/tip of the ice berg!!)

eplebel commented 4 years ago

oh, just noticed, one issue left out is: Hide "Added date" for Recent page article cards for mobile screen (<375px), which i've added to the list above (https://github.com/ScienceCommons/curate_science/issues/94#issue-554260660), in addition to the displaying embedded author page article list issue

mickaobrien commented 4 years ago

@eplebel Haha! Glad to be a part of it! :tada:

Yup, hiding the "Added date" text is next on my list, didn't get a chance to do it yesterday. Hopefully should be able to sort that and the author embed tomorrow.

mickaobrien commented 4 years ago

@eplebel Do you want the smaller figure carousel to stay visible when the article card is expanded and the full figure list is visible?

eplebel commented 4 years ago

actually it would be ideal to hide the smaller figure carousel on article card expand, as long as when the card is collapsed, that the smaller figure carousel is then displayed again.

mickaobrien commented 4 years ago

@eplebel You were right about the the Action buttons on the right causing the issue with the media viewer being cut off on mobile screens. I've started work on moving the actions to a dropdown menu on the article card (as in #95). It's a bit involved (everything effects everything!) but I should have it done next week.

eplebel commented 4 years ago

ok sounds good

eplebel commented 4 years ago

one last small request for a minor issue i just noticed that is crucial for demos:

article cards in embedded author page article lists are clipped on the left & right edges (looks like applying padding:16px to outer div class="AuthorPage-root-1" does the trick).

that said, further investigation revealed that this issue is also present on non-embedded article lists, but the issue only appears when the div container >550px AND in multi-panel context. in non-multi-panel (normal) mode, sufficient padding is achieved via AppContent horizontal padding (padding:0 1rem (16px), see screenshot below) WHEREAS this is not the case in a multi-panel mode, where the correct padding is somehow only being applied up to a max-width of 1100px (550px being 50% of 1100px). so i guess a better fix should address this issue AND the padding issue in an embedded AP article list context! (though i could be off here...)

article-list-padding-issue

mickaobrien commented 4 years ago

@eplebel I just pushed a fix for the padding issue in 18b80a30bd94dd47ee2479123f9e03588c08c797. I think it solves all the issues (the padding on the article list when the embedded viewer is visible or the screen is small and the padding on the embedded article list). Let me know if it's not working as expected.

eplebel commented 4 years ago

awesome, yup https://github.com/ScienceCommons/curate_science/commit/18b80a30bd94dd47ee2479123f9e03588c08c797 seems to have fixed the padding issue in both spots, thanks for quick fix!

and re: exposed carousel thumbnails, just WOW. this really takes it to the next level, especially that it's also deliciously pleasant on small screens!

everything is working, i just noticed a few final aesthetic issues.

final requests:

requests (though i can live w/out these if not quick fixes):

thanks again for your Herculean effort on this!!!

mickaobrien commented 4 years ago

@eplebel I just pushed some updates there:

Do you have an example of the text being squeezed up against the viewer (where you want to add padding-left: 4px)? I can't see it and just want to make sure the changes I make do the job.

I think the lazy loading thing would be tricky but I'll have a look to see if there are quick solutions.

eplebel commented 4 years ago

ok awesome! i'm seeing the reduced arrow width and top margin updates, but i'm not seeing the 80x80px update. any ideas? (the build looks like it went through ok)

mickaobrien commented 4 years ago

Ah, there was some code missing. I've just pushed an update (f7372e625df764516558ba5f3c7e47667406418b), hopefully it looks ok now.

eplebel commented 4 years ago

I think the lazy loading thing would be tricky but I'll have a look to see if there are quick solutions.

ok sounds good.

ok so close! after these minor tweaks, i'll do some final testing, and then we can push everything to production!!

eplebel commented 4 years ago

Ah, there was some code missing. I've just pushed an update (f7372e6), hopefully it looks ok now.

yup i can see it now, thx!

mickaobrien commented 4 years ago

@eplebel I just pushed a few more commits that should address all the issues above. And I think I misunderstood what you meant about bottom aligning the MiniFigureViewer, it's actually pretty straightforward and commit 0425c1ea1c8b329fe88dcfe82bdfd379ec9f6ec0 should do the job (if my understanding now is correct!). Should it be like this? bottom_aligned_figure_viewer

Let me know if I've missed anything!

eplebel commented 4 years ago

ok, looks like you've covered everything! and yes, that's precisely what i meant with bottom aligning the MiniFigureViewer!

the only tiny thing i noticed is: The new "column" layout for article card (since exposed thumbnail) is preventing authors/pub year and journal name TEXT from overflowing toward the right edge of the card, hence creating lots of extra white space when impact metrics are available. So if you could just update the viewport min-width for hiding impact metrics to 540px (from 375px) , then i think we'll be all good. (in the future, we can better optimize this, by trimming long author lists, and even trimming long titles....) Untitled

though i still need to finish all regression base and UI tests before we push to production, but i'll let you know!

oh and a quick question: What is the best strategy to speed up author page loading performance: Reducing the # of articles w/ at least 1 exposed thumbnails AND/OR reducing the total # of figures?

mickaobrien commented 4 years ago

@eplebel Just pushed a fix to hide the impact metrics at 540px here: 197176cebbcb43bc9f64efe68d5633bf5ad0e45e

I'll have a look at the Author Page loading, I think it might be possible to add lazy loading to the carousel but I need to have a look.

eplebel commented 4 years ago

awesome, thx. and sounds great re: lazy loading!

mickaobrien commented 4 years ago

@eplebel Just pushed a version with lazy-loading there (e7451fb824e213bb9795f3f71e36d192de8e4f10). I think it should work but want to have a look around on staging first.

But the build is failing with this error:

Your app may not have more than 210 versions. Please delete one of the existing versions before trying to create a new version.

I've had a look through the Google Cloud Platform console but I think I have access to the master deployment (curate-science) not the staging (curate-science-staging). Not sure what the best way to fix it is, maybe @alexkyllo would know?

eplebel commented 4 years ago

ok @mickaobrien i've now granted you Editor, App Engine Admin, and Error reporting admin on the curate-science-staging-2 project in GCP. please let me know if you need access to anything else.

manually deleting old deployments is probably best solution for now, but looks like there might be better automated solutions to this (according to this but i of course have no idea). @alexkyllo any ideas?

mickaobrien commented 4 years ago

@eplebel Thanks for that! I deleted a bunch of old versions manually, there's probably a better way of handling this in general but it's cleared some space for the moment...

I've pushed the lazy loading now — it loads the first image automatically, the next and previous image when you hover over the first image and any subsequent images when they're one image away (i.e. next or previous in the carousel). This has reduced the number of image requests on page load e.g. on your author page, before lazy loading there were 90 image requests on page load, now there are 43. One outstanding issue is that a lot of the images are much bigger than they need to be. I see the code around generating thumbnails is there but I don't think it's saving the file to the database (even though the thumbnail is being created) and those thumbnails aren't being used anywhere on the frontend. I know there are plans to increase the size of the thumbnails on the article page (#64) and maybe other changes so it might be worth looking at as part of these changes.

alexkyllo commented 4 years ago

I just spent some time looking into this app version thing and it doesn't appear to be very well documented. Travis CI has a note here: https://docs.travis-ci.com/user/deployment/google-app-engine/#version-to-deploy

Version to deploy

Either the version flag or the default option must be set. 
If default is true, the default version will be deployed to, which will be
http://your-project-id.appspot.com. If the version flag is set instead,
it will deploy to http://version-dot-your-project-id.appspot.com.

Right now this flag is not set in our .travis.yml, but my guess is that the default behavior is equivalent to setting version: default. We can try setting it to a named version and see if subsequent deployments overwrite that version instead of creating more versions.

eplebel commented 4 years ago

@eplebel Thanks for that! I deleted a bunch of old versions manually, there's probably a better way of handling this in general but it's cleared some space for the moment...

I've pushed the lazy loading now — it loads the first image automatically, the next and previous image when you hover over the first image and any subsequent images when they're one image away (i.e. next or previous in the carousel). This has reduced the number of image requests on page load e.g. on your author page, before lazy loading there were 90 image requests on page load, now there are 43. One outstanding issue is that a lot of the images are much bigger than they need to be. I see the code around generating thumbnails is there but I don't think it's saving the file to the database (even though the thumbnail is being created) and those thumbnails aren't being used anywhere on the frontend. I know there are plans to increase the size of the thumbnails on the article page (#64) and maybe other changes so it might be worth looking at as part of these changes.

wow, this is really next-level stuff! huge kudos. the lazy loading updates have indeed improved page load performance noticeably, i'm very happy with it. and the pre-loading on HOVER is really slick. i left a comment on the relevant commit (https://github.com/ScienceCommons/curate_science/commit/3a50744cafccd22bde7f3ccca235efca1a0b5b4f#commitcomment-37459220) re: a small issue for touch-enabled devices.

And that's very interesting re: thumbnails, which I was completely unaware of (so thx so much for this info...). Yes it's good enough for now, but definitely should be further optimized in the future!

eplebel commented 4 years ago

I just spent some time looking into this app version thing and it doesn't appear to be very well documented. Travis CI has a note here: https://docs.travis-ci.com/user/deployment/google-app-engine/#version-to-deploy

Version to deploy

Either the version flag or the default option must be set. 
If default is true, the default version will be deployed to, which will be
http://your-project-id.appspot.com. If the version flag is set instead,
it will deploy to http://version-dot-your-project-id.appspot.com.

Right now this flag is not set in our .travis.yml, but my guess is that the default behavior is equivalent to setting version: default. We can try setting it to a named version and see if subsequent deployments overwrite that version instead of creating more versions.

Thanks so much Alex for looking into this. Your solution sounds good, but wouldn't that mean that we wouldn't have previous builds to revert back to? Or I guess that could be handled within TravisCI and/or gitHub? If so, then sure you can go ahead and update the .yml file for both prod and staging, thx!