Skip to content
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

Remove metadata component #3682

Merged
merged 5 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/assets/stylesheets/components/_metadata.scss

This file was deleted.

4 changes: 4 additions & 0 deletions app/helpers/calendar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ def last_updated_date
def time_tag_safe(date)
tag.time(datetime: date) { l(date, format: "%e %B") }.html_safe
end

def format_date(date)
l date, format: "%e %B %Y"
end
end
4 changes: 2 additions & 2 deletions app/views/calendar/bank_holidays.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
} %>
</article>

<%= render "components/metadata", {
last_updated: last_updated_date
<%= render "govuk_publishing_components/components/metadata", {
last_updated: format_date(last_updated_date)
} %>
</section>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/calendar/when_do_the_clocks_change.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<p class="govuk-body"> <%= t('bank_holidays.gmt_explanation') %> </p>
</article>

<%= render "components/metadata", {
last_updated: last_updated_date
<%= render "govuk_publishing_components/components/metadata", {
last_updated: format_date(last_updated_date)
} %>
</div>
<%= render :partial => "calendar_footer" %>
Expand Down
6 changes: 0 additions & 6 deletions app/views/components/_metadata.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/components/docs/metadata.yml

This file was deleted.

1 change: 0 additions & 1 deletion config/initializers/dartsass.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
APP_STYLESHEETS = {
"application.scss" => "application.css",
"components/_calendar.scss" => "components/_calendar.css",
"components/_metadata.scss" => "components/_metadata.css",
"components/_subscribe.scss" => "components/_subscribe.css",
"views/_calendars.scss" => "views/_calendars.css",
"views/_cookie-settings.scss" => "views/_cookie-settings.css",
Expand Down
1 change: 0 additions & 1 deletion config/locales/cy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ cy:
download_ics: Llwythwch y dyddiadau hyn i lawr er mwyn eu hychwanegu at raglen calendr fel iCal neu Outlook
extra_bank_holiday: Gŵyl banc ychwanegol
holiday_entitlement_html: Nid oes yn rhaid i'ch cyflogwr roi <a href="/holiday-entitlement-rights" title="Holiday entitlement rights" class="govuk-link">gwyliau â thâl i chi ar wyliau banc neu gyhoeddus</a>.
last_updated: Diweddarwyd ddiwethaf
nations:
england-and-wales: Cymru a Lloegr
england-and-wales_for: ar gyfer Cymru a Lloegr
Expand Down
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ en:
download_ics: Download these dates so you can add them to a calendar application such as iCal or Outlook
extra_bank_holiday: Extra bank holiday
holiday_entitlement_html: Your employer does not have to give you <a href="/holiday-entitlement-rights" title="Holiday entitlement rights" class="govuk-link">paid leave on bank or public holidays</a>.
last_updated: Last updated
nations:
england-and-wales: England and Wales
england-and-wales_for: for England and Wales
Expand Down
20 changes: 0 additions & 20 deletions test/components/metadata_test.rb

This file was deleted.

4 changes: 2 additions & 2 deletions test/integration/bank_holidays_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ class BankHolidaysTest < ActionDispatch::IntegrationTest
should "be formatted correctly" do
Timecop.travel(Date.parse("5th Dec 2012")) do
visit "/bank-holidays"
within ".app-c-metadata" do
assert page.has_content?("Last updated: 5 December 2012")
within ".gem-c-metadata" do
assert page.has_content?("Last updated 5 December 2012")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/integration/gwyliau_banc_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ class GwyliauBancTest < ActionDispatch::IntegrationTest
should "be translated and localised" do
Timecop.travel(Date.parse("25th Dec 2012")) do
visit "/gwyliau-banc"
within ".app-c-metadata" do
assert page.has_content?("Diweddarwyd ddiwethaf: 25 Rhagfyr 2012")
within ".gem-c-metadata" do
assert page.has_content?("Diweddarwyd ddiwethaf 25 Rhagfyr 2012")
end
end
end
Expand Down