-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move speech document #4573
base: main
Are you sure you want to change the base?
Move speech document #4573
Conversation
876a571
to
01f9f7e
Compare
01f9f7e
to
ce2b218
Compare
ce2b218
to
c08cd5b
Compare
@@ -0,0 +1,8 @@ | |||
<% if content_item.historically_political? %> |
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.
I think this shared partial should also be in a separate commit, which is then followed by the generation of the locale keys in c08cd5b
@view_context = ApplicationController.new.view_context | ||
end | ||
|
||
def display_date(timestamp, format = "%-d %B %Y") |
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.
You can remove this method as the helper method is already available in date_helper.rb
app/views/speech/show.html.erb
Outdated
</div> | ||
</div> | ||
|
||
<%= render 'shared/publisher_metadata_with_logo' %> |
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.
This has been renamed to publisher_metadata
in c4dceb3
@@ -37,18 +37,18 @@ def component_name | |||
expect(rendered).to have_css(".app-c-important-metadata dt", text: "Case type:") |
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.
I think this file crept into this commit during a rebase
spec/system/speech_spec.rb
Outdated
expect(page).to have_text("Published 8 March 2016") | ||
end | ||
|
||
# Check important metadata |
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.
This test will need to be updated to use the metadata block component instead
spec/system/speech_spec.rb
Outdated
expect(page).to have_text("Location: Women in Nuclear UK Conference, Church House Conference Centre, Dean's Yard, Westminster, London") | ||
end | ||
|
||
# Check the footer for published dates |
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.
This comment can be removed
expect(page).to have_css(".gem-c-translation-nav") | ||
expect(page).to have_text("بوريس جونسون: يمنح القرار الترخيص اللازم لمنظمة حظر الأسلحة الكيميائية لإزالة سلائف تلك الأسلحة من ليبيا تمهيدا لإتلافها في بلد ثالث. وبذلك نكون قد خففنا خطر وقوع هذه الأسلحة في أيدي الإرهابيين ") | ||
end | ||
end |
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.
I think an additional test can be added to test a withdrawn speech page, where we would expect the notice is included on the page.
@@ -1,22 +1,26 @@ | |||
<% content_for :title do %> |
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 the commit message be updated to mention the changes made to the view
app/models/concerns/withdrawable.rb
Outdated
@@ -9,5 +9,38 @@ def withdrawn? | |||
def withdrawal_notice | |||
content_store_hash["withdrawn_notice"] | |||
end | |||
|
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.
I think this accidentally crept in during a rebase.
- Speech presenter that handles retrieving of important_metadata is copied over from government-frontend - from and speaker_without_profile methods are handled in Speech model instead of presenter Commit audit trail - https://github.com/alphagov/government-frontend/blob/122ae292fa540059ee165a94f8129d873c5205d5/app/presenters/speech_presenter.rb
- Commit audit trail: https://github.com/alphagov/government-frontend/blob/122ae292fa540059ee165a94f8129d873c5205d5/app/presenters/content_item/news_image.rb - Commit audit trail for tests: https://github.com/alphagov/government-frontend/blob/90cf5386b165b3a342689744feece7c83449b153/test/presenters/content_item/news_image_test.rb
- Commit audit trail: https://github.com/alphagov/government-frontend/blob/e7b9db33536f487991ba907502080e0625a066cc/app/presenters/content_item/political.rb - Reference commit for political concern tests: 57bb3e1
- Commit audit trail: https://github.com/alphagov/government-frontend/blob/e7b9db33536f487991ba907502080e0625a066cc/app/presenters/content_item/updatable.rb - Commit audit trail for tests: https://github.com/alphagov/government-frontend/blob/a7e99cf556dbc5d8b8fab5a317157136cadeb8a0/test/presenters/content_item/updatable_test.rb Reference commit: 8e5a21d
Commit audit trail - https://github.com/alphagov/government-frontend/blob/e7b9db33536f487991ba907502080e0625a066cc/app/presenters/content_item/withdrawable.rb Commit audit trail - https://github.com/alphagov/government-frontend/blob/d7c3224a784329516798da1c40be3943fc302c55/test/presenters/content_item/withdrawable_test.rb Reference commit: 5b7ae24
- To handle the translations in history_notice partial - Audit trail: https://github.com/alphagov/government-frontend/tree/90cf5386b165b3a342689744feece7c83449b153/config/locales
- Run the command : rake "consolidation:copy_translation[speech,formats.speech]"
- Add important-metadata component in stylesheets and views - Update dartsass.rb and add yaml file - Add important_metadata component tests
- Added request tests and modified the system tests to rpsec tests in frontend - Commit audit trail: https://github.com/alphagov/government-frontend/blob/90cf5386b165b3a342689744feece7c83449b153/test/integration/speech_test.rb
- Updated code with important_metadata changes Audit trail: alphagov/government-frontend@b1da197
- Run the command: rake "consolidation:copy_translation[content_item.schema_name.written_statement,formats.written_statement]"
- To handle the pluralization for Speech in all the locales Run the command: rake "consolidation:copy_translation[content_item.schema_name.speech,formats.speech]" Commit audit trail: https://github.com/alphagov/government-frontend/tree/122ae292fa540059ee165a94f8129d873c5205d5/config/locales
- Important-metadata related files have been removed from government-frontend as it is handled differently. - Audit trail: alphagov/government-frontend@b1da1974729332a7abcea81a34c39400c574ebfbhttps://github.com/alphagov/government-frontend/commit/b1da1974729332a7abcea81a34c39400c574ebfb
…d its related concerns - Refactor to handle the speaker link along with the organisations for speeches in Speech model - Modify Views with publisher_metadata content Reference commit: 338bfe1
- Add tests for speech model and its related concerns
c08cd5b
to
67343ba
Compare
What
To handle the rendering of Speech document type from government_frontend to frontend as part of [RFC 175]
Why
https://trello.com/c/IKDY5W9u/371-move-document-type-speech-from-government-frontend-to-frontend
How
To add a scoped route for, a controller, a model and a view. Here we split up the methods in the original file into presenter, model and its related concerns, with the minimum functionality required to get Speech document working.
Screenshots?
Frontend
Government-Frontend