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

[#1434] Added video section in Homepage #1541

Merged
merged 15 commits into from
Mar 16, 2023
Merged

Conversation

lucascumsille
Copy link
Contributor

@lucascumsille lucascumsille commented Dec 22, 2022

Fixes: #1434
A specific of #791.

@garethrees
Before merging a couple of things:

  • In this PR, I have added only three videos, but let me know if you want to add the rest of the list. My only concern is that some of the titles differ in length. The card layout takes that into account and makes all the cards have the same height, but of course, some of them will have more extra white space between the inner elements.
  • Is the position alright? Right below the how it works section.

Screenshot 2022-12-23 at 08 50 47

I thought this would be a better place because, in terms of info and content, we haven't reached the page section that has more content to read; therefore, I thought users would probably have the chance to see this content in comparison to leaving it at the end of the page.

  • I left a comment of for the donation button here
  • In terms of styling I thought of these two options, let me know which one you prefer. Personally I find the card layout easier to scan:

Option 1

Screenshot 2022-12-23 at 08 50 37

Option 1 mobile version

Screenshot 2022-12-23 at 08 44 33

In this one we could replace the link for a button styling instead, if you are not too keen on the links with icons.
What I like about them, without looking at the label they already telling you what they are.

Option 2

Screenshot 2022-12-21 at 11 17 41

Let me know your thought and I'll fix the PR

@lucascumsille
Copy link
Contributor Author

@garethrees One thing it would be good to have in mind. Do you want me to change the background colour of the video section, so it doesn't look like the "Recent Videos" section and the "Who can I request information from?" are from the same section. I couldn't find many examples on the current website to use, at the moment we have #f3f1eb and #ffffff, but these ones are above and below the video section so potentially I'll need to create a new background colour to make it differ from those sections.

@lucascumsille lucascumsille changed the title 1434 Video Section [1434] Added video section in Homepage Dec 23, 2022
Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

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

This looks great!

I have added only three videos

This is plenty.

My only concern is that some of the titles differ in length…

I think it looks great with the current videos and I'm not too concerned that we'll have titles that are wildly different in length.

In terms of styling I thought of these two options, let me know which one you prefer. Personally I find the card layout easier to scan

I agree, the card layout is lovely. Could we use YouTube embeds, though? Only having to add a new URL to the @research_videos data structure would be much easier, rather than having to copy/paste the titles and create a thumbnail image every time we want to add a video. Keeping the cost of change low is very valuable.

I left a comment of for the donation button here

I'd like the donation button CTA as described, since that's one of the main reasons for adding these sections. I agree we should still have a "browse more" link that goes to our channel, but as the secondary CTA. I'm happy with the phrasing as I wrote it in the issue for now; this isn't worth lots of people's time this minute. We can tune it later on.

Is the position alright? Right below the how it works section. I thought this would be a better place because, in terms of info and content, we haven't reached the page section that has more content to read; therefore, I thought users would probably have the chance to see this content in comparison to leaving it at the end of the page.

I'm not sure what you mean by "we haven't reached the page section that has more content to read", but as with the research papers, ideally we'd position this below the "Who can I request information from?" / "What information has been requested?" section. The reason for this is that the research papers and videos are more incidental content, whereas the Alaveteli-generated lists are more directly about what to do on the site.

I can see that we don't have a great way of doing that at this point, so I've made a pull request – which will hopefully be merged by the time you read this! – that makes it easier to do this and keep the overrides a little simpler.

Should be an easy change:

  • Create lib/views/general/_frontpage_extra.html.erb
  • Add <%= render :partial => "frontpage_videos" %> to that file

@lucascumsille
Copy link
Contributor Author

I'm glad you like it @garethrees

I agree, the card layout is lovely. Could we use YouTube embeds, though? Only having to add a new URL to the @research_videos data structure would be much easier, rather than having to copy/paste the titles and create a thumbnail image every time we want to add a video. Keeping the cost of change low is very valuable.

This is how the embeds would look like with the provided space:
Screenshot 2023-01-09 at 09 53 03

Without the YouTube API I don't think we can get the title.

Instead of using the embed we could use the "ID" of the video to pull the thumbnail and the link. But the title would be needed to be added manually. This way we could keep the same card aesthetic without using the API. For the image Alt I would use the title.
Example:
<% @research_videos = [ { title: 'Reforming Freedom of Information: mySociety policy paper launch event', id: 'AbXowwJDn3M'}, { title: 'The FOI Clearing House: an openDemocracy investigation into FOI at the heart of government', id: 'wXbhBHfeOzk',} { title: 'Workshop: What can you do with FOI?', id: 'meaLp7p2Yok'}, ] %>

In terms of the donation would this work for you? Basically gives more priority the donation action than the "Browse more", but if you want to make the "Browse more" more obvious I could make it a secondary button, but I don't think is that advisable if the main purpose is for people to donate.

Screenshot 2023-01-09 at 10 27 56

@garethrees
Copy link
Member

Instead of using the embed we could use the "ID" of the video to pull the thumbnail and the link. But the title would be needed to be added manually. This way we could keep the same card aesthetic without using the API. For the image Alt I would use the title.

This looks great – the less we have to do to add a video to the list the better.

In terms of the donation would this work for you?

Here's what I had in mind:

Screenshot 2023-01-09 at 10 51 35

I think it's important to indicate why we're asking for donations. The reason is that it supports us do the interesting things that we're showing immediately above.

@lucascumsille
Copy link
Contributor Author

lucascumsille commented Jan 9, 2023

@garethrees I just pushed three commits that:

  • Leaves the donation button with this layout
    211291822-18e2d6b7-ff0f-4944-95a2-0c441133f1fd

  • The ID now replaces the url and img. The title will also be the alt for the image.

  • Create lib/views/general/_frontpage_extra.html.erb Add <%= render :partial => "frontpage_videos" %> to that file

Let me know if there is anything else you'd like me to do =)

@lucascumsille
Copy link
Contributor Author

Thanks for the feedback @garethrees I have rebased and fixed the indention on this PR.
Let me know if there is anything else.

@garethrees garethrees changed the title [1434] Added video section in Homepage [#1434] Added video section in Homepage Feb 3, 2023
@mysociety-pusher mysociety-pusher force-pushed the 1434-front-end-videos branch 2 times, most recently from 27f173c to 9f6fd11 Compare February 3, 2023 11:53
@garethrees
Copy link
Member

I'm getting having doubts about including the donation value on the button so will mull that over, but aside from that this is ready to go. We'll roll out in conjunction with #1146 and https://github.com/mysociety/Design-Internal-tasks/issues/8#issuecomment-1410057767.

@@ -42,7 +42,7 @@
</div>

<div class="cta-button-wrapper">
<a class="button" href="https://www.mysociety.org/donate/?utm_medium=link&how-much=10">Donate £10</a>
<a class="button" href="<%= donation_url('how-much' => 10, utm_content: 'homepage donate 10', utm_campaign: 'wdtk-homepage-videos') %>">Donate £10</a>
Copy link
Member

Choose a reason for hiding this comment

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

@ajparsons just want to check the utm tracking here.

Currently this generates the following URL (split for ease of reading):

https://www.mysociety.org/donate?
  how-much=10&
  utm_campaign=wdtk-homepage-videos&
  utm_content=homepage+donate+10&
  utm_medium=link&
  utm_source=whatdotheyknow.com

I think I'll drop the £ value and change the button text to "Donate now", so that will end up as:

https://www.mysociety.org/donate?
  how-much=10&
  utm_campaign=wdtk-homepage-videos&
  utm_content=homepage+donate+now&
  utm_medium=link&
  utm_source=whatdotheyknow.com

Is this what you'd expect? Easy to change if there's a better combo.

Copy link
Contributor

@ajparsons ajparsons Mar 16, 2023

Choose a reason for hiding this comment

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

Good on campaigns settings, if dropping "donate £10" drop the how-much because our suggested one-off donation is now higher than that. If keeping it, also add an 'how-often=one-off' parameter.

See https://github.com/mysociety/orgsites/pull/1321 for more info on that.

Can be used in combination for a double button like this (example from the blog)

image

We use 2-space
All related to FOI / Transparency
* More specific heading
* Use “watch more” as we’ll be using “browse more” for a research papers
  section, so this adds some variety
`donation_url` sets some of the basic utm params. Also manually added
some location-specific params.
We're experimenting with this a bit so easier to just point towards the
correct page and use its defaults.
@mysociety-pusher mysociety-pusher merged commit 1db1164 into master Mar 16, 2023
@mysociety-pusher mysociety-pusher deleted the 1434-front-end-videos branch March 16, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Present FOI & Transparency TICTeC videos on the front page
4 participants