Skip to content

Commit

Permalink
Merge pull request #3074 from alphagov/remove_app_error_component
Browse files Browse the repository at this point in the history
Remove app error component
  • Loading branch information
jon-kirwan authored Feb 6, 2024
2 parents 7fcf8bf + 4e4f628 commit fb0eeae
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 75 deletions.
10 changes: 0 additions & 10 deletions app/assets/stylesheets/components/_error-message.scss

This file was deleted.

10 changes: 0 additions & 10 deletions app/assets/stylesheets/components/helpers/_variables.scss

This file was deleted.

10 changes: 0 additions & 10 deletions app/views/components/_error_message.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/components/docs/error_message.yml

This file was deleted.

17 changes: 10 additions & 7 deletions app/views/content_items/service_sign_in/_choose_sign_in.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
method: "post",
data: data_attrs) do %>
<% legend_text = render 'govuk_publishing_components/components/title', title: @content_item.title %>
<% description_text = render 'govuk_publishing_components/components/govspeak' do %>
<% raw(@content_item.description) %>
<% end %>

<%= render "govuk_publishing_components/components/fieldset", legend_text: legend_text do %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/govspeak', {} do %>
<%= raw(@content_item.description) %>
<% end %>
<% if @error %>
<%= render "components/error_message", text: t('service_sign_in.error.option') %>
<% end %>
<%= render "govuk_publishing_components/components/radio", id_prefix: @content_item.options_id, name: "option", items: @content_item.options %>
<%= render "govuk_publishing_components/components/radio",
id_prefix: @content_item.options_id,
name: "option",
error_message: (t('service_sign_in.error.option') if @error),
description: description_text,
items: @content_item.options %>
</div>
</div>
<% end %>
Expand Down
1 change: 0 additions & 1 deletion config/initializers/dartsass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"components/_banner.scss" => "components/_banner.css",
"components/_contents-list-with-body.scss" => "components/_contents-list-with-body.css",
"components/_download-link.scss" => "components/_download-link.css",
"components/_error-message.scss" => "components/_error-message.css",
"components/_figure.scss" => "components/_figure.css",
"components/_important-metadata.scss" => "components/_important-metadata.css",
"components/_published-dates.scss" => "components/_published-dates.css",
Expand Down
23 changes: 0 additions & 23 deletions test/components/error_message_test.rb

This file was deleted.

2 changes: 1 addition & 1 deletion test/integration/service_sign_in/choose_sign_in_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest
# Make sure the id is the same as the link href so that they'll link together properly.
assert page.has_css?(".gem-c-radio input[id='option-0'][value='use-government-gateway']", visible: false)

assert page.has_css?(".app-c-error-message", text: "Please select an option")
assert page.has_css?(".gem-c-error-message", text: "Please select an option")
end

test "page less options without an or divider" do
Expand Down

0 comments on commit fb0eeae

Please sign in to comment.