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

Add loader to podcast page #2804

Merged
merged 4 commits into from
Apr 23, 2020
Merged

Add loader to podcast page #2804

merged 4 commits into from
Apr 23, 2020

Conversation

noisecapella
Copy link

@noisecapella noisecapella commented Apr 21, 2020

Pre-Flight checklist

  • Screenshots and design review for any changes that affect layout or styling
  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

Fixes #2781

What's this PR do?

Adds a loader for the podcasts API, reusing the placeholder images we use for a loader on the search page

How should this be manually tested?

Go to /podcasts/ and verify that you see the loader briefly before the results come up.

Screenshots

Screenshot from 2020-04-17 14-27-25

Screenshot from 2020-04-21 11-23-00

@alicewriteswrongs
Copy link
Contributor

I think it might be good to make the placeholder match a little more closely the content that comes to replace it - for instance the short top bar could be removed, the recent episode cards made a little shorter, and the placeholders for the podcasts cards should be portrait cards not landscape

@codecov-io
Copy link

codecov-io commented Apr 21, 2020

Codecov Report

Merging #2804 into master will increase coverage by 10.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2804       +/-   ##
===========================================
+ Coverage   88.23%   98.34%   +10.11%     
===========================================
  Files         242      511      +269     
  Lines       10395    19095     +8700     
  Branches     1172        0     -1172     
===========================================
+ Hits         9172    18779     +9607     
+ Misses       1055      316      -739     
+ Partials      168        0      -168     
Impacted Files Coverage Δ
static/js/components/Loading.js 100.00% <100.00%> (ø)
static/js/components/Loading_test.js 100.00% <100.00%> (ø)
static/js/pages/PodcastFrontpage.js 100.00% <100.00%> (ø)
static/js/pages/PodcastFrontpage_test.js 100.00% <100.00%> (ø)
static/js/util/integration_test_helper.js 98.30% <100.00%> (ø)
channels/views/subscribers.py
channels/__init__.py
open_discussions/recorder.py
notifications/factories.py
...talog/management/commands/backpopulate_edx_data.py
... and 748 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0287f5...97a3bc9. Read the comment docs.

@noisecapella
Copy link
Author

What do you think?

Screenshot from 2020-04-22 14-31-53

Screenshot from 2020-04-22 14-31-43

Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things I noticed

</ContentLoader>
</Card>
),
emptyPostsToRender
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we show 6 recent episodes so it would be good I think to render 6 placeholders

</Card>
</Cell>
),
emptyPostsToRender
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we show these in a 3-item-wide grid, so it would be good to show a multiple of 3 - either 6 or 9 I think.

describe("loader", () => {
[
[true, true, true, true],
[true, false, true, true],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should be true, false, true, false, but when I change it to that locally the test stops passing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The episode rendering looks up information in both the episode and podcasts API data, so if only the podcast data is loading, the episode list still needs to show a spinner

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh that makes sense

Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

loading placeholder for podcast frontpage
4 participants