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

Feature/1599 update feedback controller #48

Merged
merged 19 commits into from
May 10, 2023

Conversation

mr-nick17
Copy link
Contributor

@mr-nick17 mr-nick17 commented May 2, 2023

What

Rewriting the app

  • Updated to v2 of dp-renderer (template changes within app mean fields and inputs can be imported 🎉 )
  • Moved mapping to mapper.go + covered logic with unit tests
  • Removed lots of view logic to testable location (mapper.go and feedback.go)
  • Form validation is handled within a specific function validateForm (with unit tests)
  • Instantiated handlers with a receiver type to tidy up the function signatures and improve readability
  • Removed unused isPositive logic
  • Update go to v1.20.4
  • Update and fixed linter

How to review

Sense check
Tests pass
Image review

Form using the ONS design system

example fields on feedback form

Example of validation error

form validation error

Who can review

!me

handlers/feedback.go Outdated Show resolved Hide resolved
@lindenmckenzie
Copy link
Contributor

Have reviewed code, design and accessibility and all seems fine - will just review the tests and their coverage after meetings this morning.

README.md Show resolved Hide resolved
Copy link
Contributor

@lindenmckenzie lindenmckenzie left a comment

Choose a reason for hiding this comment

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

I don't have any major concerns about this and it reflects a really positive upshift in the quality of this application. I've highlighted a few bits on the PR which if you want to tackle / discuss that's great, but if you feel like it continues to add weight to this then happy for this PR to proceed as is.

Copy link
Contributor

@lindenmckenzie lindenmckenzie left a comment

Choose a reason for hiding this comment

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

v v v v v minor update on a goconvey description.

config/config.go Outdated
IsPublishingMode bool `envconfig:"IS_PUBLISHING_MODE"`
IsPublishing bool `envconfig:"IS_PUBLISHING"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Another card for the secrets update or want to cover it under this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -199,12 +199,12 @@ func Test_addFeedback(t *testing.T) {
So(len(mockRenderer.BuildPageCalls()), ShouldEqual, 0)
})

Convey("Then the email sender is called", func() {
Convey("Then the email sender is not called", func() {
So(len(mockSender.SendCalls()), ShouldEqual, 0)
})

Convey("Then a 500 response is returned", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor update for Convey description now it's a 400.

Copy link
Contributor

@lindenmckenzie lindenmckenzie left a comment

Choose a reason for hiding this comment

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

🎉

@mr-nick17 mr-nick17 merged commit eb12a4d into develop May 10, 2023
@mr-nick17 mr-nick17 deleted the feature/1599-update-feedback-controller branch May 10, 2023 12:56
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