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

#1694 Add commas to numbers #1698

Merged
merged 3 commits into from
Aug 26, 2022
Merged

Conversation

HalcyonJAC
Copy link
Contributor

@HalcyonJAC HalcyonJAC commented Jul 27, 2022

What's included?

Add commas to numbers so they are easier to read, e.g., 1000 -> 1,000.

This will be anywhere we display numbers on the platform:

  • Applicant count on the Exercises table
  • Applicant count on the Candidates table
  • Overview page
  • Applications menu
  • Stages menu
  • Reports

Who should test?

✅ Product owner
✅ Developers
✅ UTG

How to test?

Go to the admin platform and check number display

Risk - how likely is this to impact other areas?

🟢 No risk - this is a self-contained piece of work

Additional context

Demo:

1694.Add.commas.to.numbers.mov

Related permissions

  • No permission changes required

PREVIEW:DEVELOP
can be OFF, DEVELOP or STAGING

@HalcyonJAC HalcyonJAC self-assigned this Jul 27, 2022
@HalcyonJAC HalcyonJAC temporarily deployed to develop July 27, 2022 12:33 Inactive
@github-actions
Copy link

github-actions bot commented Jul 27, 2022

Visit the preview URL for this PR (updated for commit e777b3c):

https://jac-admin-develop--pr1698-feature-1694-add-com-av2eb7do.web.app

(expires Thu, 01 Sep 2022 11:58:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@HalcyonJAC HalcyonJAC temporarily deployed to develop July 27, 2022 12:51 Inactive
@HalcyonJAC HalcyonJAC temporarily deployed to develop July 27, 2022 12:54 Inactive
@HalcyonJAC HalcyonJAC marked this pull request as ready for review July 27, 2022 13:02
@HalcyonJAC HalcyonJAC requested review from a team as code owners July 27, 2022 13:02
@HalcyonJAC HalcyonJAC temporarily deployed to develop July 27, 2022 13:04 Inactive
Copy link
Member

@warrensearle warrensearle left a comment

Choose a reason for hiding this comment

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

It's good to try and keep our template code as simple and robust as possible.

With that in mind could we update these changes to use a filter instead, along the lines of:

{{ diversity.totalApplications | formatNumber }}

instead of

{{ diversity.totalApplications.toLocaleString('en-GB') }}

Within the formatNumber filter we can then check the value exists before we do anything to it (avoiding possible errors if data doesn't exist). Plus moving forward we will have one place to make changes, should we need to change anything.

@warrensearle warrensearle removed the request for review from lloback August 2, 2022 10:18
@HalcyonJAC HalcyonJAC temporarily deployed to develop August 2, 2022 11:54 Inactive
@HalcyonJAC HalcyonJAC requested a review from warrensearle August 3, 2022 09:52
Copy link
Member

@warrensearle warrensearle left a comment

Choose a reason for hiding this comment

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

@HalcyonJAC excellent this is much nicer... and units tests too 👍

@HalcyonJAC HalcyonJAC merged commit 444c02c into main Aug 26, 2022
@HalcyonJAC HalcyonJAC deleted the feature/1694-add-commas-to-numbers branch August 26, 2022 08:55
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.

4 participants