-
Notifications
You must be signed in to change notification settings - Fork 484
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
Fixes TraceTimelineViewer span details render issue #629
Conversation
Signed-off-by: Ruben Vargas <[email protected]>
40e1399
to
e6259db
Compare
Codecov Report
@@ Coverage Diff @@
## master #629 +/- ##
==========================================
+ Coverage 93.54% 93.59% +0.05%
==========================================
Files 227 227
Lines 5901 5902 +1
Branches 1485 1483 -2
==========================================
+ Hits 5520 5524 +4
+ Misses 340 337 -3
Partials 41 41
Continue to review full report at Codecov.
|
Tested with hotrod example, seems to fix the problem. |
@tklever please review |
I pulled this code locally and I can no longer replicate the "empty box" problem. This looks good (to my limited expertise). I cooked up a couple tests last night to lock in @rubenvp8510's work in this PR, specifically to ensure that the memoization he added is preserved and can't be accidentally removed. When this PR (or some version of it) lands, I'll submit some unit tests so we (or I in this case :-( ) can't reintroduce this regression in the future. |
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx
Show resolved
Hide resolved
Signed-off-by: Ruben Vargas <[email protected]>
@yurishkuro Could you approve this change please? Thanks! |
* Fixes TraceTimelineViewer span details Signed-off-by: Ruben Vargas <[email protected]> * perform deep comparision for memoized ViewBoundsFunc and GetCssClasses Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
* Fixes TraceTimelineViewer span details Signed-off-by: Ruben Vargas <[email protected]> * perform deep comparision for memoized ViewBoundsFunc and GetCssClasses Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
* Fixes TraceTimelineViewer span details Signed-off-by: Ruben Vargas <[email protected]> * perform deep comparision for memoized ViewBoundsFunc and GetCssClasses Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
Which problem is this PR solving?
VirtualizedTraceView
to remove deprecated methodcomponentWillReceiveProps
and use thecomponentDidUpdate
instead.Short description of the changes
componentWillReceiveProps
to derive data from properties and store in the instance attributes to avoid recompute it in each render call, With the migration, that process was changed tocomponentDidUpdate
, but this is not correct,RowState
computation on that method doesn't trigger a new render process, so we ended up seeing something not in sync with theRowState
. This change uses memoization forrowState
to avoid recompute it each time.