carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://ibm-products.carbondesignsystem.com
Apache License 2.0
98 stars 138 forks source link

Initialise metrics for PageHeader to avoid anomalous situations arising even transiently #1073

Open dcwarwick opened 3 years ago

dcwarwick commented 3 years ago

For example, the CSS variables that PageHeader sets sometimes get set to things like "undefinedpx" or "NaNpx". They immediately get set to valid values, but it would be better if this didn't happen even briefly.

Rather than initialising metrics as an empty object, then populating it on first call to the util function, and testing the fields on usage to check they've been initialised and using 0 if not, it would be better to initialise it with all the fields set to 0. Then the values can be used without checking, with confidence, and anomalous values should never arise.

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.