From f5caf21d183434babd6d9e5c99146e33df856cc0 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 27 Nov 2024 19:23:07 +0530 Subject: [PATCH 1/4] fix: showing doc prop btn when col desc --- .../documentationPropagation/DocumentationPropagation.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx index cd4960493..e8122d2ea 100644 --- a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx +++ b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx @@ -183,6 +183,10 @@ export const DocumentationPropagationButton = ({ return null; } + if (!currColumnDescription) { + return null; + } + return ( Date: Wed, 27 Nov 2024 19:28:45 +0530 Subject: [PATCH 2/4] fix: styling --- .../DocumentationPropagation.tsx | 8 ++++---- .../documentationPropagation/styles.module.scss | 13 ++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx index e8122d2ea..5d4fc8f72 100644 --- a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx +++ b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx @@ -197,16 +197,16 @@ export const DocumentationPropagationButton = ({ >
-
Model:
+
Model:
{currentDocsData?.name}
-
Column:
+
Column:
{name}
{currColumnDescription && ( -
-
Description:
+
+
Description:
{currColumnDescription}
)} diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/styles.module.scss b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/styles.module.scss index 084ec6460..2ff8c245a 100644 --- a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/styles.module.scss +++ b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/styles.module.scss @@ -9,7 +9,18 @@ grid-template-columns: 1fr 3fr; :nth-child(1) { - font-weight: 500; + font-weight: 600; + } + + :nth-child(2) { + line-break: anywhere; + color: var(--text-grey2-color); + } +} + +.colDesc { + :nth-child(1) { + font-weight: 600; } :nth-child(2) { From a1572ac650c2b4611dedddbfadf68419d63884f9 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 27 Nov 2024 19:38:43 +0530 Subject: [PATCH 3/4] fix: no cll text --- .../DocumentationPropagation.tsx | 131 ++++++++++-------- 1 file changed, 70 insertions(+), 61 deletions(-) diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx index 5d4fc8f72..e477d81d0 100644 --- a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx +++ b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx @@ -211,67 +211,76 @@ export const DocumentationPropagationButton = ({
)}
- - - - - - {allColumns.map((item) => { - const key = item.model + "/" + item.column; - return ( - - - setSelectedColumns((prev) => ({ - ...prev, - [key]: !prev[key], - })) - } - /> - -
-
Model:
-
{item.model.split(".").pop()}
-
-
-
Column:
-
{item.column}
-
-
-
Description:
-
{item.description}
-
-
-
- ); - })} - {currColumns.length > 0 && ( - - )} - -
+ {!isLoading && allColumns.length === 0 ? ( +
+ No downstream column level lineage detected to propagate the + documentation +
+ ) : ( + <> + + + + + + {allColumns.map((item) => { + const key = item.model + "/" + item.column; + return ( + + + setSelectedColumns((prev) => ({ + ...prev, + [key]: !prev[key], + })) + } + /> + +
+
Model:
+
{item.model.split(".").pop()}
+
+
+
Column:
+
{item.column}
+
+
+
Description:
+
{item.description}
+
+
+
+ ); + })} + {currColumns.length > 0 && ( + + )} + +
+ + )}
); }; From d8ce15079f86536dea186806901043ce7ff77e8c Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 27 Nov 2024 21:27:23 +0530 Subject: [PATCH 4/4] feat: added saved sucessfully message --- .../documentationPropagation/DocumentationPropagation.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx index e477d81d0..0300cba38 100644 --- a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx +++ b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx @@ -60,6 +60,7 @@ export const DocumentationPropagationButton = ({ const [allColumns, setAllColumns] = useState([]); const [currColumns, setCurrColumns] = useState([]); const [isLoading, setIsLoading] = useState(false); + const [isSaved, setIsSaved] = useState(false); const [tableMetadata, setTableMetadata] = useState([]); const [testsMetadata, setTestsMetadata] = useState>( {}, @@ -72,6 +73,7 @@ export const DocumentationPropagationButton = ({ setAllColumns([]); setCurrColumns(startColumn); setTableMetadata([]); + setIsSaved(false); }, [currentDocsData?.uniqueId, name]); const loadMoreDownstreamModels = async () => { @@ -165,6 +167,7 @@ export const DocumentationPropagationButton = ({ } await executeRequestInSync("saveDocumentationBulk", { models: req }); + setIsSaved(true); }; const setAllColumnsValue = (value: boolean) => { @@ -278,6 +281,7 @@ export const DocumentationPropagationButton = ({ > Propagate documentation to selected models + {isSaved &&
Saved documentation successfully
} )}