Skip to content

Resolve "Move source files into a src/ directory"

David Pisek requested to merge 467-move-source-files-into-src-directory into master

What does this MR do?

It moves all folders that contain code into a src directory.

Before:

gitlab-ui
├── components
├── directives
├── scss
├── utils
...

After:

gitlab-ui
├── src
│   ├── components
│   ├── directives
│   ├── scss
│   └── utils
...

Breaking changes

Any path that relied on one of the moved directories will need to be updated to account for the new src/ directory.

For GitLab specifically, the following imports will need to be updated:

SCSS

We moved /scss to /src/scss, which means that any project that imports GitLab UI's stylesheets will need to import the import paths. ie:

- @import '@gitlab/ui/scss/gitlab_ui';
+ @import '@gitlab/ui/src/scss/gitlab_ui';
- @import '@gitlab/ui/scss/utilities';
+ @import '@gitlab/ui/src/scss/utilities';

Affected file as of writing this: https://gitlab.com/gitlab-org/gitlab/blob/3abf399159a861617a1e6af7fba4e91f96e47505/app/assets/stylesheets/framework.scss#L5

Utils

Utils imports will have to be updated in https://gitlab.com/gitlab-org/gitlab/blob/3abf399159a861617a1e6af7fba4e91f96e47505/ee/app/assets/javascripts/issues_analytics/components/issues_analytics.vue#L4

- import { engineeringNotation, sum, average } from '@gitlab/ui/utils/number_utils';
+ import { engineeringNotation, sum, average } from '@gitlab/ui/src/utils/number_utils';

Once this is merged, we will upgrade gitlab-ui and fix all import issues in GitLab in this follow up MR: gitlab!18966 (merged)

Closes #467 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports