From 291f93cc43e069a857ce3f4de597ed3b1b0bfd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Tue, 7 Nov 2023 09:47:09 +0000 Subject: [PATCH 1/4] feat(notebooks): allow editing the insight config in notebooks --- frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index 9f5838069d449..6ce741ab5cbfe 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -70,7 +70,7 @@ const Component = ({ attributes }: NotebookNodeProps - + ) } From a0739269852276c734707d74680248fc02ef11c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Tue, 7 Nov 2023 16:39:54 +0000 Subject: [PATCH 2/4] remove propsQuery --- frontend/src/scenes/insights/insightDataLogic.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/frontend/src/scenes/insights/insightDataLogic.ts b/frontend/src/scenes/insights/insightDataLogic.ts index e2ac23f175ed2..153be0b0b27c3 100644 --- a/frontend/src/scenes/insights/insightDataLogic.ts +++ b/frontend/src/scenes/insights/insightDataLogic.ts @@ -84,21 +84,14 @@ export const insightDataLogic = kea([ selectors({ query: [ - (s) => [s.propsQuery, s.filters, s.insight, s.internalQuery, s.filterTestAccountsDefault], - (propsQuery, filters, insight, internalQuery, filterTestAccountsDefault) => - propsQuery || + (s) => [s.filters, s.insight, s.internalQuery, s.filterTestAccountsDefault], + (filters, insight, internalQuery, filterTestAccountsDefault) => internalQuery || insight.query || (filters && filters.insight ? queryFromFilters(filters) : undefined) || queryFromKind(NodeKind.TrendsQuery, filterTestAccountsDefault), ], - propsQuery: [ - () => [(_, props) => props], - // overwrite query from props for standalone InsightVizNode queries - (props: InsightLogicProps) => (props.dashboardItemId?.startsWith('new-AdHoc.') ? props.query : null), - ], - isQueryBasedInsight: [ (s) => [s.query], (query) => { From a61f6c33d1ada163b05043247715d7c45c3da8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Tue, 7 Nov 2023 16:42:53 +0000 Subject: [PATCH 3/4] show header --- frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index 6ce741ab5cbfe..df43dcb36427e 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -126,6 +126,7 @@ export const Settings = ({ if (NodeKind.InsightVizNode === modifiedQuery.kind || NodeKind.SavedInsightNode === modifiedQuery.kind) { modifiedQuery.showFilters = true + modifiedQuery.showHeader = true modifiedQuery.showResults = false modifiedQuery.embedded = true } From f3b3a7d2f555325f3793b21eac9446d8c7f0f901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Oberm=C3=BCller?= Date: Tue, 7 Nov 2023 17:55:12 +0000 Subject: [PATCH 4/4] Update frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx Co-authored-by: David Newell --- frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index df43dcb36427e..3808db86bea3a 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -70,7 +70,7 @@ const Component = ({ attributes }: NotebookNodeProps