[deploy] Fix podcast pagination client/API mismatch (#7375)

* Fix podcast pagination API

* Adjust css for podcast header

* Adjust test

* Adjust test
This commit is contained in:
Ben Halpern 2020-04-28 10:07:36 -04:00 committed by GitHub
parent 2d20d67594
commit 8f2c32249c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 63 deletions

View file

@ -196,34 +196,6 @@
display: none;
}
}
.subscribe-buttons {
text-align: center;
a {
padding: 5px;
background-color: rgb(47, 61, 73);
color: white;
border-radius: 3px;
margin: 6px;
font-size: 14px;
display: inline-block;
width: 40%;
border: 1px solid rgb(60, 81, 99);
box-shadow: inset 1px 1px 0 rgb(72, 95, 116);
transition: background-color 250ms ease;
@media screen and (min-width: 590px) {
width: 112px;
}
&:hover {
background-color: rgb(41, 46, 52);
}
img {
width: 20px;
height: 20px;
vertical-align: -4px;
margin-right: 4px;
}
}
}
.container {
margin-bottom: 60px;
margin-top: 20px;

View file

@ -52,13 +52,19 @@
width: 100%;
padding: 15px 0px;
@media screen and (min-width: 950px) {
vertical-align: 3px;
vertical-align: 5px;
display: inline-block;
font-size: calc(1.9vw + 8px);
font-size: calc(1.5vw + 8px);
width: 280px;
padding: 3px 0px;
}
}
@media screen and (min-width: 1600px) {
font-size: 55px;
.follow-action-button {
font-size: 32px;
}
}
}
img.record {
height: 150px;
@ -76,37 +82,6 @@
vertical-align: calc(-1vw - 15px);
}
}
.subscribe-buttons {
text-align: center;
margin-top: 35px;
z-index: 10;
position: relative;
a {
padding: 5px;
background-color: rgb(47, 61, 73);
color: white;
border-radius: 3px;
margin: 6px;
font-size: 14px;
display: inline-block;
width: 40%;
border: 1px solid rgb(60, 81, 99);
box-shadow: inset 1px 1px 0 rgb(72, 95, 116);
transition: background-color 250ms ease;
@media screen and (min-width: 590px) {
width: 112px;
}
&:hover {
background-color: rgb(41, 46, 52);
}
img {
width: 20px;
height: 20px;
vertical-align: -4px;
margin-right: 4px;
}
}
}
}
.user-profile-header-container,
.tag-or-query-header-container {

View file

@ -1,5 +1,6 @@
json.array! @podcast_episodes do |episode|
json.type_of "podcast_episodes"
json.type_of "podcast_episodes"
json.class_name "PodcastEpisode"
json.extract!(episode, :id, :path, :title)

View file

@ -32,9 +32,10 @@ RSpec.describe "Api::V0::PodcastEpisodes", type: :request do
get api_podcast_episodes_path
response_episode = response.parsed_body.first
expect(response_episode.keys).to match_array(%w[type_of id path image_url title podcast])
expect(response_episode.keys).to match_array(%w[class_name type_of id path image_url title podcast])
expect(response_episode["type_of"]).to eq("podcast_episodes")
expect(response_episode["class_name"]).to eq("PodcastEpisode")
%w[id path title].each do |attr|
expect(response_episode[attr]).to eq(podcast_episode.public_send(attr))
end