From 13525a350f4d196cf53e8fb3adb96f69f326c286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Wed, 20 Sep 2023 12:50:46 +0200 Subject: [PATCH] Remove (almost) all use of dynamic imports Dynamic imports reduce the bundle size of the main `index.js` file, but they cause problems when deploying new versions of the app because previous versions of the bundle files (which are still possibly referenced by a running app) are removed. We keep one exception for this change: the `Api.js` bundle is still loaded dynamically because of its size (almost the same as `index.js` itself). --- CHANGELOG.md | 2 + src/components/EmptyState.vue | 4 +- src/components/FormComponent.vue | 4 +- src/components/GanttChart.vue | 3 +- src/components/KeyResultRow.vue | 3 +- src/components/KeyResultsList.vue | 6 ++- src/components/KpiDetails.vue | 13 +++-- src/components/ObjectiveRow.vue | 3 +- src/components/ObjectiveWorkbench.vue | 9 ++-- src/components/drawers/EditItemDrawer.vue | 3 +- src/components/drawers/EditKeyResult.vue | 3 +- src/components/drawers/EditObjective.vue | 6 ++- src/components/drawers/KpiDrawer.vue | 11 ++-- src/components/drawers/PagedDrawerWrapper.vue | 3 +- src/components/generic/form/FormSection.vue | 4 +- src/components/modals/KPIProgressModal.vue | 7 +-- .../widgets/WidgetKeyResultDetails.vue | 6 ++- .../widgets/WidgetKeyResultNotes.vue | 5 +- .../widgets/WidgetObjectiveDetails.vue | 6 ++- .../ProgressHistoryTable.vue | 8 +-- .../WidgetKpiProgressHistory.vue | 7 +-- .../WidgetProgressHistory.vue | 3 +- src/components/widgets/WidgetWeights.vue | 3 +- src/router/index.js | 50 +++++++++++++------ src/views/Admin/Admin.vue | 9 ++-- src/views/Admin/components/AdminUsers.vue | 6 ++- src/views/Item/ItemAbout.vue | 11 ++-- src/views/Item/ItemMeasurements.vue | 15 +++--- src/views/Item/ItemOKRs.vue | 17 ++++--- src/views/Item/ItemWrapper.vue | 3 +- src/views/KeyResultHome.vue | 33 ++++++------ src/views/NotFound.vue | 3 +- src/views/ObjectiveHome.vue | 23 +++++---- 33 files changed, 185 insertions(+), 107 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c8b648d3..08d2201e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file. The format - Organization, department and product filter in admin panel should no longer disappear when search result count reaches certain threshold. - Improved WCAG compliance with respect to text color contrast. +- Fixed a problem that would sometimes cause an "infinite spinner" when a new + version of the app was deployed. ### Changed diff --git a/src/components/EmptyState.vue b/src/components/EmptyState.vue index 1823900d4..2724529a7 100644 --- a/src/components/EmptyState.vue +++ b/src/components/EmptyState.vue @@ -16,11 +16,13 @@