SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
.pretty-view {
padding: 0;
flex: 1;
&__search-wrapper {
position: sticky;
top: 0;
z-index: 1;
padding-bottom: 8px;
background: var(--l1-background);
}
&__search-input {
width: 100%;
border: 0 !important;
border-top: 1px solid var(--l2-border) !important;
border-bottom: 1px solid var(--l2-border) !important;
border-radius: 0 !important;
font-family: 'SF Mono', 'Geist Mono', 'Fira Code', monospace !important;
font-size: var(--data-viewer-font-size, 12px) !important;
line-height: 18px !important;
background: var(--l1-background) !important;
outline: none !important;
box-shadow: none !important;
&:focus {
border: 1px solid var(--l2-border) !important;
border-color: var(--primary) !important;
outline: none !important;
box-shadow: none !important;
}
}
// Font spec: SF Mono, 12px, 400, 18px line-height, -0.5% letter-spacing
font-family: 'SF Mono', 'Geist Mono', 'Fira Code', monospace;
font-size: var(--data-viewer-font-size, 12px);
font-weight: 400;
line-height: 18px;
letter-spacing: -0.06px;
// Override react-json-tree inline styles
ul {
margin: 0 !important;
padding-left: 16px !important;
list-style: none !important;
background-color: transparent !important;
flex: 1;
}
> ul,
&__pinned > ul {
padding-left: 0 !important;
// Clip the hover bleed to the panel width. `clip` (not `hidden`) does
// not create a scroll container, so the sticky search stays working.
overflow-x: clip;
}
// Force font on all tree elements
li,
span,
label {
font-family: inherit !important;
font-size: inherit !important;
line-height: inherit !important;
letter-spacing: inherit !important;
}
// Fix react-json-tree text-indent wrapping
li {
text-indent: 0 !important;
margin-left: 0 !important;
padding-top: 2px !important;
padding-bottom: 2px !important;
}
.pretty-view__actions {
margin-right: 16px;
}
// Pin the caret to the leaf padding-left (1.25em) so nested keys align with leaf
// keys at every depth; inline-flex centers the glyph on the text line.
&__arrow {
box-sizing: border-box !important;
width: 1.25em !important;
padding-right: 0 !important;
display: inline-flex !important;
align-items: center !important;
height: 18px; // match the row line-height so the caret centers on the text
}
// Leaf node row — full-width hover highlight
&__row {
display: flex !important;
align-items: baseline;
position: relative;
isolation: isolate; // own stacking context so ::before sits behind content, not the panel bg
// react-json-tree indents leaf values with a depth-dependent padding-left
// (2.125em when nested vs 1.25em at top); we indent via `ul`, so pin it flat
// to keep leaf and nested keys aligned at every depth.
padding-left: 1.25em !important;
// Keep actions visible on hover, or while this row's menu is open
&:hover .pretty-view__actions,
&:has(> span [data-popup-open]) .pretty-view__actions {
opacity: 1;
}
// Edge-to-edge highlight, bled past indentation, clipped by `> ul`.
// Persists while this row's ... menu is open (the trigger stays in the
// row and carries data-popup-open, even though the menu is portaled out).
&:hover::before,
&:has(> span [data-popup-open])::before {
content: '';
position: absolute;
inset: 0 -9999px;
background: var(--l3-background);
z-index: -1;
}
// Push actions to the right edge
> span {
flex: 1;
}
// Brighten the value text from its default grey to foreground-hover
// while the row is active (hover, or its ... menu open). !important
// overrides react-json-tree's per-type inline color on the value span.
&:hover > span,
&:has(> span [data-popup-open]) > span {
color: var(--l1-foreground-hover) !important;
}
}
// Nested node (object/array) — full-width hover on the header line only
&__nested-row {
position: relative;
isolation: isolate;
> label,
> span:not(ul span) {
padding: 1px 2px;
display: inline !important; // keep item string inline with label
}
// Edge-to-edge highlight, capped to the header line so it doesn't
// cover the children this <li> contains. Persists while this row's own
// menu is open — `> span` scopes it so a child row's open menu (nested
// in `> ul`) doesn't light up this parent.
&:hover::before,
&:has(> span [data-popup-open])::before {
content: '';
position: absolute;
top: 0;
height: 20px; // 18px line-height + 2px top padding
left: -9999px;
right: -9999px;
background: var(--l3-background);
z-index: -1;
}
&:hover > label + span .pretty-view__actions,
&:has(> span [data-popup-open]) > label + span .pretty-view__actions {
opacity: 1;
}
// Push the ... to the right edge of the row instead of hugging the key.
// Absolute (not flex) so the arrow/label/children layout stays intact;
// the row <li> is position: relative (react-json-tree sets it inline).
.pretty-view__actions {
position: absolute;
top: 2px; // align with the header line (li padding-top)
right: 0;
height: 18px; // line-height — centers the icon (span is align-items: center)
}
// In nested rows, value-row should not take full width
.pretty-view__value-row {
width: auto;
}
}
// Value + actions wrapper (from valueRenderer / getItemString)
&__value-row {
display: inline-flex;
align-items: center;
gap: 6px;
}
// In leaf rows, value-row takes full width to push ... to the right
&__row &__value-row {
justify-content: space-between;
width: 100%;
// Anchor the ... to the top of the value (not centered in a tall value)
align-items: flex-start;
.pretty-view__actions {
position: sticky;
top: 4px;
}
}
&__actions-boundary {
display: contents;
}
// ... actions button — hidden by default, shown on row hover
&__actions {
opacity: 0;
display: inline-flex;
align-items: center;
cursor: pointer;
color: var(--l2-foreground);
transition: opacity 0.1s ease;
padding: 0 2px;
&:hover {
color: var(--l1-foreground);
}
}
// Pinned items section
&__pinned {
border-bottom: 1px solid var(--l2-border);
padding-bottom: 8px;
margin-bottom: 8px;
padding-left: 0px;
li {
margin-left: 0 !important;
padding-left: 0 !important;
display: flex !important;
align-items: baseline;
}
}
&__pinned-header {
font-size: 11px;
font-weight: 500;
color: var(--l3-foreground);
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 4px;
}
&__pinned-label {
display: inline-flex;
align-items: baseline;
gap: 6px;
padding-left: 6px !important;
}
&__pinned-icon {
flex-shrink: 0;
color: var(--text-robin-400);
cursor: pointer;
fill: var(--text-robin-400);
transition: fill 0.1s ease;
&:hover {
color: var(--text-robin-300);
fill: transparent;
}
}
}