Skip to content

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.

fix: smooth Only/Toggle hover reveal in quick-filters checkbox (#12248)

Gaurav Tewari0b69f5f67765
diff --git a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.styles.scss b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.styles.scss
index b5e1d6901f..8a503d2546 100644
--- a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.styles.scss
+++ b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.styles.scss
@@ -92,52 +92,76 @@
color: var(--l3-foreground);
}
- .only-btn {
- cursor: not-allowed;
- color: var(--l3-foreground);
- }
-
+ .only-btn,
.toggle-btn {
cursor: not-allowed;
color: var(--l3-foreground);
}
}
- .only-btn {
- display: none;
+ // Stack "Only"/"All" and "Toggle" in a single cell so revealing
+ // one swaps in place instead of shifting the row layout.
+ .value-actions {
+ display: grid;
+ align-items: center;
+ justify-items: end;
+
+ > * {
+ grid-area: 1 / 1;
+ }
}
+
+ .only-btn,
.toggle-btn {
display: none;
+ align-items: center;
+ justify-content: center;
+ height: 21px;
+ opacity: 0;
+ transform: translateX(4px);
+ // `display` is animated as a discrete property so the button
+ // stays mounted through its fade-out on exit.
+ transition:
+ opacity 0.16s ease,
+ transform 0.16s ease,
+ display 0.16s allow-discrete;
+
+ &:hover {
+ background-color: unset;
+ }
}
+ }
- .toggle-btn:hover {
- background-color: unset;
- }
+ // Hovering the label/value area reveals the "Only"/"All" action.
+ .checkbox-value-section:hover .only-btn {
+ display: flex;
+ opacity: 1;
+ transform: translateX(0);
- .only-btn:hover {
- background-color: unset;
+ // Entry animation start state (fires on the display switch).
+ @starting-style {
+ opacity: 0;
+ transform: translateX(4px);
}
}
- .checkbox-value-section:hover {
- .toggle-btn {
- display: none;
- }
- .only-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 21px;
+ // Hovering the checkbox reveals the "Toggle" action.
+ .check-box:hover ~ .checkbox-value-section .toggle-btn {
+ display: flex;
+ opacity: 1;
+ transform: translateX(0);
+
+ @starting-style {
+ opacity: 0;
+ transform: translateX(4px);
}
}
}
- .value:hover {
+ @media (prefers-reduced-motion: reduce) {
+ .only-btn,
.toggle-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 21px;
+ transition: none;
}
}
}
diff --git a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/CheckboxValueRow.tsx b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/CheckboxValueRow.tsx
index afcb0e51c5..58701bca51 100644
--- a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/CheckboxValueRow.tsx
+++ b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/CheckboxValueRow.tsx
@@ -53,12 +53,14 @@ function CheckboxValueRow({
</Typography.Text>
</TooltipSimple>
)}
- <Button type="text" className="only-btn">
- {onlyButtonLabel}
- </Button>
- <Button type="text" className="toggle-btn">
- Toggle
- </Button>
+ <div className="value-actions">
+ <Button type="text" className="only-btn">
+ {onlyButtonLabel}
+ </Button>
+ <Button type="text" className="toggle-btn">
+ Toggle
+ </Button>
+ </div>
</div>
</div>
);