stable

Clone or download

Read-only

Build and deliver BreadcrumbPrivacy Vue component as an external dependency

Users of the component should not have to setup specific builds dedicated to this component to integrate it, it should be managed like any other dep coming from a registry. Dealing separatly with the build process in each app means it's easier to make mistakes. The global package @tuleap/core is used in order to deliver the component. It has been done this way to avoid introducing a dedicated build process and updating every global config (Lerna, Jest...). This approach has however limitation (e.g. we can't cleanly define vue as a peer dependency nor the main script to ease the imports in consumer apps) and must be revised if the need arise again. Delivering the Vue component as a proper Vue plugin instead of just importing the raw component should also be considered. Overall it seems like a good idea to avoid this kind of approach where a Vue component is shared across multiple apps. It is easy to get wrong and it will be a regular pain in the long term maintainance. Also the global approach of delegating to each app the responsability of correctly importing the component whenever they want to display a breadcrumb is likely to become inconsistent between the different parts composing Tuleap because there is nothing forcing it (except reviewers but they will forget) and it's easier to not do it. This contribution is only making what has been already written work properly. Part of story #16210: Remove navigation bar Change-Id: Ib71071001d2cc124d84adf529f56667d28bf7772

Modified Files

Name
M plugins/document/package.json +3 −1 Go to diff View file
M plugins/document/scripts/document/components/Breadcrumb/DocumentBreadcrumb.vue +2 −2 Go to diff View file
M plugins/git/package.json +3 −1 Go to diff View file
M plugins/git/scripts/repositories/src/components/GitBreadcrumbs.vue +2 −2 Go to diff View file
M src/package-lock.json +2 −1 Go to diff View file
M src/package.json +1 −0 Go to diff View file
A src/scripts/vue-components/breadcrumb-privacy/.gitignore +1 −0 Go to diff View file
M src/scripts/vue-components/breadcrumb-privacy/BreadcrumbPrivacy.vue +1 −1 Go to diff View file
M src/tsconfig.json +1 −0 Go to diff View file
M src/webpack.common.js +29 −0 Go to diff View file
M tests/deptrac/core_on_plugins.yml +2 −1 Go to diff View file