Skip to content
Snippets Groups Projects

Move EE-specific files to a standalone directory

Merged username-removed-423915 requested to merge 2902-standalone-ee-dir into master
All threads resolved!

What does this MR do?

Move EE-specific files to a standalone directory

  • app/{models, controllers, etc}
  • lib
  • app/views
  • app/views/admin/monitoring/ee
  • app/views/projects/protected_branches/ee
  • app/views/projects/protected_tags/ee
  • app/views/projects/settings/ee
  • app/assets/javascripts/vue_merge_request_widget/ee
  • app/assets/javascripts/protected_branches/ee
  • app/assets/javascripts/protected_tags/ee
  • spec
  • qa

Why was this MR needed?

To make it more clear which codes are EE-specific

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #2902 (closed)

Edited by username-removed-423915

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in merge request !2248 (merged)

  • added 153 commits

    • 3119c675...833969f4 - 150 commits from branch master
    • 4f90a220 - Move EE-specific files to a standalone directory
    • e1efbeb7 - Also move models/concerns and lib
    • ba9c6d4a - fixup! Move EE-specific files to a standalone directory

    Compare with previous version

  • username-removed-423915 changed the description

    changed the description

  • added Edge label

  • username-removed-423915 marked the checklist item app/views as completed

    marked the checklist item app/views as completed

  • added 107 commits

    • baa71bcb...951cd3c3 - 103 commits from branch master
    • cb131925 - Move EE-specific files to a standalone directory
    • e23f8690 - Also move models/concerns and lib
    • 61ae3c99 - fixup! Move EE-specific files to a standalone directory
    • fb4c955d - Move views

    Compare with previous version

  • username-removed-423915 marked the checklist item spec as completed

    marked the checklist item spec as completed

  • username-removed-423915 resolved all discussions

    resolved all discussions

  • username-removed-423915 changed the description

    changed the description

  • added 61 commits

    • d964b49c...917438cc - 57 commits from branch master
    • 536dec20 - Move EE-specific files to a standalone directory
    • ee122a11 - Also move models/concerns and lib
    • a3994ab6 - Move views
    • 5131b2d9 - Move spec files

    Compare with previous version

  • username-removed-423915 marked the checklist item app/views/admin/monitoring/ee as completed

    marked the checklist item app/views/admin/monitoring/ee as completed

  • username-removed-423915 marked the checklist item app/views/projects/protected_branches/ee as completed

    marked the checklist item app/views/projects/protected_branches/ee as completed

  • Thanks for the awesome work here @godfat!

  • username-removed-423915 unmarked as a Work In Progress

    unmarked as a Work In Progress

  • username-removed-423915 marked the checklist item app/views/projects/protected_tags/ee as completed

    marked the checklist item app/views/projects/protected_tags/ee as completed

  • username-removed-423915 marked the checklist item app/views/projects/settings/ee as completed

    marked the checklist item app/views/projects/settings/ee as completed

  • username-removed-423915 marked the checklist item app/assets/javascripts/vue_merge_request_widget/ee as completed

    marked the checklist item app/assets/javascripts/vue_merge_request_widget/ee as completed

  • username-removed-423915 marked the checklist item app/assets/javascripts/protected_branches/ee as completed

    marked the checklist item app/assets/javascripts/protected_branches/ee as completed

  • username-removed-423915 marked the checklist item app/assets/javascripts/protected_tags/ee as completed

    marked the checklist item app/assets/javascripts/protected_tags/ee as completed

  • added 67 commits

    • 83538775...89d7c75a - 61 commits from branch master
    • e561bf3d - Move EE-specific files to a standalone directory
    • 3da0787b - Also move models/concerns and lib
    • 1c4215e2 - Move views
    • 627b87e0 - Move spec files
    • ae1bc589 - Move the new view files
    • e3c67462 - Move javascript files

    Compare with previous version

  • added 67 commits

    • 83538775...89d7c75a - 61 commits from branch master
    • e561bf3d - Move EE-specific files to a standalone directory
    • 3da0787b - Also move models/concerns and lib
    • 1c4215e2 - Move views
    • 627b87e0 - Move spec files
    • ae1bc589 - Move the new view files
    • e3c67462 - Move javascript files

    Compare with previous version

  • @godfat One benefit of moving EE-specific specs to ee/spec is that we could get rid of the # rubocop:disable RSpec/FilePath comments. For instance in spec/lib/gitlab/ee/visibility_level_spec.rb we describe describe Gitlab::VisibilityLevel so Rubocop is expecting the file to be spec/lib/gitlab/visibility_level_spec.rb. If we move this file to ee/spec, the naming will be good again! :)

  • One benefit of moving EE-specific specs to ee/spec

    That being said, I understand this is not the current approach so we cannot resolve this for now. :)

  • Let's hold off on doing anything more here until we reach consensus in https://gitlab.com/gitlab-org/gitlab-ee/issues/2902 :)

  • @rymai Oh, that one, moving it to spec/ee/spec/lib/gitlab/visibility_level_spec.rb would also work, too! :P

    I'll move all other discussions over to the issue.

  • added 17 commits

    • 01ee3791...3fc92c79 - 10 commits from branch master
    • 86fd8034 - Move EE-specific files to a standalone directory
    • 76db6519 - Also move models/concerns and lib
    • e8af6817 - Move views
    • 7a26cf1d - Move spec files
    • f4832119 - Move the new view files
    • 5d924e53 - Move javascript files
    • ccf288f1 - Move this spec to the right location and enable rubocop

    Compare with previous version

  • @DouweM We're unlikely to reach a consensus on #2902 (closed) (and we shouldn't try to reach consensus anyways) so I'd be in favor of trying it and see. Also, as @vsizov said, this is a reversible decision.

  • I'll rebase again, but we should rebase again after https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2554 is merged because that one is more important and should go in first.

  • added 301 commits

    Compare with previous version

  • @rymai Sure, let's try it.

  • added 341 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • @rymai Anything else you think we need? Should we update the doc somehow?

    @mikegreiling Should we update http://docs.gitlab.com/ee/development/fe_guide/style_guide_js.html#modules-imports-and-exports ? How should we phrase it?

  • changed milestone to %9.5

  • added 9 commits

    Compare with previous version

  • Let's change that part like so:

    Relative paths: when importing a module in the same directory, a child directory, or an immediate parent directory prefer relative paths. When importing a module which is two or more levels up, prefer either ~/ or ee/.

    In app/assets/javascripts/my-feature/subdir:

    // bad
    import Foo from '~/my-feature/foo';
    import Bar from '~/my-feature/subdir/bar';
    import Bin from '~/my-feature/subdir/lib/bin';
    
    // good
    import Foo from '../foo';
    import Bar from './bar';
    import Bin from './lib/bin';

    In spec/javascripts:

    // bad
    import Foo from '../../app/assets/javascripts/my-feature/foo';
    
    // good
    import Foo from '~/my-feature/foo';

    When referencing an EE component:

    // bad
    import Foo from '../../../../../ee/app/assets/javascripts/my-feature/ee-foo';
    
    // good
    import Foo from 'ee/my-feature/foo';
    Edited by username-removed-636429
  • mentioned in commit 69d6e911

  • added 1 commit

    • 69d6e911 - Update JavaScript style guide according to:

    Compare with previous version

  • @mikegreiling Thanks, looks good to me! Pushed that one

  • added 1 commit

    • 0be3a416 - Update EE doc about where to place the files

    Compare with previous version

  • username-removed-423915 marked the checklist item Documentation created/updated as completed

    marked the checklist item Documentation created/updated as completed

  • @rymai I updated the doc a bit and it might conflict with https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2248

    What do you think? Should we update the doc more in this MR?

  • username-removed-128633 resolved all discussions

    resolved all discussions

  • mentioned in issue #3097 (closed)

  • What do you think? Should we update the doc more in this MR?

    @godfat Let's merge this one first since it might conflict if we wait more.

  • username-removed-128633 approved this merge request

    approved this merge request

  • mentioned in commit c7837b50

  • mentioned in commit 19352a4d

  • Toon Claes mentioned in issue #3148

    mentioned in issue #3148

  • Toon Claes mentioned in commit 35a283d6

    mentioned in commit 35a283d6

  • Please register or sign in to reply
    Loading