forked from grafana/pyroscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new tooltip design (grafana#1246)
* add new tooltip design * fix jest tests * Update packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphComponent/Tooltip.tsx * makes it use the same mono font everywhere, some stylistic changes Co-authored-by: Ryan Perry <[email protected]> Co-authored-by: Dmitry Filimonov <[email protected]>
- Loading branch information
1 parent
c41479f
commit 8345168
Showing
7 changed files
with
413 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 51 additions & 13 deletions
64
packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphComponent/Tooltip.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,59 @@ | ||
.flamegraphTooltip { | ||
max-width: 80%; | ||
|
||
width: 420px; | ||
position: fixed; | ||
background: #ffffff; | ||
white-space: nowrap; | ||
background: var(--ps-neutral-2); | ||
box-shadow: 1px 2px 4px 0px rgba(0, 0, 0, 0.3); | ||
border-radius: 4px; | ||
padding: 3px 5px; | ||
color: #333; | ||
color: var(--ps-neutral-1); | ||
font-size: 12px; | ||
visibility: hidden; | ||
z-index: 1; | ||
} | ||
z-index: 2; | ||
|
||
&.flamegraphDiffTooltip { | ||
width: 450px; | ||
} | ||
|
||
.flamegraphTooltipName { | ||
color: var(--ps-neutral-1); | ||
background-color: var(--ps-tooltip-header-bg); | ||
border-top-right-radius: 4px; | ||
border-top-left-radius: 4px; | ||
font-weight: bold; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
padding: 8px 10px; | ||
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; | ||
} | ||
|
||
.functionName { | ||
padding: 8px 10px 0; | ||
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; | ||
|
||
white-space: break-spaces; | ||
word-break: break-all; | ||
} | ||
|
||
.tooltipTable { | ||
width: calc(100% - 10px * 2); | ||
margin: 10px 10px 16px; | ||
|
||
th, | ||
td { | ||
border: 1px solid var(--ps-tooltip-header-bg); | ||
padding: 5px; | ||
} | ||
|
||
td { | ||
width: 50%; | ||
} | ||
|
||
.flamegraphTooltipName { | ||
font-weight: 500; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
&.tooltipDiffTable { | ||
th, | ||
td { | ||
width: 25%; | ||
font-weight: normal; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.