-
Notifications
You must be signed in to change notification settings - Fork 21
Move call for evidence pages from government-frontend #4855
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
Draft
deborahchua
wants to merge
43
commits into
main
Choose a base branch
from
move-call-for-evidence
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Similar to consultations, call for evidence documents have different stages: - unopened call for evidence - open call for evidence - closed call for evidence - call for evidence outcome
The view has been directly copied over from government-frontend. It will be updated to match the new data structure in a later commit. Commit audit trail: - https://github.com/alphagov/government-frontend/blob/f1f866238d476a4281cd79fdbab2d671c6d46619/app/views/content_items/call_for_evidence.html.erb
Ran `bundle exec erb_lint --lint-all --autocorrect`
This keeps it consistent with the approach in other document types, which call the metadata component directly. It has also been updated to use `extra_headers`, which ensures that the open graph meta tags are added to the page source correctly. We also need to add in the description tag as the machine_readable_metadata component only adds the og tag i.e. <meta name="og:description" content="description"> Audit trail: machine_readable_metadata_helper.rb: https://github.com/alphagov/government-frontend/blob/0adbc42e5591f9ad914791306b1ae2558f9d3cfc/app/helpers/machine_readable_metadata_helper.rb
This is rather than porting across the `heading_and_context` presenter in government-frontend. Audit trail: - https://github.com/alphagov/government-frontend/blob/0adbc42e5591f9ad914791306b1ae2558f9d3cfc/app/presenters/content_item/heading_and_context.rb
Ran rake "consolidation:copy_translation[content_item.schema_name.call_for_evidence, formats.call_for_evidence]" Audit trail: - https://github.com/alphagov/government-frontend/tree/0adbc42e5591f9ad914791306b1ae2558f9d3cfc/config/locales
Attachments and NationalApplicability do not exist in Frontend yet and will be added in subsequent commits. Audit trail: - https://github.com/alphagov/government-frontend/blob/0adbc42e5591f9ad914791306b1ae2558f9d3cfc/app/presenters/call_for_evidence_presenter.rb#L6-L8
This was introduced in ad511e0
These were introduced in 4b1d2d4 and can be used in the withdrawn notice banner.
These methods are used in the `attachments_list` partial, which will also be included on consultation and publication pages. There were no existing tests and have now been added. Audit trail: - https://github.com/alphagov/government-frontend/blob/0adbc42e5591f9ad914791306b1ae2558f9d3cfc/app/presenters/content_item/attachments.rb
This is used to pass information to the `devolved_nations` publishing component. It is also used by a number of other document types: - consultation - detailed_guide - html_publication - publication There were no existing tests and have now been added. Commit audit trail: - https://github.com/alphagov/government-frontend/blob/main/app/presenters/content_item/national_applicability.rb > app/models/concerns/national_applicability.rb
There were no existing tests and have now been added. Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L11-L17
Call for evidence documents have different stages (by document type). They are used in the view to determine which sections of information are shown. Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L31-L45 - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/test/presenters/call_for_evidence_presenter_test.rb#L63-L75
Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L11-L29 - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/test/presenters/call_for_evidence_presenter_test.rb#L26-L61
There were no existing tests in government-frontend and have now been added. Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L47-L49
It is also included on consultation and publication pages. Audit trail: - https://github.com/alphagov/government-frontend/blob/c229e1c71ffb8424c1e072fa99db33cecf13e199/app/views/content_items/_attachments_list.html.erb
Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L51-L65 - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/test/presenters/call_for_evidence_presenter_test.rb#L26-L97
Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L67-L73 - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/test/presenters/call_for_evidence_presenter_test.rb#L99-L105
The methods `ways_to_respond?` and `response_form?` are called in the view to determine whether certain sections are shown on the page. They were originally returning the first contact details available in their check, but we only care about whether they are present or not. Audit trail: - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/app/presenters/call_for_evidence_presenter.rb#L75-L97 - https://github.com/alphagov/government-frontend/blob/ef31d532d50a1ae80e8831f2f6eac60f54e06ec9/test/presenters/call_for_evidence_presenter_test.rb#L107-L148
Ran rake "consolidation:copy_translation[content_item.schema_name.open_call_for_evidence, formats.open_call_for_evidence.name]" Audit trail: - https://github.com/alphagov/government-frontend/tree/cadb97a620b03c18037aec2c4df72546048e6a87/config/locales
Ran rake "consolidation:copy_translation[content_item.schema_name.closed_call_for_evidence, formats.closed_call_for_evidence.name]" Audit trail: - https://github.com/alphagov/government-frontend/tree/cadb97a620b03c18037aec2c4df72546048e6a87/config/locales
Ran rake "consolidation:copy_translation[content_item.schema_name.call_for_evidence_outcome, formats.call_for_evidence_outcome.name]" Audit trail: - https://github.com/alphagov/government-frontend/tree/cadb97a620b03c18037aec2c4df72546048e6a87/config/locales
Ran rake "consolidation:copy_translation[call_for_evidence, formats.call_for_evidence]" Audit trail: - https://github.com/alphagov/government-frontend/tree/cadb97a620b03c18037aec2c4df72546048e6a87/config/locales
Ran `bundle exec i18n-tasks mv "formats.call_for_evidence.{few,many,one,other,two,zero}" "formats.call_for_evidence.name.\1"` in line with d2cf3ea
Frontend has a slightly different yaml structure and locale keys for call for evidence content now sit under `formats`.
This is a straight copy from government-frontend, and will be updated in the following commits. Audit trail: - https://github.com/alphagov/government-frontend/blob/cadb97a620b03c18037aec2c4df72546048e6a87/test/integration/call_for_evidence_test.rb
All tests have also been commented out, and incrementally introduced/updated in following commits.
These features apply to all types of call for evidence documents.
Ran govuk-docker-run bundle exec rake "consolidation:copy_translation[components.print_link]"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Copy the rendering code for call for evidence pages from government-frontend.
Why
Trello card
Examples
Welsh only call for evidence:
"Open" call for evidence:
"Closed" call for evidence:
Call for evidence "outcome"
Screenshots?
Welsh only call for evidence
https://www.gov.uk/government/calls-for-evidence/cerbydau-awtomataidd-datganiad-o-egwyddorion-diogelwch.cy
"Open" Call for evidence
https://www.gov.uk/government/calls-for-evidence/review-of-cqc-regulation-9a-visiting-and-accompanying-in-care-homes-hospitals-and-hospices
"Closed" Call for evidence
https://www.gov.uk/government/calls-for-evidence/data-brokers-and-national-security
Call for evidence "outcome"
https://www.gov.uk/government/calls-for-evidence/youth-vaping-call-for-evidence