mozilla-frontend-infra/firefox-performance-dashboards

Warning in console.

Closed this issue ยท 10 comments

App while running throws a warning in console.
I have attached the snapshot to have a clear idea of what warning is about ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป.

Screenshot 2019-12-17 at 23 25 25

@armenzg should I resolve this?

Yes, please!

propTypes warnings are not super critical but it can sometimes show a bug unknown to the developer.

@armenzg sure, but when I will remove the required , then it will ask for its default value what do you think should I place default value of yLabel?

I believe it is string. You can verify this by using the debugger and inspecting the value.

Yes, it is a string, but is undefined in everywhere Tp6 Microsoft

@armenzg feel free to review ๐Ÿ‘

In all cases here it was undefined.

   const {
      series, dayRange, includeSubtests, title, yLabel,
    } = this.props;

This fn sets it actually sets it if it is `undefined`.
export const generateChartJsOptions = (meta, yLabel) => {
  const higherIsBetter = (meta.lower_is_better === false);
  const reversed = higherIsBetter;
  const label = yLabel || (higherIsBetter ? 'Score' : 'Execution time (ms)');
  return chartJsOptions(reversed, label);
};

So I think I should set default to undefined, will update the PR ๐Ÿ‘

Congrats on your first code landing on this repo!
๐ŸŽ‰

@armenzg I think sentry addition was first ๐Ÿ˜…

That's over a week old! I can't remember that far ๐Ÿ˜
Thanks again for both contributions!