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

HEEDLS-377 - edit centre manger details implemented and some detail l… #329

Merged

Conversation

DanBloxham-sw
Copy link
Contributor

…ist styling commonised

  • Tested on chrome, IE11, Edge, Firefox
  • Tested No JS, screen reader, mobile view/zoom
  • Ran all unit tests.

Screen shots:
Regular page:
Edit page

With errors:
Edit page with errors

Mobile:
Edit page mobile view

Copy link
Contributor

@AlexJacksonDS AlexJacksonDS 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 small comments, looks mostly fine though.

Can you check the line endings in CentreConfigurationController, I assume they are now consistent, but I've been having issues with them (it's another file I've touched that is showing up as all having changed)

<button class="nhsuk-button nhsuk-u-margin-top-4" type="submit" value="save">Save</button>
</form>

<div class="nhsuk-back-link">
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a back link view component that you can use instead of this (unless for some reason this one is different)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is mildly different as it uses "Cancel" as the link text rather than "Go Back". I was contemplating modifying the back link component to take in some link text in the model. Originally, I decided not to as:

  • Putting the link text as an optional parameter wouldn't work as tag helpers don't seem to understand optional parameters ( ViewComponentTagHelper: Allow optional parameters dotnet/aspnetcore#5011 ). So whenever the Go Back component was used, we'd have to specify the text.
  • I think the vast majority of cases will probably just be "Go Back", so it will be more simple to not have to specify the text.

Though now I am working on other centre detail editing tickets, I see they will also want a Cancel back link, so I don't know if making a new Cancel Link view component (that would basically be identical to the back link, except for the text) would be preferred, or modifying the back link to take in link text would be easier.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, the NHS back link is the styling around the text, so if you do find you want to make a component, I think changing the existing one to accept a parameter would probably be better. They require the parameters to be specified, but there is nothing stopping us defining it such that if you enter no text for the parameter (i.e. text="") then it would default to Go Back

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 we should either create a new VC with "Cancel" text as it will be used in loads of places, or we can modify the back button to take text as a parameter (either Cancel or Go back - I think having a default might be confusing if text is set to "")

@DanBloxham-sw
Copy link
Contributor Author

Just checked the line endings in CentreConfigurationController - they are all consistently CRLF.

@AlexJacksonDS AlexJacksonDS self-requested a review May 18, 2021 08:52
<vc:error-summary order-of-property-names="@(new[] { nameof(Model.FirstName), nameof(Model.LastName), nameof(Model.Email), nameof(Model.Telephone) })"/>
}

<h1 id="page-heading" class="nhsuk-heading-xl">Centre manager details</h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

Super minor, but could we change the h1 + title to "Edit XXX"?

Copy link
Contributor

@stellake stellake left a comment

Choose a reason for hiding this comment

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

Just one comment about the title of the page, otherwise looks good! No need for rereview 👍

@stellake stellake merged commit 50029e7 into master May 18, 2021
@DanBloxham-sw DanBloxham-sw deleted the HEEDLS-377-CentreConfigurationEditCentreManagerDetails branch May 19, 2021 09:47
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.

3 participants