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

Fix message text in two-part tariff review screen #1116

Merged
merged 4 commits into from
Jun 18, 2024
Merged

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Jun 18, 2024

On the Review screen when there are licences in review we show a message letting users know how many there are. Currently when there is only 1 licence in review the text displays as 1 licences whereas it should be singular and display 1 licence.

This PR corrects that text.

On the Review screen when there are licences in review we show a message letting users know how many there are. Currently when there is only 1 licence in review the text displays as `1 licences` whereas it should be singular and display `1 licence`.

This PR corrects that text.
@Jozzey Jozzey added the bug Something isn't working label Jun 18, 2024
@Jozzey Jozzey self-assigned this Jun 18, 2024
@Jozzey Jozzey marked this pull request as ready for review June 18, 2024 10:48
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

Sorry, I know I'm pushing a quick fix to be something bigger.

But if we pushed this logic into the presenter, not only would we make the view simpler we could also add a unit test to cover this.

I'd push for the review-bill-run.presenter.js to be updated to generate the message. The view can then be completely 'dumb' and just display whatever message is determined by the presenter.

@Jozzey
Copy link
Contributor Author

Jozzey commented Jun 18, 2024

Sorry, I know I'm pushing a quick fix to be something bigger.

But if we pushed this logic into the presenter, not only would we make the view simpler we could also add a unit test to cover this.

I'd push for the review-bill-run.presenter.js to be updated to generate the message. The view can then be completely 'dumb' and just display whatever message is determined by the presenter.

That was an option I was considering but didn't bother as it was supposed to be a quick fix and now it isn't 😁 Still shouldn't take long.

@Jozzey Jozzey requested a review from Cruikshanks June 18, 2024 12:13
@Jozzey Jozzey merged commit 64c76a1 into main Jun 18, 2024
6 checks passed
@Jozzey Jozzey deleted the fix-tpt-review-message branch June 18, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants