Skip to content

Commit 7a8a51a

Browse files
committed
persons recording scene now growing full-height
1 parent 1242051 commit 7a8a51a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

frontend/src/lib/lemon-ui/LemonTabs/LemonTabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface LemonTabsProps<T extends string | number> {
4040
sceneInset?: boolean
4141
/** Pass in JSX to be sticky to the right of the tabs. */
4242
rightSlot?: React.ReactNode
43+
contentClassName?: string
4344
}
4445

4546
interface LemonTabsCSSProperties extends React.CSSProperties {
@@ -57,6 +58,7 @@ export function LemonTabs<T extends string | number>({
5758
'data-attr': dataAttr,
5859
sceneInset = false,
5960
rightSlot,
61+
contentClassName,
6062
}: LemonTabsProps<T>): JSX.Element {
6163
const { containerRef, selectionRef, sliderWidth, sliderOffset, transitioning } = useSliderPositioning<
6264
HTMLUListElement,
@@ -144,7 +146,7 @@ export function LemonTabs<T extends string | number>({
144146
)}
145147
</ul>
146148
{activeTab && 'content' in activeTab && (
147-
<div className={cn('LemonTabs__content', sceneInset && 'p-4')} key={activeKey}>
149+
<div className={cn('LemonTabs__content', sceneInset && 'p-4', contentClassName)} key={activeKey}>
148150
{activeTab.content}
149151
</div>
150152
)}

frontend/src/scenes/persons/PersonScene.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { SpinnerOverlay } from 'lib/lemon-ui/Spinner/Spinner'
1616
import { Tooltip } from 'lib/lemon-ui/Tooltip'
1717
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
1818
import { copyToClipboard } from 'lib/utils/copyToClipboard'
19+
import { cn } from 'lib/utils/css-classes'
1920
import { openInAdminPanel } from 'lib/utils/person-actions'
2021
import { ProductIntentContext } from 'lib/utils/product-intents'
2122
import { RelatedGroups } from 'scenes/groups/RelatedGroups'
@@ -137,7 +138,7 @@ export function PersonScene(): JSX.Element | null {
137138
const settingLevel = featureFlags[FEATURE_FLAGS.ENVIRONMENTS] ? 'environment' : 'project'
138139

139140
return (
140-
<SceneContent>
141+
<SceneContent fullHeight>
141142
<SceneTitleSection
142143
name="Person"
143144
resourceType={{
@@ -197,6 +198,10 @@ export function PersonScene(): JSX.Element | null {
197198
navigateToTab(tab as PersonsTabType)
198199
}}
199200
data-attr="persons-tabs"
201+
className="grow"
202+
contentClassName={cn({
203+
'flex flex-col grow': currentTab === PersonsTabType.SESSION_RECORDINGS,
204+
})}
200205
tabs={[
201206
feedEnabled
202207
? {
@@ -252,14 +257,12 @@ export function PersonScene(): JSX.Element | null {
252257
</LemonBanner>
253258
</div>
254259
) : null}
255-
<div className="SessionRecordingPlaylistHeightWrapper">
256-
<SessionRecordingsPlaylist
257-
logicKey={`person-scene-${person.uuid}`}
258-
personUUID={person.uuid}
259-
distinctIds={person.distinct_ids}
260-
updateSearchParams
261-
/>
262-
</div>
260+
<SessionRecordingsPlaylist
261+
logicKey={`person-scene-${person.uuid}`}
262+
personUUID={person.uuid}
263+
distinctIds={person.distinct_ids}
264+
updateSearchParams
265+
/>
263266
</>
264267
),
265268
},

0 commit comments

Comments
 (0)