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

UI template without links for Organisation Details #53

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

SocFoot
Copy link
Contributor

@SocFoot SocFoot commented Dec 22, 2023

model and template

template model and spec

Context

In this pr we are introduce the first part of organisation details we don't have data yet for Special educational needs and disabilities and additional details.
Our goal is to have the result looking the closest to the demo app

Changes proposed in this pull request

We created a component, we created a page and test related to the page.

Guidance to review

Check demo app and compare it to the screenshoot or local

Link to Trello card

Ticket

Things to check

  • If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
  • This code does not rely on migrations in the same Pull Request
  • If this code includes a migration adding or changing columns, it also backfills existing records for consistency
  • If this code adds a column to the DB, decide whether it needs to be in analytics yml file or analytics blocklist
  • API release notes have been updated if necessary
  • If it adds a significant user-facing change, is it documented in the CHANGELOG?
  • Required environment variables have been updated or added to the Azure KeyVault

Screenshots

Screenshot 2023-12-22 at 15 56 20

@SocFoot SocFoot force-pushed the add_organisation_details branch 3 times, most recently from ad32226 to 3063772 Compare December 22, 2023 15:46
@SocFoot SocFoot requested review from elceebee, CatalinVoineag, gms-gs and JamieCleare2525 and removed request for elceebee and CatalinVoineag December 22, 2023 16:02
Copy link
Contributor

@elceebee elceebee left a comment

Choose a reason for hiding this comment

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

A few translation things which aren't a big deal, but I definitely think the organisation needs to be the School model, not the GiasSchool.

I've tested it locally and it works as expected.

app/components/navigation_bar.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
spec/system/home_page_spec.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@CatalinVoineag CatalinVoineag left a comment

Choose a reason for hiding this comment

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

Good work. I'm a bit confused on the user flow we need here. Maybe you didn't pull the latest version of main. But I expected to have a organisations#show controller and route here so we can redirect the user to the organisations details from here if he has multiple organisations or from here if he has only one organisation.

Happy to jump on a call for more detail.

app/components/navigation_bar.rb Outdated Show resolved Hide resolved
app/components/navigation_bar.rb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
@SocFoot SocFoot force-pushed the add_organisation_details branch 5 times, most recently from 84277e7 to e488d09 Compare January 2, 2024 17:53
app/controllers/claims/pages_controller.rb Outdated Show resolved Hide resolved
app/helpers/navigation_bar_helper.rb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/assets/stylesheets/application.sass.scss Outdated Show resolved Hide resolved
app/helpers/navigation_bar_helper.rb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/layouts/application.html.erb Outdated Show resolved Hide resolved
spec/system/claims/view_organisations_spec.rb Show resolved Hide resolved
spec/system/home_page_spec.rb Outdated Show resolved Hide resolved
app/controllers/claims/pages_controller.rb Outdated Show resolved Hide resolved
app/components/application_component.rb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
@SocFoot SocFoot force-pushed the add_organisation_details branch from e488d09 to 9a26afd Compare January 3, 2024 11:23
@elceebee elceebee self-requested a review January 3, 2024 12:26
@elceebee elceebee dismissed their stale review January 3, 2024 12:28

Comments and suggestions only, don't want to be a blocker

@SocFoot SocFoot force-pushed the add_organisation_details branch from 9a26afd to 86f1ebd Compare January 3, 2024 13:04
@CatalinVoineag
Copy link
Contributor

CatalinVoineag commented Jan 3, 2024

Good work. I'm a bit confused on the user flow we need here. Maybe you didn't pull the latest version of main. But I expected to have a organisations#show controller and route here so we can redirect the user to the organisations details from here if he has multiple organisations or from here if he has only one organisation.

Happy to jump on a call for more detail.

This has been changed to schools#index now for the claims domain #64

@SocFoot SocFoot force-pushed the add_organisation_details branch from 86f1ebd to a53d41b Compare January 3, 2024 17:26
@SocFoot SocFoot force-pushed the add_organisation_details branch 3 times, most recently from 328d802 to 8e90969 Compare January 4, 2024 11:49
@@ -1,2 +1,5 @@
class Claims::PagesController < ApplicationController
def index
@user = User.first
Copy link
Contributor

Choose a reason for hiding this comment

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

