diff --git a/CHANGELOG.md b/CHANGELOG.md index b7924ffe..77b58494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - [#431](https://github.com/estruyf/vscode-front-matter/issues/431): Performance improvements for the content dashboard - [#448](https://github.com/estruyf/vscode-front-matter/issues/448): Retrieving files fails when content folder name and workspace folder name are the same +- [#455](https://github.com/estruyf/vscode-front-matter/issues/455): Show a description for the SEO section when title nor description is set ### 🐞 Fixes diff --git a/src/panelWebView/components/SeoStatus.tsx b/src/panelWebView/components/SeoStatus.tsx index 2ba37996..586807e5 100644 --- a/src/panelWebView/components/SeoStatus.tsx +++ b/src/panelWebView/components/SeoStatus.tsx @@ -44,10 +44,6 @@ const SeoStatus: React.FunctionComponent = ({ data, seo, focusE }, 10); }, [title, data[descriptionField], data?.articleDetails?.wordCount]); - if (!title && !data[descriptionField]) { - return null; - } - const renderContent = () => { if (!isOpen) { return null; @@ -120,7 +116,15 @@ const SeoStatus: React.FunctionComponent = ({ data, seo, focusE return ( - { renderContent() } + { + !title && !data[descriptionField] ? ( +
+

Title or {descriptionField} is needed.

+
+ ) : ( + renderContent() + ) + }
); };