Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai committed Aug 21, 2024
2 parents 4ef73ab + 020a49a commit de214c4
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 22 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.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/src/exporter/Exporter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const Template: StoryFn<typeof Exporter> = (props) => {
</div>
)
}
Template.tags = ['test-skip'] // :FIXME: flaky tests, most likely due to resize observer changes

export const TrendsLineInsight: Story = Template.bind({})
TrendsLineInsight.args = { insight: require('../mocks/fixtures/api/projects/team_id/insights/trendsLine.json') }
Expand Down Expand Up @@ -202,6 +201,7 @@ StickinessInsight.tags = ['test-skip'] // doesn't produce a helpful reference im

export const UserPathsInsight: Story = Template.bind({})
UserPathsInsight.args = { insight: require('../mocks/fixtures/api/projects/team_id/insights/userPaths.json') }
UserPathsInsight.tags = ['test-skip'] // FIXME: flaky tests, most likely due to resize observer changes

export const Dashboard: Story = Template.bind({})
Dashboard.args = { dashboard }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import EXAMPLE_TRENDS_PIE from '../../../../mocks/fixtures/api/projects/team_id/
import EXAMPLE_TRENDS_TABLE from '../../../../mocks/fixtures/api/projects/team_id/insights/trendsTable.json'
import EXAMPLE_TRENDS_HORIZONTAL_BAR from '../../../../mocks/fixtures/api/projects/team_id/insights/trendsValue.json'
import EXAMPLE_TRENDS_WORLD_MAP from '../../../../mocks/fixtures/api/projects/team_id/insights/trendsWorldMap.json'
import EXAMPLE_PATHS from '../../../../mocks/fixtures/api/projects/team_id/insights/userPaths.json'
import { InsightCard as InsightCardComponent } from './index'

const examples = [
Expand All @@ -30,7 +29,6 @@ const examples = [
EXAMPLE_TRENDS_WORLD_MAP,
EXAMPLE_FUNNEL,
EXAMPLE_RETENTION,
EXAMPLE_PATHS,
EXAMPLE_STICKINESS,
EXAMPLE_LIFECYCLE,
EXAMPLE_DATA_TABLE_NODE_HOGQL_QUERY,
Expand Down Expand Up @@ -64,7 +62,6 @@ const meta: Meta = {
control: { type: 'boolean' },
},
},
tags: ['test-skip'], // :FIXME: flaky tests, most likely due to resize observer changes
}
export default meta
export const InsightCard: Story = (args) => {
Expand Down
33 changes: 15 additions & 18 deletions frontend/src/queries/nodes/InsightViz/InsightViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import './InsightViz.scss'
import clsx from 'clsx'
import { BindLogic, useValues } from 'kea'
import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import React, { useState } from 'react'
import { useState } from 'react'
import { insightLogic } from 'scenes/insights/insightLogic'
import { insightSceneLogic } from 'scenes/insights/insightSceneLogic'
import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic'
Expand Down Expand Up @@ -78,9 +78,19 @@ export function InsightViz({ uniqueKey, query, setQuery, context, readOnly, embe
const showingResults = query.showResults ?? true
const isEmbedded = embedded || (query.embedded ?? false)

const Wrapper = ({ children }: { children: React.ReactElement }): JSX.Element => {
return isEmbedded ? <>{children}</> : <div className="flex-1 h-full overflow-auto">{children}</div>
}
const display = (
<InsightVizDisplay
insightMode={insightMode}
context={context}
disableHeader={disableHeader}
disableTable={disableTable}
disableCorrelationTable={disableCorrelationTable}
disableLastComputation={disableLastComputation}
disableLastComputationRefresh={disableLastComputationRefresh}
showingResults={showingResults}
embedded={isEmbedded}
/>
)

return (
<BindLogic logic={insightLogic} props={insightProps}>
Expand All @@ -98,20 +108,7 @@ export function InsightViz({ uniqueKey, query, setQuery, context, readOnly, embe
{!readOnly && (
<EditorFilters query={query.source} showing={showingFilters} embedded={isEmbedded} />
)}

<Wrapper>
<InsightVizDisplay
insightMode={insightMode}
context={context}
disableHeader={disableHeader}
disableTable={disableTable}
disableCorrelationTable={disableCorrelationTable}
disableLastComputation={disableLastComputation}
disableLastComputationRefresh={disableLastComputationRefresh}
showingResults={showingResults}
embedded={isEmbedded}
/>
</Wrapper>
{!isEmbedded ? <div className="flex-1 h-full overflow-auto">{display}</div> : display}
</div>
</BindLogic>
</BindLogic>
Expand Down

0 comments on commit de214c4

Please sign in to comment.