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(helpers): ent-4366 optional chaining for numbro #832

Merged
merged 2 commits into from
Nov 12, 2021

Conversation

cdcabrera
Copy link
Member

What's included

  • fix(helpers): ent-4366 optional chaining for numbro

Notes

  • convenience for behind the scenes. there are scenarios where the hook based components will "do all the things" to setup and can cause issues with functions expecting strict types
  • we also expanded the RHOSAK decimal conversion check using numbro to confirm that as long as we don't receive a decimal places higher it will trim values. In RHOSAKS case we cap at 5 decimal places for all metrics. Instance hours, in theory, should cap itself at 2.
    • If it doesn't we'll have to go back and create a custom graph mod so that each metric can set its own graph x/y axis ticks if it's standalone. Right now the graph only allows setting the x/y axis ticks as a whole. It should be a similar mod to the x/y graph axis label.

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test
  3. confirm all tests pass. there should be no visual changes associated with this update.

Example

...

Updates issue/story

ent-4366

@cdcabrera cdcabrera added bug Something isn't working 202112 project phase labels Nov 12, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #832 (76b8ec3) into ci (4a02667) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Impacted file tree graph

@@           Coverage Diff           @@
##               ci     #832   +/-   ##
=======================================
  Coverage   93.90%   93.91%           
=======================================
  Files         121      121           
  Lines        3366     3370    +4     
  Branches     1281     1282    +1     
=======================================
+ Hits         3161     3165    +4     
  Misses        190      190           
  Partials       15       15           
Impacted Files Coverage Δ
src/components/graphCard/graphCardChartTooltip.js 95.74% <0.00%> (ø)
src/components/graphCard/graphCardMetricTotals.js 94.59% <ø> (ø)
src/config/product.openshiftDedicated.js 95.45% <ø> (ø)
src/config/product.openshiftMetrics.js 95.00% <ø> (ø)
src/common/helpers.js 100.00% <100.00%> (ø)
src/components/graphCard/graphCardHelpers.js 89.18% <100.00%> (ø)
src/config/product.rhosak.js 66.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a02667...76b8ec3. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202112 project phase bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants