Change: Incorporate bootstrap-vue into GitLab UIs code base
Change pattern proposal: Incorporate bootstrap-vue into GitLab UIs code base
Old Pattern
We currently use bootstrap-vue as a dependency: https://gitlab.com/gitlab-org/gitlab-ui/-/blob/main/package.json#L61
New Pattern
- Start using a fork of bootstrap-vue, this has been prepared here:
- https://gitlab.com/gitlab-org/frontend/bootstrap-vue
- https://www.npmjs.com/package/@gitlab/bootstrap-vue
- This fork can help us getting fixes merged, for example: bootstrap-vue!3 (merged) vs https://github.com/bootstrap-vue/bootstrap-vue/pull/6866
- This can help us getting fixes released, for example https://github.com/bootstrap-vue/bootstrap-vue/pull/6374 which hasn't been released yet and blocks us from a vue-router upgrade: gitlab-org/gitlab!58765 (comment 646508540)
- Is two way door decision which is maintainable, because we can get changes back upstream in case it gets maintained again and we can quickly merge upstream changes into our branch.
- Eventually copy the status quo of bootstrap-vue (or our fork) into GitLab UI, we could either consume the source directly or maybe in a first step via `yarn install "file://./src/bootstrap-vue"
- Slowly merge the components and documentation to be one.
Advantages of switching patterns
- bootstrap-vue
seemsis unmaintained. The last release happened (almost) a year ago, the last merge into the dev branch on 2021-06-17: https://github.com/bootstrap-vue/bootstrap-vue/commit/45635d1d391263192787e9e0bddc004abe115ace - gitlab-ui is very tied to bootstrap-vue. Inlining it would mean we are able to change the things we need to change more easily and maybe even remove things we do not need (e.g. bootstrap icons)
- We can focus on the things that are important to us (e.g. updating to Vue 3/bootstrap 5/etc.)
- We only have "one documentation" in the end and don't need to link between the two.
Disadvantages of switching patterns
- We need to maintain more code.
- "We don't give back to the community"
What is the impact on our existing codebase?
GitLab UI would grow, but not really. The coding styles differ vastly (SFC vs non-SFC)
Reference implementation
TBA
Edited by Lukas Eipert