Skip to content

Commit

Permalink
Fix component guide previews
Browse files Browse the repository at this point in the history
The result section data was invalid and therefore crashing. None of the component previews were rendering with their CSS.
  • Loading branch information
AshGDS committed Jan 24, 2025
1 parent 9d884a9 commit c996e21
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
2 changes: 2 additions & 0 deletions app/views/components/_result_card.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<%
add_app_component_stylesheet("result-card")

title ||= nil
description ||= nil
url ||= nil
Expand Down
2 changes: 2 additions & 0 deletions app/views/components/_result_item.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<%
add_app_component_stylesheet("result-item")

title ||= nil
url ||= nil
description ||= nil
Expand Down
2 changes: 2 additions & 0 deletions app/views/components/_result_sections.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<%
add_app_component_stylesheet("result-sections")

highlighted ||= true
group_index ||= 1
result_index ||= 1
Expand Down
38 changes: 19 additions & 19 deletions app/views/components/docs/result_sections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ uses_component_wrapper_helper: true
examples:
default:
data:
title: Business tax
results:
topics:
business_tax:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
with-multiple-items:
data:
title: Business tax
results:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- title: "Register for VAT"
url: "/vat-registration"
description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
topics:
business_tax:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- title: "Register for VAT"
url: "/vat-registration"
description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
with-multiple-highlighted-items:
data:
title: Business tax
highlighted: true
results:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- title: "Register for VAT"
url: "/vat-registration"
description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
topics:
business_tax:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- title: "Register for VAT"
url: "/vat-registration"
description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
highlighted: true

0 comments on commit c996e21

Please sign in to comment.