I've just realised. Is this the correct page?

The organisation details should be for the /schools/:school_id page, right?

app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
app/views/claims/pages/index.html.erb Outdated Show resolved Hide resolved
spec/system/home_page_spec.rb Outdated Show resolved Hide resolved
@SocFoot SocFoot changed the title template without links add_organisation_details template without links Jan 4, 2024
@SocFoot SocFoot changed the title add_organisation_details template without links UI template without links for Organisation Details Jan 4, 2024
@SocFoot SocFoot force-pushed the add_organisation_details branch from 8e90969 to 1522e51 Compare January 4, 2024 16:19
@SocFoot SocFoot requested review from a team as code owners January 4, 2024 16:19
@SocFoot SocFoot force-pushed the add_organisation_details branch from 1522e51 to c672260 Compare January 4, 2024 17:17
Copy link
Contributor

@Nitemaeric Nitemaeric left a comment

Choose a reason for hiding this comment

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

The user redirection flow will be

Sign In -> Organisations -> Organisation (if a user only has 1 Org)

This will also handle the case of when a user lands on the Organisations page and they will be redirected.

For now, we'll keep the root path in, but we can remove it once we know what we want to do for sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this deletion from the set of changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

This also has not been addressed.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file also doesn't need to change

Copy link
Contributor

Choose a reason for hiding this comment

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

This hasn't been addressed.

@@ -1,7 +1,7 @@
scope module: :claims, as: :claims, constraints: { host: ENV["CLAIMS_HOST"] } do
root to: "pages#index"
root to: "schools#show"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please leave this as pages#index. We will update the after_sign_in_path in another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't clear, it would be good in the future to put these indication in the ticket.
Screenshot 2024-01-04 at 18 13 31

spec/system/claims/pages/home_spec.rb Outdated Show resolved Hide resolved
@SocFoot SocFoot force-pushed the add_organisation_details branch from 3d59381 to b0060c9 Compare January 4, 2024 18:17
Copy link
Contributor

Choose a reason for hiding this comment

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

This hasn't been addressed.

Copy link
Contributor

Choose a reason for hiding this comment

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

This also has not been addressed.

app/views/claims/schools/show.html.erb Outdated Show resolved Hide resolved
config/locales/en.yml Outdated Show resolved Hide resolved
@SocFoot SocFoot force-pushed the add_organisation_details branch from 709e0d1 to 3ec8e22 Compare January 4, 2024 19:06
<div class="govuk-grid-row">
<br><br>
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= t("claims.pages.index.heading") %></h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this page pointing to the index controller action? 😅

spec/system/claims/view_school_spec.rb Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove the added methods from this spec.

@SocFoot SocFoot force-pushed the add_organisation_details branch 2 times, most recently from 876c929 to 8e74878 Compare January 5, 2024 15:24
@@ -71,6 +71,15 @@ en:
heading: Placements news and updates
contents: Contents
claims:
schools:
index:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
index:
show:

@@ -0,0 +1,54 @@
require "rails_helper"

RSpec.feature "School Page" do
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RSpec.feature "School Page" do
RSpec.describe "School Page", type: :system do

require "rails_helper"

RSpec.feature "School Page" do
after { Capybara.app_host = nil }
Copy link
Contributor

Choose a reason for hiding this comment

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

Once the above is added, this is already handled by the Rails Helper.

Comment on lines 18 to 20
def given_i_am_on_the_claims_site
Capybara.app_host = "http://#{ENV["CLAIMS_HOST"]}"
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already handled by the services test helper that is included into System specs.

@SocFoot SocFoot force-pushed the add_organisation_details branch from 8e74878 to 224d5d3 Compare January 5, 2024 15:35
Copy link
Contributor

@Nitemaeric Nitemaeric left a comment

Choose a reason for hiding this comment

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

Thanks for going through each of the issues!

@SocFoot SocFoot force-pushed the add_organisation_details branch from 224d5d3 to 5a41526 Compare January 5, 2024 15:39
model and template

template model and spec

rubocop

fix test

fix request changes

lint

request changes, add empty claim page, update test and routes

request changes
@SocFoot SocFoot merged commit 9f4e937 into main Jan 5, 2024
3 checks passed
@SocFoot SocFoot deleted the add_organisation_details branch January 5, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants