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

GL-385: Create the first two steps of the Check Moving Requirement user journey #1897

Merged
merged 14 commits into from May 24, 2024

Conversation

alexdesi
Copy link
Contributor

@alexdesi alexdesi commented May 1, 2024

Jira link

https://transformuk.atlassian.net/browse/GL-385
https://transformuk.atlassian.net/browse/GL-388

Create the first two steps of the Check Moving Requirement feature

  • Step1 is the /check_moving_requirements/start page
  • Step2 is the /check_moving_requirements/edit page

What?

These pages are part of the user journey to check for the requirements for moving goods from GB to NI

Why?

Part of the GL job

Have you? (optional)

  • [] Reviewed view changes with stakeholders
    WIP

  • Validated mobile responsive behaviour of view changes
    WIP

Deployment risks (optional)

TODO: need to put this feature behind feature flag

@alexdesi alexdesi marked this pull request as ready for review May 3, 2024 15:14
@alexdesi alexdesi force-pushed the GL-385_check_moving_requirements_step1_2 branch from ae3f39f to be5e9ec Compare May 3, 2024 15:15
@alexdesi
Copy link
Contributor Author

alexdesi commented May 3, 2024

page /check_movement_requirements/start:
Screenshot from 2024-05-03 16-16-44

page /check_movement_requirements/edit:
Screenshot from 2024-05-03 16-17-17

page /check_movement_requirements/result
Screenshot from 2024-05-03 16-17-03

Copy link
Contributor

@jebw jebw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, looks good - there's some changes which I think would benefit it

  1. Namespacing the code (models/conrtollers/views) - even if the routes need to be at the top level, we can still keep the code a bit more organised
  2. I think its possible to use resources ... in the config/routes.rb to clean that up a little
  3. It might make sense to have a generic green lanes feature flag I think since we'll want to use the same for the results screens but if you're envisioning those just using this feature flag then that should be fine

<%= f.govuk_text_field :commodity_code, width: 'one-quarter',
label: { text: 'Commodity Code'} %>

<hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to self close? not quite sure what does and does not anymore post html5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,


is the correct way in html5, XHTML is more restrict and it need to be close

</p>

<%= f.govuk_text_field :commodity_code, width: 'one-quarter',
label: { text: 'Commodity Code'} %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks a bit off?

Comment on lines 53 to 55
maxlength_enabled: true,
legend: { text: 'When is the movement of goods taking place?', size: 's', tag: 'h1' },
hint: { text: "Arrangements can change over time. If you are unsure of the date of movement and want to check arrangements currently in place, enter today's date." } %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation?

app/controllers/check_moving_requirements_controller.rb Outdated Show resolved Hide resolved
.env.development Outdated
@@ -10,6 +10,7 @@ BASIC_USERNAME=test
BETA_SEARCH_HEADING_STATISTICS_THRESHOLD=3
BETA_SEARCH_FACET_FILTER_DISPLAY_PERCENTAGE_THRESHOLD=5
BETA_SEARCH_SWITCHING_ENABLED=true
CHECK_MOVING_REQUIREMENTS_ENABLED=false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREEN_LANES_ENABLED

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, also I reused/renamed the ALLOW_GREEN_LANES (added by @rasikasri )

config/routes.rb Outdated
Comment on lines 218 to 227
get '/check_moving_requirements/start', to: 'check_moving_requirements#start', as: :start_check_moving_requirements
get '/check_moving_requirements/edit', to: 'check_moving_requirements#edit', as: :edit_check_moving_requirements
put '/check_moving_requirements/update', to: 'check_moving_requirements#update', as: :update_check_moving_requirements
get '/check_moving_requirements/result', to: 'check_moving_requirements#result', as: :result_check_moving_requirements

# This solution does not work because edit action could have an empy commodity_code in the URL
# resources :check_moving_requirements, only: %i[show update edit] do
# get 'start', on: :collection
# end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'd originally suggested a singular resource but it feels like this set of screens maps better to a plural resource?

  scope module: :green_lanes do
    resources :check_moving_goods_requirements, only: %i[index edit update destroy]
  end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adopted a similar solution, under the existing
namespace :green_lanes do

@alexdesi alexdesi force-pushed the GL-385_check_moving_requirements_step1_2 branch 4 times, most recently from 3f951e6 to 73af903 Compare May 9, 2024 13:34
jebw
jebw previously approved these changes May 9, 2024
Copy link
Contributor

@jebw jebw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

app/forms/check_moving_requirements_form.rb Outdated Show resolved Hide resolved
@alexdesi alexdesi force-pushed the GL-385_check_moving_requirements_step1_2 branch 3 times, most recently from a1db56a to 23bd0a6 Compare May 15, 2024 10:43
@alexdesi alexdesi force-pushed the GL-385_check_moving_requirements_step1_2 branch from 72c350b to e957d3d Compare May 23, 2024 15:59
@alexdesi alexdesi force-pushed the GL-385_check_moving_requirements_step1_2 branch from e957d3d to 0585a5d Compare May 23, 2024 16:12
@alexdesi alexdesi merged commit 65a3dfb into main May 24, 2024
18 checks passed
@alexdesi alexdesi deleted the GL-385_check_moving_requirements_step1_2 branch May 24, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants