- Status: accepted
- Deciders: Thomas GERBET
- Date: 2022-03-17
Multiple JavaScript frameworks have been used over the years in Tuleap codebase. The role of this document is to state the preferred solution when creating a new app and to describe the others situations currently existing in the codebase.
This document is expected to be revised/superseded in the future.
Vue 3 with components written in TypeScript using the Composition API
New JS app requiring the use of a framework are expected to use Vue 3 with TypeScript and the Composition API.
Components must be written using Vue SFC.
Volar / vue-tsc must be used to typecheck the code.
If complex state management is needed, Pinia must be used.
On specific situations other lightweight alternatives might be preferred. Those situations must be evaluated on a case by case basis.
Vue 2 with components written in TypeScript using Vue Class Component
New components must be written using the Composition API. Existing components should be migrated to the Composition API in order to make it possible to migrate to Vue 3.
Components that might still be written in plain JavaScript should be migrated to TypeScript and the Composition API.
Migration to Vue 3 should be considered the primary goal. Migrating from Vuex to Pinia is considered a secondary objective which is not critical to tackle yet, even if it means adding more "Vuex code" in the short term.
AngularJS is considered end-of-life upstream. New Tuleap features are not supposed to add more AngularJS code to the codebase.
Specific migration plans should be crafted for each app to determine the most appropriate solution. If new features are required in an existing AngularJS app and migrating to something else is not yet possible, care must be taken to increase as little as possible our dependency to AngularJS.