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

Results box component - Routes Wizard #4412

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sarahcrack
Copy link
Collaborator

@sarahcrack sarahcrack commented Dec 9, 2024

Trello card

https://trello.com/c/isyaeq4w/7085-build-results-box-component-for-routes-wizard

Context

We are introducing a new routes wizard and to be able to display results for candidates. We want to build a new results box component that can be used to display route wizard results.

Changes proposed in this pull request

Created a ResultsBoxComponent that can be used for displaying results to users when using the routes wizard. The component can be used to display results within a grey border as well as the 'Most popular route' with title and a yellow border.

Guidance to review

  • Default border colour is a grey border with no title. This can be dynamically changed when rendering to include a title and yellow border.
  • For now I have used the LinkAsButton component as a placeholder for the CTA (this will be changed when the new CTA link component has been built).
  • To render/test the component locally you can use the following code (remove titleand border_color to see the grey 'default' box):
<%= render Content::ResultsBoxComponent.new(
         title: "Most popular route", 
         heading: "Postgraduate Initial Teacher Training with fees", 
         fee: "Yes", course_length: "9 months (full-time) or up to 2 years (part-time)", 
         funding: "Scholarships or bursaries, as well as student loans, are available if you're eligible", 
         text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore 
                  magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
                  commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 
                  pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est 
                  laborum.", 
         link_text: "Find out more", 
         link_target: "/steps-to-become-a-teacher", 
         border_color: :yellow, 
 ) %>

@github-actions github-actions bot added ruby Pull requests that update Ruby code test Style labels Dec 9, 2024
@github-actions github-actions bot added the Review label Dec 9, 2024
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review ruby Pull requests that update Ruby code Style test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant