Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(experiments): animate exposures header content on expand (#76590)

Juraj Majerik784166ed51eb
diff --git a/frontend/src/scenes/experiments/ExperimentView/Exposures.tsx b/frontend/src/scenes/experiments/ExperimentView/Exposures.tsx
index 5d066682e201..0cb7efe10372 100644
--- a/frontend/src/scenes/experiments/ExperimentView/Exposures.tsx
+++ b/frontend/src/scenes/experiments/ExperimentView/Exposures.tsx
@@ -286,14 +286,13 @@ export function Exposures(): JSX.Element {
</span>
{!isExperimentDraft && (
+ // Transitioning visibility delays the hidden flip until the fade-out finishes
<div
- className={`flex items-center gap-3 transition-opacity duration-300 ease-in-out ${
- isCollapsed ? 'opacity-100' : 'opacity-0'
+ className={`flex items-center gap-3 transition-[opacity,visibility] duration-300 ease-in-out ${
+ isCollapsed
+ ? 'visible opacity-100 pointer-events-auto'
+ : 'invisible opacity-0 pointer-events-none'
}`}
- style={{
- visibility: isCollapsed ? 'visible' : 'hidden',
- pointerEvents: isCollapsed ? 'auto' : 'none',
- }}
>
{exposuresLoading ? (
<Spinner className="text-lg" />