summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-06-15 19:44:21 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-06-15 19:44:21 +0000
commit7094a4d75d5d600fe6a035a7a9b4534ec1aca295 (patch)
tree2e1e3aecc39c15fbcd28cb9bb28f4b18365fccf8
parent64a09d6e02899144d37d196f1a33d40567e9fd82 (diff)
parent190685741c47aff3ec53fb55308a36b46d1ef8d2 (diff)
downloadgitlab-ce-7094a4d75d5d600fe6a035a7a9b4534ec1aca295.tar.gz
Merge branch 'new-project-mobile' into 'master'
New Project page improvements for mobile ## What does this MR do? Redesigns the "Project path" fields on the New Project page. ## Are there points in the code the reviewer needs to double check? Not that I know of, nothing I changed should break any other pages. ## Why was this MR needed? The new project page was unusable on mobile because the project name text field didn't have enough space. ## What are the relevant issue numbers? Fixes #18599. ## Screenshots (if relevant) Before: ![Screen_Shot_2016-06-15_at_12.38.58_PM](/uploads/046a824b283e24266cabc9ea3dfb169c/Screen_Shot_2016-06-15_at_12.38.58_PM.png) After: ![Screen_Shot_2016-06-15_at_12.37.19_PM](/uploads/6d01310192965b413bfedd9c8d2129f7/Screen_Shot_2016-06-15_at_12.37.19_PM.png) ![Screen_Shot_2016-06-15_at_12.37.28_PM](/uploads/3944a0f0ab04373ec92f7cafe90872df/Screen_Shot_2016-06-15_at_12.37.28_PM.png) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) cc: @jschatz1 @dzaporozhets See merge request !4687
-rw-r--r--app/assets/stylesheets/pages/projects.scss10
-rw-r--r--app/views/projects/new.html.haml24
-rw-r--r--features/steps/dashboard/new_project.rb3
3 files changed, 15 insertions, 22 deletions
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 0e4cefc55c2..c85d23a31f0 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -5,10 +5,12 @@
font-weight: normal;
}
}
+
.no-ssh-key-message, .project-limit-message {
background-color: #f28d35;
margin-bottom: 0;
}
+
.new_project,
.edit-project {
fieldset.features {
@@ -18,13 +20,6 @@
}
}
-.project-name-holder {
- .help-inline {
- vertical-align: top;
- padding: 7px;
- }
-}
-
.project-home-panel {
background: $white-light;
text-align: left;
@@ -376,6 +371,7 @@ a.deploy-project-label {
.project-import .btn {
float: left;
+ margin-bottom: 10px;
margin-right: 10px;
}
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index f9ac16b32f3..7e8b8f83467 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -11,26 +11,22 @@
.project-edit-content
= form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f|
- .form-group.project-name-holder
+ .form-group
= f.label :path, class: 'control-label' do
- Project path
+ Project owner
.col-sm-10
- .input-group
- - if current_user.can_select_namespace?
- .input-group-addon
- = root_url
- = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user, display_path: true), {}, {class: 'select2 js-select-namespace', tabindex: 1}
- .input-group-addon
- \/
- - else
- .input-group-addon
- #{root_url}#{current_user.username}/
- = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true
-
+ = f.select :namespace_id, namespaces_options(:current_user), {}, {class: 'select2 js-select-namespace', tabindex: 1}
+
- if current_user.can_create_group?
.help-block
Want to house several dependent projects under the same namespace?
= link_to "Create a group", new_group_path
+
+ .form-group
+ = f.label :path, class: 'control-label' do
+ Project name
+ .col-sm-10
+ = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true
- if import_sources_enabled?
.project-import.js-toggle-container
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
index a0aad66184d..5308e77fb19 100644
--- a/features/steps/dashboard/new_project.rb
+++ b/features/steps/dashboard/new_project.rb
@@ -10,7 +10,8 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
end
step 'I see "New Project" page' do
- expect(page).to have_content('Project path')
+ expect(page).to have_content('Project owner')
+ expect(page).to have_content('Project name')
end
step 'I see all possible import optios' do