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

round shorthand for formatterParams.options.maximumFractionDigits #1072

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

dbauszus-glx
Copy link
Member

I have a feeling that formatting is often done in the query fieldfx rather than in the infoj entry config because of the formatterParams being rather verbose to match the toLocaleString() config.

This PR provides a shorthand round:int for the type:numeric entry config.

{
  "title": "Aged <18",
  "type": "numeric",
  "round": 1,
  "field": "age0to18_perc",
  "suffix": "%",
  "inline": true
}

@dbauszus-glx dbauszus-glx added the Feature New feature requests or changes to the behaviour or look of existing application features. label Jan 23, 2024
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@AlexanderGeere AlexanderGeere left a comment

Choose a reason for hiding this comment

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

Tested on an instance, works great. Much cleaner as well.
@dbauszus-glx Could you update the docs here https://github.com/GEOLYTIX/xyz/wiki/Workspace-Configuration#numeric-1, to mention this new way of rounding.

Copy link
Contributor

@RobAndrewHurst RobAndrewHurst left a comment

Choose a reason for hiding this comment

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

Looks all good to me :)

@dbauszus-glx dbauszus-glx merged commit 27bb241 into GEOLYTIX:main Jan 24, 2024
5 checks passed
@dbauszus-glx dbauszus-glx deleted the numeric-round branch March 15, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature requests or changes to the behaviour or look of existing application features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants