Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 3 migration #1021

Merged
merged 125 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
c429456
Upgrade Vite
petterhj Jun 17, 2024
e32ff1d
Enable Vue 3 migration build
petterhj Jun 17, 2024
8d3e7e6
Update global mounting API usage
petterhj Jun 18, 2024
841d861
Upgrade to Vuex 4
petterhj Jun 18, 2024
415c505
Upgrade to vue-router 4
petterhj Jun 19, 2024
83139ce
Upgrade to vue-i18n 9
petterhj Jun 20, 2024
b4bb670
Use @unhead/vue in favour of vue-meta
petterhj Jun 20, 2024
cc151ca
Do not use `Vue.set` for nested objects
petterhj Jun 20, 2024
fccaa7f
Fix renamed lifecycle hooks
petterhj Jun 20, 2024
a31f076
Fix OKR view pane layout
petterhj Jun 20, 2024
bda8a3a
Fix `v-bind` ordering (`COMPILER_V_BIND_OBJECT_ORDER`)
petterhj Jun 21, 2024
3e945c9
Replace deprecated `::v-deep` selectors
petterhj Jun 21, 2024
95835f1
Fix linting config
petterhj Jun 25, 2024
7a61230
Migrate to `@oslokommune/punkt-vue` for Vue 3
petterhj Jun 25, 2024
737bbff
Upgrade vee-validate and switch to Punkt form components
petterhj Aug 13, 2024
dc7876d
Explicitly define async components (`COMPONENT_ASYNC`)
petterhj Aug 13, 2024
5ec4d83
Remove dependency on `v-click-outside`
petterhj Aug 13, 2024
8ae9af4
Replace `vuedraggable` dependency
petterhj Aug 14, 2024
165820f
Replace `v-tooltip` plugin with `vue-tippy`
petterhj Aug 15, 2024
b18d66f
Replace `vue-toasted` dependency
petterhj Aug 16, 2024
6a20bbf
Do not use `.native` modifier (`COMPILER_V_ON_NATIVE`)
petterhj Aug 16, 2024
33b84e2
Switch to Vue 3 proper
petterhj Aug 16, 2024
45d69d2
Remove custom event bus using removed instance methods (`INSTANCE_EVE…
petterhj Aug 16, 2024
b421d61
Initial migration to `VueFire@3` and `pinia` for auth and global state
petterhj Sep 2, 2024
4331675
Fix and migrate drawer wrapper component
petterhj Sep 4, 2024
66de4c7
Add `pinia` based stores to replace `vuex` for global state management
petterhj Nov 8, 2024
3eb5c4a
Remove disused router guards
petterhj Nov 8, 2024
afc82ba
Remove disused loader components
petterhj Nov 8, 2024
c0a9f01
Migrate form components to composition API
petterhj Nov 8, 2024
513c3d8
Move `FormComponent`
petterhj Nov 8, 2024
8b6efd4
Migrate database models and utils from namespaced to modular API
petterhj Nov 8, 2024
25bece9
Migrate site navigation components and improve UU
petterhj Nov 8, 2024
4517dbf
Add generic transition components
petterhj Nov 8, 2024
f3f829c
Refresh user profile dropdown and migrate related components
petterhj Nov 8, 2024
431ec59
Migrate various views and components to composition API
petterhj Nov 8, 2024
7ab1145
Move `ClappingHands` component
petterhj Nov 8, 2024
ef55684
Migrate admin views and components
petterhj Nov 8, 2024
01976f5
Revamp and migrate main home view
petterhj Nov 8, 2024
c8d579a
Revamp and migrate auth views
petterhj Nov 8, 2024
61044cd
Rework and migrate modals
petterhj Nov 13, 2024
ef18aac
Migrate drawer components
petterhj Nov 13, 2024
18fe5aa
Rename drawer components
petterhj Nov 13, 2024
5c2a8ac
Migrate widget components
petterhj Nov 13, 2024
1a0bff6
Move and reuse `UserLink` component
petterhj Nov 13, 2024
79bbe2e
Reorganize additional widget components
petterhj Nov 13, 2024
3d037a9
Migrate period selection components
petterhj Nov 13, 2024
9dc2450
Migrate item measurements view and components (KPIs)
petterhj Nov 13, 2024
2d63e7c
Migrate item OKR view, panes and components
petterhj Nov 13, 2024
7537ec7
Migrate item integration view
petterhj Nov 13, 2024
4841494
Migrate item about view
petterhj Nov 13, 2024
61c091d
Add lint rule that requires pascal case component names
petterhj Nov 13, 2024
934d510
Improve page title handling
petterhj Nov 14, 2024
9ca5471
Fix prop incorrectly marked `required`
petterhj Nov 15, 2024
f0b3a27
Clean up translation messages
petterhj Nov 15, 2024
d442cba
Set required select fields not clearable
petterhj Nov 15, 2024
cdb6a36
Fix tooltip for delete buttons
petterhj Nov 15, 2024
49bae73
Bump `@oslokommune/punkt`
petterhj Nov 15, 2024
b369fb1
Prevent event propagation for delete button popover
petterhj Nov 15, 2024
22ee322
Set correct scope for i18n translation components
petterhj Nov 15, 2024
8197de7
Fix Jest config
petterhj Nov 15, 2024
f0065aa
Use modular API for firebase config
petterhj Nov 19, 2024
d91c613
Do not import compiler macros
petterhj Nov 19, 2024
71e5cb2
Fix admin panel item filter
petterhj Nov 21, 2024
189d1e0
Fix department options when editing products in item drawer
petterhj Nov 21, 2024
1bb2f33
Merge pull request #1000 from oslokommune/vue3-admin-item-filter-fix
petterhj Nov 22, 2024
c212317
Merge pull request #1001 from oslokommune/vue3-fix-product-edit
petterhj Nov 22, 2024
4c32554
Improve page loading feedback
petterhj Nov 25, 2024
6f53083
Merge pull request #1006 from oslokommune/vue3-fix-init-loader
petterhj Nov 25, 2024
28870eb
Remember show archived toggle value
petterhj Nov 21, 2024
1df2b46
Add modal for restoring items from admin panel
petterhj Nov 21, 2024
4b3549d
Sort archived items to the bottom
petterhj Nov 21, 2024
48097c2
Merge pull request #1002 from oslokommune/vue3-admin-edit-archived-fix
petterhj Nov 25, 2024
5f43b90
Fix drag-n-drop ordering for KRs and KPIs
petterhj Nov 22, 2024
f336bd4
Merge pull request #1003 from oslokommune/vue3-fix-drag-n-drop-ordering
petterhj Nov 26, 2024
6143664
Fix period bar shortcut for objectives with old-style period
petterhj Nov 22, 2024
80ca53c
Merge pull request #1004 from oslokommune/vue3-fix-period-bar-shortcut
petterhj Nov 26, 2024
eb92a4f
Re-add colors still(?) missing from Punkt
petterhj Nov 26, 2024
3c91960
Close profile modal when form is saved
petterhj Nov 22, 2024
4cd65e6
Close user menu dropdown when profile is updated
petterhj Nov 26, 2024
c8ed634
Merge pull request #1005 from oslokommune/vue3-close-profile-modal-on…
petterhj Nov 26, 2024
c2ce4db
Prevent re-render on all route changes
petterhj Nov 26, 2024
53a8c79
Fix certain gantt chart navigation regressions
petterhj Nov 26, 2024
6edbc8c
Merge pull request #1007 from oslokommune/vue3-fix-workspace-multiselect
petterhj Nov 26, 2024
a3c4e8d
Fix tag search in custom select box
petterhj Dec 3, 2024
157b3eb
Make user selects searchable
petterhj Dec 3, 2024
3a46d10
Merge pull request #1009 from oslokommune/vue3-fix-selectbox
petterhj Dec 5, 2024
1d4d64a
Prevent additional re-rendering of timeline objectives on lifting/arc…
petterhj Nov 26, 2024
165f4d7
Fix warning for lifted objectives without own key results
petterhj Nov 27, 2024
3cbc2cd
Improve handling of timeline ghosts
petterhj Nov 28, 2024
85639e8
Merge pull request #1008 from oslokommune/vue3-fix-object-ghosts
petterhj Dec 5, 2024
84115cd
Improve keyboard navigation for nav dropdowns
petterhj Dec 5, 2024
cb92627
Merge pull request #1010 from oslokommune/vue3-kb-nav
petterhj Dec 5, 2024
3f0f6ca
Fix non-reactive user profile form
petterhj Dec 5, 2024
d06a1da
Merge pull request #1011 from oslokommune/vue3-fix-user-form
petterhj Dec 6, 2024
91815a4
Add number input component
petterhj Jan 8, 2025
59cd4e9
Improve UX of number inputs
petterhj Jan 8, 2025
e3b1fc5
Show key result progress unit as suffix on input
petterhj Jan 8, 2025
c41bd89
Use more precise validation error message
petterhj Jan 9, 2025
5156268
Merge pull request #1014 from oslokommune/number-input
petterhj Jan 9, 2025
b5593cf
Apply `npm audit fix`
petterhj Jan 9, 2025
c5f2229
Fix key result weight scale rendering
petterhj Jan 13, 2025
b1553be
Fix key result drawer values
petterhj Jan 13, 2025
c9818a4
Merge pull request #1015 from oslokommune/fix-weight-scale
petterhj Jan 15, 2025
f2c4d8f
Improve loading of items in the admin panel
petterhj Jan 15, 2025
500792a
Fix overflow issues and improve general styling in admin panel
petterhj Jan 15, 2025
e924a66
Merge pull request #1016 from oslokommune/admin-items
petterhj Jan 16, 2025
fcf2431
Fix `localeCompare` usage to properly sort items by locale
petterhj Jan 16, 2025
defeec7
Merge pull request #1017 from oslokommune/item-sorting
petterhj Jan 17, 2025
2b43c7a
Fix building of organization tree
petterhj Jan 16, 2025
0d37f21
Ensure that referenced items are loaded
petterhj Jan 16, 2025
2999d8b
Fix visual accordion glitch in KPI progress modal
petterhj Jan 16, 2025
6bb2148
Correct positioning of input copy button
petterhj Jan 16, 2025
11d21fa
Fix missing organization ref for new product
petterhj Jan 16, 2025
84941e6
Fix import of CSS for `vue-toast-notification`
petterhj Jan 17, 2025
8fd8f2f
Fix archived KPI alert margin
petterhj Jan 17, 2025
89a37a3
Merge pull request #1018 from oslokommune/various-fixes
petterhj Jan 20, 2025
43d0668
Upgrade `firebase` and `vuefire`
petterhj Jan 21, 2025
ea1d0ff
Bump `@oslokommune/punkt`
petterhj Jan 22, 2025
ee3ad83
Check for active objective and organization
petterhj Jan 23, 2025
32d0a4f
Disable VueFire Options API module
petterhj Jan 23, 2025
7d9eca9
Update changelog
petterhj Jan 23, 2025
764b34b
Upgrade `vue-echarts` and `echarts`
petterhj Jan 23, 2025
84357ff
Merge pull request #1020 from oslokommune/release-prep
petterhj Jan 24, 2025
4ba4550
Release 5.0.0
petterhj Jan 24, 2025
bbac107
Update `firestore.indexes.json`
petterhj Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
Use the recommended rule preset for `eslint-plugin-vue`.
https://eslint.vuejs.org/rules/
*/
'plugin:vue/recommended',
'plugin:vue/vue3-recommended',
/*
Use as the last extension in order to override conflicting ESLint rules.
https://github.com/prettier/eslint-plugin-prettier
Expand Down Expand Up @@ -44,6 +44,16 @@ module.exports = {
'no-use-before-define': 'off',
// TODO: Re-enable and lint this rule separately.
'vue/multi-word-component-names': 'off',
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: true,
ignores: [],
},
],
'vue/v-on-event-hyphenation': ['warn', 'always', { ignore: ['onClick'] }],
'vue/require-explicit-emits': 'off',
'func-names': 'off',
'no-restricted-syntax': 'off',
'import/extensions': [0, 'never'],
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion .stylelintrc.js → .stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
rules: {
'color-hex-length': 'long',
'color-function-notation': 'legacy',
'indentation': 2,
'at-rule-no-unknown': null,
'scss/at-rule-no-unknown': true,
'no-descending-specificity': null,
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [UNRELEASED]
## [5.0.0] 2025-01-24

This release introduces a significant update to the project, upgrading to Vue 3
and transitioning to Pinia for state management, along with updated versions of
Vue Router and VueFire. Several components have been rewritten or refactored,
deprecated packages have been replaced, and better integration of the Punkt
Design System has been implemented. Some bugs have been ironed out while new
issues may have been introduced due to the scope of changes.

### Changed

- Migration to Vue 3, leveraging the Composition API.
- Integration of Pinia as the new state management library.
- Updated versions of other core libraries: Vue Router and VueFire.
- Improved integration and utilization of the Punkt Design System.

### Security

- Deprecated and outdated packages have been replaced by newer alternatives.
- Updated dependencies to address potential security vulnerabilities and
ensure compliance with newer standards.

## [4.2.2] 2024-11-07

Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@
}
]
},
{
"collectionGroup": "departments",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "archived",
"order": "ASCENDING"
},
{
"fieldPath": "name",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "departments",
"queryScope": "COLLECTION",
Expand Down Expand Up @@ -320,6 +334,20 @@
}
]
},
{
"collectionGroup": "products",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "archived",
"order": "ASCENDING"
},
{
"fieldPath": "name",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "products",
"queryScope": "COLLECTION",
Expand Down
113 changes: 10 additions & 103 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,104 +33,24 @@
/>

<link rel="icon" href="/favicon.ico" />
<title>OKR | Oslo kommune</title>
<title>OKR</title>

<style>
.spinner__wrapper {
position: fixed;
top: 0;
left: 0;
top: calc(50% - 1.75rem);
left: calc(50% - 1.75rem);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
width: 100vw;
height: 100vh;
width: 3.5rem;
height: 3.5rem;
color: #ffffff;
}
.lds-default {
position: relative;
display: inline-block;
width: 80px;
height: 80px;
}
.lds-default div {
position: absolute;
width: 6px;
height: 6px;
background: #2a2859; /* color-blue-dark */
border-radius: 50%;
animation: lds-default 1.2s linear infinite;
}
.lds-default div:nth-child(1) {
top: 37px;
left: 66px;
animation-delay: 0s;
}
.lds-default div:nth-child(2) {
top: 22px;
left: 62px;
animation-delay: -0.1s;
}
.lds-default div:nth-child(3) {
top: 11px;
left: 52px;
animation-delay: -0.2s;
}
.lds-default div:nth-child(4) {
top: 7px;
left: 37px;
animation-delay: -0.3s;
}
.lds-default div:nth-child(5) {
top: 11px;
left: 22px;
animation-delay: -0.4s;
}
.lds-default div:nth-child(6) {
top: 22px;
left: 11px;
animation-delay: -0.5s;
}
.lds-default div:nth-child(7) {
top: 37px;
left: 7px;
animation-delay: -0.6s;
}
.lds-default div:nth-child(8) {
top: 52px;
left: 11px;
animation-delay: -0.7s;
}
.lds-default div:nth-child(9) {
top: 62px;
left: 22px;
animation-delay: -0.8s;
}
.lds-default div:nth-child(10) {
top: 66px;
left: 37px;
animation-delay: -0.9s;
}
.lds-default div:nth-child(11) {
top: 62px;
left: 52px;
animation-delay: -1s;
}
.lds-default div:nth-child(12) {
top: 52px;
left: 62px;
animation-delay: -1.1s;
}
@keyframes lds-default {
0%,
20%,
80%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
.spinner__wrapper > img {
width: 100%;
height: 100%;
}
</style>
</head>
Expand All @@ -143,20 +63,7 @@
</strong>
</noscript>
<div id="spinner" class="spinner__wrapper">
<div class="lds-default">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<img src="/loader.svg" alt="Loading content" />
</div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
Expand Down
File renamed without changes.
Loading
Loading