Skip to content

Commit

Permalink
fix(experiment): add status tag (#19669)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik authored Jan 10, 2024
1 parent 6c2a3d9 commit a646436
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 21 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DraggableToNotebookProps } from 'scenes/notebooks/AddToNotebook/Draggab
import { breadcrumbsLogic } from '~/layout/navigation/Breadcrumbs/breadcrumbsLogic'

interface PageHeaderProps {
title: string | JSX.Element
title?: string | JSX.Element
caption?: string | JSX.Element | null | false
buttons?: JSX.Element | false
tabbedPage?: boolean // Whether the page has tabs for secondary navigation
Expand Down
31 changes: 11 additions & 20 deletions frontend/src/scenes/experiments/Experiment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,22 +526,6 @@ export function Experiment(): JSX.Element {
<div className="view-experiment">
<div className="draft-header">
<PageHeader
title={
<div className="flex items-center gap-2">
<span>{experiment?.name}</span>
{experiment.feature_flag && (
<CopyToClipboardInline
iconStyle={{ color: 'var(--muted-alt)' }}
className="text-muted font-normal text-sm"
description="feature flag key"
>
{experiment.feature_flag.key}
</CopyToClipboardInline>
)}
<StatusTag experiment={experiment} />
<ResultsTag />
</div>
}
buttons={
<>
{experiment && !isExperimentRunning && (
Expand Down Expand Up @@ -621,9 +605,16 @@ export function Experiment(): JSX.Element {
}
/>
<div className="w-full pb-4">
<div>
<div className="inline-flex">
<div className="block">
<div className="exp-flag-copy-label">Status</div>
<StatusTag experiment={experiment} />
<span className="ml-2">
<ResultsTag />
</span>
</div>
{experiment.feature_flag && (
<>
<div className="block ml-10">
<div className="exp-flag-copy-label">Feature flag</div>
<CopyToClipboardInline
iconStyle={{ color: 'var(--lemon-button-icon-opacity)' }}
Expand All @@ -632,10 +623,10 @@ export function Experiment(): JSX.Element {
>
{experiment.feature_flag.key}
</CopyToClipboardInline>
</>
</div>
)}
</div>
<div className="mt-4 exp-description">
<div className="mt-6 exp-description">
{isExperimentRunning ? (
<EditableField
multiline
Expand Down

0 comments on commit a646436

Please sign in to comment.