sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(metrics): Add missing 'return' statement in <WidgetDetails />

Open floels opened this issue 9 months ago • 3 comments

Goal

The goal of this PR is to add a missing return statement in the rendering logic of the <WidgetDetails /> component defined in static/app/views/metrics:

https://github.com/getsentry/sentry/blob/6b530ffab46d0b50512f0f4c9df8d084c1feb831/static/app/views/metrics/widgetDetails.tsx#L54-L56

This return was most likely forgotten when writing this piece of code. This probably doesn't result in any bug: by incorrectly continuing the rendering function, we end up also rendering a <MetricDetails /> component with undefined mri, op and query.

The code makes more sense with the return statement though.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

floels avatar May 08 '24 15:05 floels

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.00%. Comparing base (fd8d3df) to head (175186f). Report is 374 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70512      +/-   ##
==========================================
+ Coverage   79.97%   80.00%   +0.03%     
==========================================
  Files        6495     6495              
  Lines      289790   289919     +129     
  Branches    49928    49947      +19     
==========================================
+ Hits       231753   231950     +197     
+ Misses      57625    57558      -67     
+ Partials      412      411       -1     
Files Coverage Δ
static/app/views/metrics/widgetDetails.tsx 0.00% <0.00%> (ø)

... and 70 files with indirect coverage changes

codecov[bot] avatar May 08 '24 16:05 codecov[bot]

/gcbrun

evanpurkhiser avatar May 14 '24 14:05 evanpurkhiser

Thanks @evanpurkhiser and @edwardgou-sentry for the review! Do you think we can get this merged?

floels avatar May 18 '24 11:05 floels