From 4c76ed581b2a7b76f6091ed775d60d3ba80a1053 Mon Sep 17 00:00:00 2001 From: Dennis Sen Date: Mon, 7 Oct 2024 10:59:05 +0200 Subject: [PATCH 1/2] add configuration error warning --- packages/core/src/vuePlugins/vuex.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/vuePlugins/vuex.ts b/packages/core/src/vuePlugins/vuex.ts index d16305861..14d6e772b 100644 --- a/packages/core/src/vuePlugins/vuex.ts +++ b/packages/core/src/vuePlugins/vuex.ts @@ -241,6 +241,12 @@ export const makeStore = () => { } if (state.configuration[name].displayComponent) { commit('setComponents', [...components, component]) + + if (!state.configuration[name].layoutTag) { + console.warn( + `Component "${name}" was registered as visible ('displayComponent' had a truthy value), but no layout tag was associated. This may be an error in configuration and will lead to the component not being visible in the UI.` + ) + } } }, centerOnFeature({ rootGetters: { map } }, feature: Feature) { From d04b7fac747f908f927b0ab96451806145196abe Mon Sep 17 00:00:00 2001 From: Dennis Sen <108349707+warm-coolguy@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:30:21 +0200 Subject: [PATCH 2/2] Update packages/core/src/vuePlugins/vuex.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apply ADR, receive bacon Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com> --- packages/core/src/vuePlugins/vuex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/vuePlugins/vuex.ts b/packages/core/src/vuePlugins/vuex.ts index 14d6e772b..1dc0fa1fa 100644 --- a/packages/core/src/vuePlugins/vuex.ts +++ b/packages/core/src/vuePlugins/vuex.ts @@ -244,7 +244,7 @@ export const makeStore = () => { if (!state.configuration[name].layoutTag) { console.warn( - `Component "${name}" was registered as visible ('displayComponent' had a truthy value), but no layout tag was associated. This may be an error in configuration and will lead to the component not being visible in the UI.` + `@polar/core: Component "${name}" was registered as visible ('displayComponent' had a truthy value), but no 'layoutTag' was associated. This may be an error in configuration and will lead to the component not being visible in the UI.` ) } }