-
Notifications
You must be signed in to change notification settings - Fork 17
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 the news and communications section #1002
Conversation
e9ab068
to
489e42e
Compare
href: promo[:link][:path], | ||
heading_text: promo[:link][:text], | ||
image_src: promo[:image][:url], | ||
image_alt: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to get the actual alt text of the image in news_and_communications.rb
, I'd only set alt
to ""
if we're using the placeholder image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I think we talked about this in the accessibility session. I should have been a bit more overt. I think when the image is part of a link it should use the link text instead of the alt text? (I may be wrong).
Either way, I can add the alt text and it shouldn't make anything worse. 👍
Adding this flushed out that we were making an unnecessary request when taxon ids weren't provided.
Using guids can be confusing for future us
News and comms are different from the other sections in that we show the image from the article if it's a featured link (and the image is present). This will be updated in future to get content images from rummager which removes the need to call content store for each item. We'll also update this to display results as one list rather than separate items.
489e42e
to
4e66117
Compare
News and communications are displayed differently from the other sections in that we show images from articles for the first three items. We'll show a placeholder if there isn't an image.
This functionality will be updated in future to get content images from rummager which removes the need to call content store for each item.
We'll also update this to display results as one list rather than as separate items. We have this as an item in the backlog, but it'll need work on a couple of components to achieve
I've also added tests for the services supergroup presenter, as these were missing
Examples:
You will need to have an extension like ModHeader installed in your browser to see the B Variant. The values should be:
Request Header Name: GOVUK-ABTest-ContentPagesNav
Request Header Value: B
Component guide for this PR:
https://government-frontend-pr-1002.herokuapp.com/component-guide
https://trello.com/c/XCqGIGZE/49-get-most-recent-news-and-communications-data