Skip to content

Commit f14fde5

Browse files
author
Nathan Yang
committed
chore: revert timelineRuler class to camel case and prefix with 'explore'
Signed-off-by: Nathan Yang <yanatha@amazon.com>
1 parent ae1fb37 commit f14fde5

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/plugins/explore/public/application/pages/traces/trace_details/public/traces/timeline_waterfall_bar/timeline_ruler.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
.timeline_ruler {
6+
.exploreTimelineRuler {
77
color: $euiColorMediumShade;
88

99
&__baseline {
@@ -15,12 +15,12 @@
1515
background-color: currentColor;
1616
}
1717

18-
&__tick_container {
18+
&__tickContainer {
1919
position: absolute;
2020
bottom: 0;
2121
transform: translateX(-50%);
2222

23-
.timeline_ruler__label {
23+
.exploreTimelineRuler__label {
2424
font-size: $euiFontSizeXS;
2525
line-height: 1;
2626
white-space: nowrap;
@@ -42,7 +42,7 @@
4242
}
4343
}
4444

45-
.timeline_ruler__tick {
45+
.exploreTimelineRuler__tick {
4646
height: 8px;
4747
width: 2px;
4848
background-color: currentColor;

src/plugins/explore/public/application/pages/traces/trace_details/public/traces/timeline_waterfall_bar/timeline_ruler.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ describe('TimelineRuler', () => {
5656

5757
const { getByTestId } = render(<TimelineRuler traceTimeRange={mockTraceTimeRange} />);
5858

59-
expect(getByTestId('tick-label-0')).toHaveClass('timeline_ruler__label--first');
60-
expect(getByTestId('tick-label-500')).toHaveClass('timeline_ruler__label--center');
61-
expect(getByTestId('tick-label-1000')).toHaveClass('timeline_ruler__label--last');
59+
expect(getByTestId('tick-label-0')).toHaveClass('exploreTimelineRuler__label--first');
60+
expect(getByTestId('tick-label-500')).toHaveClass('exploreTimelineRuler__label--center');
61+
expect(getByTestId('tick-label-1000')).toHaveClass('exploreTimelineRuler__label--last');
6262
});
6363

6464
it('should pass correct parameters to useTimelineTicks', () => {
@@ -74,6 +74,6 @@ describe('TimelineRuler', () => {
7474

7575
const { container } = render(<TimelineRuler traceTimeRange={mockTraceTimeRange} />);
7676

77-
expect(container.querySelectorAll('.timeline_ruler__tick_container')).toHaveLength(0);
77+
expect(container.querySelectorAll('.exploreTimelineRuler__tickContainer')).toHaveLength(0);
7878
});
7979
});

src/plugins/explore/public/application/pages/traces/trace_details/public/traces/timeline_waterfall_bar/timeline_ruler.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,33 @@ export const TimelineRuler: React.FC<TimelineRulerProps> = ({
2020
const ticks = useTimelineTicks(traceTimeRange.durationMs, 0, 8, paddingPercent);
2121

2222
return (
23-
<div className="timeline_ruler" style={{ height: '30px', position: 'relative' }}>
24-
<div className="timeline_ruler__baseline" />
23+
<div className="exploreTimelineRuler" style={{ height: '30px', position: 'relative' }}>
24+
<div className="exploreTimelineRuler__baseline" />
2525
{ticks.map((tick, index) => {
2626
const labelClassName =
2727
index === 0
28-
? 'timeline_ruler__label--first'
28+
? 'exploreTimelineRuler__label--first'
2929
: index === ticks.length - 1
30-
? 'timeline_ruler__label--last'
31-
: 'timeline_ruler__label--center';
30+
? 'exploreTimelineRuler__label--last'
31+
: 'exploreTimelineRuler__label--center';
3232

3333
return (
3434
<div
3535
key={tick.value}
36-
className="timeline_ruler__tick_container"
36+
className="exploreTimelineRuler__tickContainer"
3737
style={{ left: `${tick.offsetPercent}%` }}
3838
data-test-subj={`tick-container-${tick.value}`}
3939
>
4040
<div
41-
className={`timeline_ruler__label ${labelClassName}`}
41+
className={`exploreTimelineRuler__label ${labelClassName}`}
4242
data-test-subj={`tick-label-${tick.value}`}
4343
>
4444
{tick.value}ms
4545
</div>
46-
<div className="timeline_ruler__tick" data-test-subj={`tick-mark-${tick.value}`} />
46+
<div
47+
className="exploreTimelineRuler__tick"
48+
data-test-subj={`tick-mark-${tick.value}`}
49+
/>
4750
</div>
4851
);
4952
})}

0 commit comments

Comments
 (0)