-
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
Update publication pages #2302
base: main
Are you sure you want to change the base?
Update publication pages #2302
Conversation
af29f84
to
4b21153
Compare
4b21153
to
b277098
Compare
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.
Couple of things look to need addressing, one simple and one more challenging.
5c3a7b4
to
c4c40de
Compare
c4c40de
to
505ffba
Compare
505ffba
to
19f23a5
Compare
19f23a5
to
920bcb9
Compare
920bcb9
to
3f6cce4
Compare
The context_label is being defined by "schema_name: "publication" - should this be present this determines whether we class this as a "publication or consultation" Ensure title of page has "context_inside" Content prefixed to a "publication or consultation" Should content be [withdrawn] this also adds the "context_label" (or grey text) to the title scoped to items that have been identified as a "publication or consultation" Remove the loops around the attachments and just apply the context_label in all cases. Remove word "overview" from "context_inside"
No longer required
3f6cce4
to
0a10ea6
Compare
end | ||
|
||
def publication_overview | ||
overview = (I18n.exists?("content_item.#{schema_name}") == "publication" || "statistical_data_set") |
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.
Could you expand a little on what's going on here to help me understand? I have two questions:
- Why is statistical_data_set relevant? It's not a sub type of publication so we never expect to apply this overview/context title behaviour to it.
- Why are you looking up whether there is a translation for the schema_name ? Don't we want to always apply overview if it's a publication?
It feels like this could be as simple as line 32 - 34 being
def context_title?
content_item.#{schema_name} == "publication"
end
and lines 36-44 being removed, but I expect I'm missing something. Or multiple somethings.
What
Apply the
context_inside
option to the title component to all publications, remove the word "overview" yet keep translations.Why
Recently some work made the 'grey text' of publication pages
h1
. This provided various benefits including for screen readers and tabs. However, we only did this for pages where the title of the page and attachment are the same. For consistency this change applies to all publication pages. So that we don't have some pages that operate in one way, and others that do it differently. Also it adds benefits.Visuals
Anything else
Checked against:
http://government-frontend.dev.gov.uk/government/consultations/appraisal-periods-consultation
Add context title
Consultation outcome: Appraisal periods consultation
http://government-frontend.dev.gov.uk/government/publications/information-superiority-jdn-213
Adds withdrawn and keep context title
[Withdrawn] Guidance: Information superiority: more than managing information
http://government-frontend.dev.gov.uk/government/organisations/department-of-health-and-social-care/about
No context title
About us - Department of Health and Social Care
http://government-frontend.dev.gov.uk/government/statistical-data-sets/cw010-proportion-of-residents-walking-or-cycling-at-least-once-a-month
Adds withdrawn and no context title (as not a publication or consultation)
[Withdrawn] Proportion of residents who do any walking or cycling (at local authority level) (CW010)
Related PRs
#2238
#2292