diff --git a/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx b/webview_panels/src/modules/documentationEditor/components/documentationPropagation/DocumentationPropagation.tsx index cd4960493..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) => { @@ -183,6 +186,10 @@ export const DocumentationPropagationButton = ({ return null; } + if (!currColumnDescription) { + return null; + } + return (
-
Model:
+
Model:
{currentDocsData?.name}
-
Column:
+
Column:
{name}
{currColumnDescription && ( -
-
Description:
+
+
Description:
{currColumnDescription}
)} - - - - - - {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 && ( + + )} + + {isSaved &&
Saved documentation successfully
} +
+ + )} ); }; 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) {