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.

3.0 KB
Raw Blame
.MissingCapsPreview {
    overflow: hidden;
    background: var(--color-bg-surface-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius);

    &__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid var(--color-border-primary);
    }

    &__title {
        font-size: 0.75rem;
        font-weight: 600;
    }

    &__rows {
        display: flex;
        flex-direction: column;
        padding: 0.25rem 0.5rem 0.5rem;
    }

    &__row {
        display: flex;
        flex-direction: column;
        gap: 0.3125rem;
        padding: 0.5rem;

        // One settling fade, staggered below. `both` holds the from-state during the delay, so a
        // row is invisible until its turn and visible for good afterwards.
        animation: MissingCapsPreview__in 420ms ease both;
    }

    // Multi-line rows need a hairline to read as separate reports.
    &__row + &__row {
        border-top: 1px solid var(--color-border-primary);
    }

    &__row:hover {
        background: var(--color-bg-fill-highlight-50);
    }

    &__row:nth-child(2) {
        animation-delay: 90ms;
    }

    &__row:nth-child(3) {
        animation-delay: 180ms;
    }

    &__row:nth-child(4) {
        animation-delay: 270ms;
    }

    &__row:nth-child(5) {
        animation-delay: 360ms;
    }

    &__ask {
        font-size: 0.8125rem;
        line-height: 1.35;
        color: var(--color-text-primary);
    }

    &__meta {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        font-size: 0.6875rem;
        color: var(--color-text-secondary);
    }

    &__client {
        display: inline-flex;
        gap: 0.375rem;
        align-items: center;
        min-width: 0;
    }

    &__client--unknown {
        font-style: italic;
        color: var(--color-text-tertiary);
    }

    &__logo {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        padding: 2px;
        color: var(--color-text-primary);
        background: var(--color-bg-surface-secondary);
        border: 1px solid var(--color-border-primary);
        border-radius: 4px;
    }

    // Nothing to show for a report that never named its client, so the plate stays empty.
    &__logo--unknown {
        background: none;
        border-style: dashed;
    }

    &__time {
        flex-shrink: 0;
        margin-left: auto;
        font-family: var(--font-mono);
        color: var(--color-text-tertiary);
    }
}

@keyframes MissingCapsPreview__in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .MissingCapsPreview__row {
        animation: none;
    }
}

// Storybook (and its visual-regression runner) must not snapshot a half-faded row.
.MissingCapsPreview--static .MissingCapsPreview__row {
    animation: none;
}