Skip to content

Commit 9af05f9

Browse files
committed
styling
1 parent 46da8aa commit 9af05f9

File tree

1 file changed

+20
-6
lines changed
  • src/sentry/static/sentry/app/components/events/interfaces/spans

1 file changed

+20
-6
lines changed

src/sentry/static/sentry/app/components/events/interfaces/spans/spanDetail.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ class SpanDetail extends React.Component<Props, State> {
131131
event.stopPropagation();
132132
}}
133133
>
134-
{this.renderTraversalButton()}
135134
<table className="table key-value">
136135
<tbody>
137-
<Row title="Span ID">{span.span_id}</Row>
136+
<Row title="Span ID" extra={this.renderTraversalButton()}>
137+
{span.span_id}
138+
</Row>
138139
<Row title="Trace ID">{span.trace_id}</Row>
139140
<Row title="Parent Span ID">{span.parent_span_id || ''}</Row>
140141
<Row title="Description">{get(span, 'description', '')}</Row>
@@ -177,14 +178,26 @@ const SpanDetailContainer = styled('div')`
177178
cursor: auto;
178179
`;
179180

181+
const ValueTd = styled('td')`
182+
display: flex !important;
183+
max-width: 100% !important;
184+
align-items: center;
185+
`;
186+
187+
const PreValue = styled('pre')`
188+
flex: 1;
189+
`;
190+
180191
const Row = ({
181192
title,
182193
keep,
183194
children,
195+
extra = null,
184196
}: {
185197
title: string;
186198
keep?: boolean;
187199
children: JSX.Element | string;
200+
extra?: React.ReactNode;
188201
}) => {
189202
if (!keep && !children) {
190203
return null;
@@ -193,11 +206,12 @@ const Row = ({
193206
return (
194207
<tr>
195208
<td className="key">{title}</td>
196-
<td className="value">
197-
<pre className="val">
209+
<ValueTd className="value">
210+
<PreValue className="val">
198211
<span className="val-string">{children}</span>
199-
</pre>
200-
</td>
212+
</PreValue>
213+
{extra}
214+
</ValueTd>
201215
</tr>
202216
);
203217
};

0 commit comments

Comments
 (0)