Merge gl-dropdown with gl-new-dropdown and make sure gitlab is updated with the new dropdown component that conforms to the design system
This issue describes a plan to deprecate the obsolete GlDropdown
implementation and migrate all instances of that component to the new GlDropdown
implementation.
Approach: Organize a dropdown migration effort
Goals
- Merge dropdown component without introducing new abstractions.
- Migrate all
GlDropdown
instances incrementally.
Why
- It is a boring and predictable solution.
- We can break down the effort into multiple developers.
- It is a proven approach. It worked pretty well with the BootstrapVue upgrade. It’s also worked well with the Jestsodus and lodash projects.
How
-
Rename the current GlDropdown
component toGlDeprecatedDropdown
.-
To avoid breaking master
in consuming projects, we should keep exportingGlDropdown
as bothGlDropdown
ANDGlDeprecatedDropdown
. Doing this adds an additional step to remove the deprecatedGlDropdown
export, but it gives us more breathing room to replace instances ofGlDropdown
withGlDeprecatedDropdown
. -
Update all GitLab UI components that rely on GlDropdown
so that they useGlDeprecatedDropdown
instead.
-
-
When the change is released, migrate GlDropdown
toGlDeprecatedDropdown
in consuming projects:-
GitLab -
Customer Portal -
Status Page
-
-
Communicate those changes in #frontend
and#frontend_maintainers
and during the FE weekly call. -
BREAKING CHANGE
Remove the deprecatedGlDropdown
export once we're sure that it's safe to do so (can potentially be done together with the next step). -
Rename GlNewDropdown
toGlDropdown
.-
Here again, we want to make sure not to break master
in consuming projects by keeping theGlNewDropdown
export along with the newGlDropdown
export. -
Update all GitLab UI components that rely on GlNewDropdown
so that they useGlDropdown
instead.
-
-
When the change is released, migrate GlNewDropdown
toGlDropdown
in consuming projects:-
GitLab -
Customer Portal -
Status Page
-
-
Communicate those changes in #frontend
and#frontend_maintainers
and during the FE weekly call. -
BREAKING CHANGE
Remove theGlNewDropdown
export once we're sure that it's safe to do so. -
Create an epic to collect all issues to replace GlDeprecatedDropdown
withGlDropdown
. -
Create an issue for each file that contain instances of GlDeprecatedDropdown
. You can use an automation script to create these issues. Document the following instructions in the issue:-
Indicate that each file should be migrated in a separate Merge Request. -
The Merge Request should contain before/after screenshots of each dropdown migration for easier UX review. -
The Merge Request should be reviewed by a Product Designer with domain expertise in dropdowns.
-
-
Request in the #frontend channel, help on closing those issues. -
Once all the issues are closed, delete the GlDeprecatedDropdown
component.
Follow the same strategy with the dropdown component.
Good to haves
- Provide a list of codemod expressions to facilitate the migration effort.
- Implement an ESLint rule that warns about the usage of the deprecated dropdown component in a Vue file.
Done
Edited by Mike Greiling