From c17400ce6d19098bc5cf2a4c998d4916fafdc63d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 27 Mar 2024 10:57:30 +0100 Subject: [PATCH] #783 - Always show custom panel views --- CHANGELOG.md | 1 + src/panelWebView/components/BaseView.tsx | 3 +++ src/panelWebView/components/CustomView/CustomView.tsx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17030fe7..44f70fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [#773](https://github.com/estruyf/vscode-front-matter/issues/773): Added the ability to rename content files - [#777](https://github.com/estruyf/vscode-front-matter/issues/777): Show an error in the metadata panel if something went wrong while parsing the front matter - [#778](https://github.com/estruyf/vscode-front-matter/issues/778): Added the ability to open a file or webpage when custom scripts is completed +- [#783](https://github.com/estruyf/vscode-front-matter/issues/783): Always show the custom panel view ### ⚡️ Optimizations diff --git a/src/panelWebView/components/BaseView.tsx b/src/panelWebView/components/BaseView.tsx index 5821bdbd..48315cd2 100644 --- a/src/panelWebView/components/BaseView.tsx +++ b/src/panelWebView/components/BaseView.tsx @@ -12,6 +12,7 @@ import * as l10n from "@vscode/l10n" import { LocalizationKey } from '../../localization'; import { InitializeAction } from './InitializeAction'; import { Actions } from './Actions'; +import { CustomView } from './CustomView'; export interface IBaseViewProps { settings: PanelSettings | undefined; @@ -56,6 +57,8 @@ const BaseView: React.FunctionComponent = ({ <> + + diff --git a/src/panelWebView/components/CustomView/CustomView.tsx b/src/panelWebView/components/CustomView/CustomView.tsx index 9ac0bf73..d3616af6 100644 --- a/src/panelWebView/components/CustomView/CustomView.tsx +++ b/src/panelWebView/components/CustomView/CustomView.tsx @@ -4,7 +4,7 @@ import { CustomPanelViewResult } from '../../../models'; import { Collapsible } from '../Collapsible'; export interface ICustomViewProps { - metadata: any; + metadata?: any; } export const CustomView: React.FunctionComponent = ({ metadata }: React.PropsWithChildren) => {