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 app error component #3074

Merged
merged 4 commits into from
Feb 6, 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
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
Loading