-
Notifications
You must be signed in to change notification settings - Fork 699
fix(ui): resolve text overlapping on resize in trace comparison #3505
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
base: main
Are you sure you want to change the base?
Changes from all commits
cb2ff1f
b72eef7
004c5c6
6b2ef91
ed93661
dd7ef6c
4a91c68
c3785fb
3a4300d
3999cbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,14 +18,30 @@ SPDX-License-Identifier: Apache-2.0 | |
| .TraceDiffHeader--traceTitle { | ||
| align-items: center; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| flex: 1; | ||
| font-size: 1.7em; | ||
| margin: 0; | ||
| padding: 0.25rem 2.5rem 0.25rem 1.25rem; | ||
| position: relative; | ||
| padding: 0.25rem 1.25rem; | ||
| min-height: 2.5em; | ||
| min-width: 0; | ||
| overflow: hidden; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceTitleText { | ||
| flex: 1; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceTitleActions { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.75rem; | ||
| flex-shrink: 0; | ||
|
aryunewaskar77-art marked this conversation as resolved.
|
||
| } | ||
| .TraceDiffHeader--traceTitle > span { | ||
| display: inline; | ||
| max-width: 100%; | ||
|
Comment on lines
45
to
47
|
||
|
|
@@ -41,23 +57,14 @@ SPDX-License-Identifier: Apache-2.0 | |
| white-space: normal; | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceTitle.is-error { | ||
| color: var(--feedback-error); | ||
| .TraceDiffHeader--traceTitleText span { | ||
| display: inline; | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceTitleChevron { | ||
| color: var(--interactive-primary); | ||
| font-size: 0.75em; | ||
| position: absolute; | ||
| right: 15px; | ||
| top: 50%; | ||
| transform: translateY(-50%); | ||
| transition: transform 0.2s ease; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceSection:hover .TraceDiffHeader--traceTitleChevron { | ||
| transform: translateY(calc(-50% + 2px)); | ||
| } | ||
|
|
||
| .TraceDiffHeader--traceAttributes { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,18 +81,20 @@ export default function TraceHeader({ | |
| return ( | ||
| <div className="TraceDiffHeader--traceHeader" data-testid="TraceDiffHeader--traceHeader"> | ||
| <h1 className="TraceDiffHeader--traceTitle"> | ||
| <span> | ||
| <div className="TraceDiffHeader--traceTitleText"> | ||
|
Comment on lines
82
to
+84
|
||
| {traceID ? ( | ||
| <React.Fragment> | ||
| <TraceName key="name" traceName={traceName} error={error} state={state} />{' '} | ||
| <TraceId key="id" traceId={traceID} className="ub-pr2" /> | ||
| <TraceTimelineLink traceID={traceID} /> | ||
| </React.Fragment> | ||
| ) : ( | ||
| <span className="u-tx-muted">Select a Trace...</span> | ||
| )} | ||
| </span> | ||
| <IoChevronDown className="TraceDiffHeader--traceTitleChevron" /> | ||
| </div> | ||
| <div className="TraceDiffHeader--traceTitleActions"> | ||
| {traceID && <TraceTimelineLink traceID={traceID} />} | ||
| <IoChevronDown className="TraceDiffHeader--traceTitleChevron" /> | ||
| </div> | ||
| </h1> | ||
|
Comment on lines
+93
to
98
|
||
| <AttrsComponent startTime={startTime} duration={duration} totalSpans={totalSpans} /> | ||
| </div> | ||
|
|
||
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.
For flex children, text truncation with ellipsis commonly fails unless the flex item is allowed to shrink below its content size. Add
min-width: 0;to.TraceDiffHeader--traceTitleTextso the ellipsis reliably triggers and the title can shrink without pushing/overlapping adjacent actions.