Draft: Draft: Add a native Vue 3 gitlab-ui package derived from the template rewrite
⚠️ Disclaimer: 100% AI-generatedEvery line of code, test, and this description was written by Claude (Opus 5.5) in Claude Code, directed and supervised by @xanf, with no hand-written code. Correctness claims rest on machine-checked evidence (the package's own native Vue 3 jest run, markup/event parity against fixtures rendered by
mainon Vue 2, dist checks), not on human review. It is derived from the bootstrap-vue template rewrite !6550 (this MR targets that branch, so the diff shows the package only).
What this does
Adds packages/gitlab-ui-vue3: a native Vue 3 build of @gitlab/ui (no @vue/compat) derived from the
template rewrite, in the spirit of gitlab-org/gitlab!246445 (closed) but
without test-runner migrations: the package keeps jest (vue3-jest + VTU 2).
The point: once bootstrap-vue's render-function/mixin implementation is replaced by portable
<template> SFCs that route every Vue-version-specific line through one shim (src/utils/vue_utils.js), moving to
native Vue 3 needs only mechanical changes.
bin/sync_from_gitlab_ui.sh [--reapply]copiespackages/gitlab-ui/srcand 3-way re-applies the package's own edits against the recorded source commit (SYNCED_FROM).- Mechanical codemods: lifecycle hook renames,
$scopedSlots→$slots, Vue 3 directive hooks, v-model desugaring, functional → stateful, portal-vue → Teleport,COMPAT_CONFIGpins (bin/apply_compat_config.mjs) so the same sources behave identically when a consumer still runs@vue/compat. - Build: rollup, per-file ESM, ES2018 (
yarn build,check:dist).
Status (synced from the rewrite's current series; no vendored bootstrap-vue left)
| Check | Result |
|---|---|
Native Vue 3 jest (no @vue/compat) |
195 / 195 suites, 6098 tests passed, 0 failed (32 skips are the specs' own native gates: .native, Vue.extend, $root.$on) |
| Suites blocked by vendored bootstrap-vue | 0 (the vendored code is gone from the draft) |
| Hand edits to specs | 1 spec (base_dropdown.spec.js); every other spec runs as written in packages/gitlab-ui |
| Markup + event parity vs Vue 2 fixtures (140 modules) | 97 identical; 43 differ — every difference is either what the draft itself renders under @vue/compat or inherent to native Vue 3 (.native, false attributes, legacy self-events) |
| Dist | 247 files, ES2018 check passes; ui-vue3:unit_tests + ui-vue3:build CI jobs green |
Package-specific code is the sync, the mechanical codemods and a few documented native-only items; everything
version-specific in the components lives in the rewrite's shim (nativeEmits(), isNativeVue3, the Teleport shim,
ARRAY_WATCH_OPTIONS, …).
Companion GitLab MR (consumes this package on the native Vue 3 lanes, analogue of gitlab-org/gitlab!246445 (closed) without the test-runner migration): gitlab-org/gitlab!264182