-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add indent guides to trace timeline view (#172) #297
Add indent guides to trace timeline view (#172) #297
Conversation
Signed-off-by: Everett Ross <reverett@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 82.33% 82.58% +0.25%
==========================================
Files 141 141
Lines 3119 3153 +34
Branches 651 654 +3
==========================================
+ Hits 2568 2604 +36
+ Misses 437 435 -2
Partials 114 114
Continue to review full report at Codecov.
|
Signed-off-by: Everett Ross <reverett@uber.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 👍 LMK if you want to discuss any of these suggestions.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffsetDuck.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffsetDuck.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.css
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.css
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look great!
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.test.js
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.test.js
Outdated
Show resolved
Hide resolved
}, | ||
], | ||
}; | ||
wrapper = shallow(<UnconnectedSpanTreeOffset {...props} />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to do .setProps(...)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the indent guides are calculated in the constructor so it needs to be a new wrapper if different indent guides are supposed to be rendered.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.test.js
Outdated
Show resolved
Hide resolved
|
||
import { mapDispatchToProps, mapStateToProps, UnconnectedSpanTreeOffset } from './SpanTreeOffset'; | ||
|
||
describe('SpanTreeOffset', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look great 👍
let store; | ||
|
||
beforeEach(() => { | ||
store = createStore(reducer, newInitialState()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think you can test the actions without a store, or is uising a store preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I based this off of pre-existing ducks. now that it has been merged into TraceTimelineViewer/duck
I adhered to the pattern present in that file.
In the past I have tested actions and reducers without createStore
Signed-off-by: Everett Ross <reverett@uber.com>
Signed-off-by: Everett Ross <reverett@uber.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments. LMK what you think.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.js
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.css
Show resolved
Hide resolved
|
||
import './SpanTreeOffset.css'; | ||
|
||
type SpanTreeOffsetProps = { | ||
level: number, | ||
type SpanTreeOffsetOwnPropsType = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of shortening the name of types that aren't exported? For instance:
OwnPropsType
- Instead of
SpanTreeOffsetOwnPropsType
- Instead of
PropsType
- Instead of
SpanTreeOffsetPropsType
- Instead of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the pattern I saw in other files, such as SpanBarRow
or VirtualizedTraceView
I'm not too particular about either, but I do generally like long-ish variable names for clarity.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Everett Ross <reverett@uber.com>
…ides Signed-off-by: Everett Ross <reverett@uber.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
…racing#297) * Add indent guides to trace timeline view (jaegertracing#172) Signed-off-by: Everett Ross <reverett@uber.com> * Add tests for connect functions, add more flow types Signed-off-by: Everett Ross <reverett@uber.com> * Consolidate ducks, remove redudant PropTypes, add event type Signed-off-by: Everett Ross <reverett@uber.com> * Rename hoverSpanId to hoverIndentGuideId Signed-off-by: Everett Ross <reverett@uber.com> * Derive props from span, use dataset over getAttribute Signed-off-by: Everett Ross <reverett@uber.com> Signed-off-by: Everett Ross <reverett@uber.com>
…racing#297) * Add indent guides to trace timeline view (jaegertracing#172) Signed-off-by: Everett Ross <reverett@uber.com> * Add tests for connect functions, add more flow types Signed-off-by: Everett Ross <reverett@uber.com> * Consolidate ducks, remove redudant PropTypes, add event type Signed-off-by: Everett Ross <reverett@uber.com> * Rename hoverSpanId to hoverIndentGuideId Signed-off-by: Everett Ross <reverett@uber.com> * Derive props from span, use dataset over getAttribute Signed-off-by: Everett Ross <reverett@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
…racing#297) * Add indent guides to trace timeline view (jaegertracing#172) Signed-off-by: Everett Ross <reverett@uber.com> * Add tests for connect functions, add more flow types Signed-off-by: Everett Ross <reverett@uber.com> * Consolidate ducks, remove redudant PropTypes, add event type Signed-off-by: Everett Ross <reverett@uber.com> * Rename hoverSpanId to hoverIndentGuideId Signed-off-by: Everett Ross <reverett@uber.com> * Derive props from span, use dataset over getAttribute Signed-off-by: Everett Ross <reverett@uber.com> Signed-off-by: Everett Ross <reverett@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Which problem is this PR solving?
Short description of the changes
Examples
(not sure why gifs have odd background patterns, it looks fine in the browser and as captured before converted to gif)
Mousing over an indent guide thickens the indicator line:
Mousing over the collapse icon indicates all rows that will be hidden by collapsing the row:
When viewing row details, the indent guides are present as expected: