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(data-warehouse): open add-source in new tab via Link not newInternalTab (#67111)

Daniel RC594bae09603e
diff --git a/frontend/src/scenes/data-warehouse/editor/sidebar/QueryDatabase.tsx b/frontend/src/scenes/data-warehouse/editor/sidebar/QueryDatabase.tsx
index 824d308bb302..3925c1a34bcd 100644
--- a/frontend/src/scenes/data-warehouse/editor/sidebar/QueryDatabase.tsx
+++ b/frontend/src/scenes/data-warehouse/editor/sidebar/QueryDatabase.tsx
@@ -972,18 +972,21 @@ export const QueryDatabase = ({
</DropdownMenuSubContent>
</DropdownMenuSub>
) : null}
- <DropdownMenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- posthog.capture('sql-editor-add-source-clicked', {
- source_type: sourceType,
- location: 'source_type_row',
- })
- newInternalTab(urls.dataWarehouseSourceNew(sourceType))
- }}
- >
- <ButtonPrimitive menuItem>Add new source of this type</ButtonPrimitive>
+ <DropdownMenuItem asChild>
+ <Link
+ to={urls.dataWarehouseSourceNew(sourceType)}
+ target="_blank"
+ buttonProps={{ menuItem: true }}
+ onClick={(e) => {
+ e.stopPropagation()
+ posthog.capture('sql-editor-add-source-clicked', {
+ source_type: sourceType,
+ location: 'source_type_row',
+ })
+ }}
+ >
+ Add new source of this type
+ </Link>
</DropdownMenuItem>
</DropdownMenuGroup>
)