diff --git a/CHANGELOG.md b/CHANGELOG.md index eafa82ed..f248c609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - [#356](https://github.com/estruyf/vscode-front-matter/issues/356): Re-introduce the `labelField` to the `frontMatter.taxonomy.fieldGroups` setting - [#358](https://github.com/estruyf/vscode-front-matter/issues/358): Fix for relative path of the public folder - [#364](https://github.com/estruyf/vscode-front-matter/issues/364): Honour file ending rules in data files +- [#365](https://github.com/estruyf/vscode-front-matter/issues/365): Show spinner on the initial load of the content dashboard ## [7.3.4] - 2022-06-13 diff --git a/src/commands/Dashboard.ts b/src/commands/Dashboard.ts index da1a57ed..fd02151e 100644 --- a/src/commands/Dashboard.ts +++ b/src/commands/Dashboard.ts @@ -1,4 +1,4 @@ -import { SETTING_DASHBOARD_OPENONSTART, CONTEXT } from '../constants'; +import { SETTING_DASHBOARD_OPENONSTART, CONTEXT, ExtensionState } from '../constants'; import { join } from "path"; import { commands, Uri, ViewColumn, Webview, WebviewPanel, window } from "vscode"; import { Logger, Settings as SettingsHelper } from '../helpers'; @@ -74,6 +74,7 @@ export class Dashboard { public static reload() { if (Dashboard.isOpen) { Dashboard.webview?.dispose(); + Extension.getInstance().setState(ExtensionState.Dashboard.Pages.Cache, undefined, "workspace") setTimeout(() => { Dashboard.open(); diff --git a/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx b/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx index 6cf7b1d6..a3c48e6c 100644 --- a/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx +++ b/src/dashboardWebView/components/Steps/StepsToGetStarted.tsx @@ -48,6 +48,7 @@ export const StepsToGetStarted: React.FunctionComponent const reload = () => { const crntState: any = Messenger.getState() || {}; + Messenger.setState({ ...crntState, isWelcomeConfiguring: false diff --git a/src/dashboardWebView/hooks/useMessages.tsx b/src/dashboardWebView/hooks/useMessages.tsx index 7d7c83c5..80cd7d06 100644 --- a/src/dashboardWebView/hooks/useMessages.tsx +++ b/src/dashboardWebView/hooks/useMessages.tsx @@ -21,6 +21,8 @@ export default function useMessages() { Messenger.listen((event: MessageEvent>) => { const message = event.data; + console.log(`Received message:`, message); + switch (message.command) { case DashboardCommand.loading: setLoading(message.data);