Render the speeches format #215
Conversation
Solid work. The speaker image doesn't look like it's full width on tablet in the new version, is that intentional? |
updated: @content_item.updated, | ||
history: @content_item.history, | ||
part_of: @content_item.part_of | ||
%> |
tvararu
Dec 21, 2016
Contributor
There's 3 different variations of ending tag %>
positioning in this file but I don't mind.
There's 3 different variations of ending tag %>
positioning in this file but I don't mind.
bevanloon
Dec 22, 2016
Contributor
We do seem to have several different styles of closing %>
through the project. I'm not overly bothered, but it might be worth a tidy up at some point.
We do seem to have several different styles of closing %>
through the project. I'm not overly bothered, but it might be worth a tidy up at some point.
@tvararu The image width is intentional yes, when it goes full size it swamps the view a little. This is the current image behaviour on other formats. |
Looks good |
@@ -0,0 +1,41 @@ | |||
<%= content_for :page_class, @content_item.format.dasherize %> | |||
<%= content_for :title, @content_item.title %> | |||
|
bevanloon
Dec 22, 2016
Contributor
Should we also include:
<%= content_for :meta_description, @content_item.description %>
?
Should we also include:
<%= content_for :meta_description, @content_item.description %>
?
updated: @content_item.updated, | ||
history: @content_item.history, | ||
part_of: @content_item.part_of | ||
%> |
bevanloon
Dec 22, 2016
Contributor
We do seem to have several different styles of closing %>
through the project. I'm not overly bothered, but it might be worth a tidy up at some point.
We do seem to have several different styles of closing %>
through the project. I'm not overly bothered, but it might be worth a tidy up at some point.
Run `bundle exec rails generate format speech`
By parsing `page.text` and fetching content, double spaces will always be stripped and replaced with a single space. Double spaces have no effect on the rendered output. Many examples have included double spaces in their body which have led to tests failing unnecessarily. Make the test a little more lenient in what it accepts.
The image doesn’t add content to the page. Many formats show an empty sidebar column instead. This is preferable. This is the behaviour we want for speeches by people without a GOVUK profile. Apply it to case studies too.
Speakers without profiles aren’t included in links, because they aren’t represented as content on GOV.UK. The most notable example is The Queen. * Insert the speaker into the `from` in the metadata * Also insert into the footer for consistency
Also use `page_title` method which gets updated when content is withdrawn
Tests will fail until the corresponding schema changes have been merged and deployed: alphagov/govuk-content-schemas#468
Main story:
https://trello.com/c/TWsLTRzc/547-10-speech-migration-mvp-content-schema-examples-and-front-end-work
Speech sub types
Speaker images
The images are pulled from the profile of the assigned speaker. For now the frontend expects this to come from the
image
property in the details. It may in future make more sense for it to come via an image property in the links hash of the speaker – as that's the dependency.Omissions
Screenshots