summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-06-01 15:56:41 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-06-01 15:56:41 +0000
commiteeb73247aaf7002e81a3863bcbf376bbb7e692a4 (patch)
tree04ec78b45960e9ad6789ce86a0959b9dd1f52676
parentc5f89e5bd7f9371882de8b6ad62d24467b22937b (diff)
parente6c87b74866a9e53d17eaf63fda00f18f3d8a80e (diff)
downloadgitlab-ce-eeb73247aaf7002e81a3863bcbf376bbb7e692a4.tar.gz
Merge branch '47113-modal-header-styling-is-broken' into 'master'
Resolve "Modal header styling is broken" Closes #47113 See merge request gitlab-org/gitlab-ce!19312
-rw-r--r--app/assets/stylesheets/framework/modal.scss1
-rw-r--r--app/views/help/_shortcuts.html.haml5
-rw-r--r--app/views/profiles/show.html.haml5
-rw-r--r--app/views/projects/_bitbucket_import_modal.html.haml5
-rw-r--r--app/views/projects/_gitlab_import_modal.html.haml5
-rw-r--r--app/views/projects/_issuable_by_email.html.haml4
-rw-r--r--app/views/projects/blob/_new_dir.html.haml3
-rw-r--r--app/views/projects/blob/_remove.html.haml3
-rw-r--r--app/views/projects/blob/_upload.html.haml3
-rw-r--r--app/views/projects/branches/_delete_protected_modal.html.haml3
-rw-r--r--app/views/projects/commit/_change.html.haml3
-rw-r--r--app/views/projects/deploy_tokens/_revoke_modal.html.haml6
-rw-r--r--app/views/projects/merge_requests/_how_to_merge.html.haml5
-rw-r--r--app/views/projects/wikis/_new.html.haml3
-rw-r--r--app/views/shared/_confirm_modal.html.haml3
-rw-r--r--app/views/shared/_delete_label_modal.html.haml3
-rw-r--r--app/views/shared/notifications/_custom_notifications.html.haml4
-rw-r--r--changelogs/unreleased/47113-modal-header-styling-is-broken.yml5
18 files changed, 42 insertions, 27 deletions
diff --git a/app/assets/stylesheets/framework/modal.scss b/app/assets/stylesheets/framework/modal.scss
index ed5a1c91d8f..a7896cc3fc3 100644
--- a/app/assets/stylesheets/framework/modal.scss
+++ b/app/assets/stylesheets/framework/modal.scss
@@ -1,6 +1,5 @@
.modal-header {
background-color: $modal-body-bg;
- padding: #{3 * $grid-size} #{2 * $grid-size};
.page-title,
.modal-title {
diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml
index 9a3a03a7671..29db29235c1 100644
--- a/app/views/help/_shortcuts.html.haml
+++ b/app/views/help/_shortcuts.html.haml
@@ -2,11 +2,12 @@
.modal-dialog.modal-lg
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
- %h4
+ %h4.modal-title
Keyboard Shortcuts
%small
= link_to '(Show all)', '#', class: 'js-more-help-button'
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
.row
.col-lg-4
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index fbb29e7a0d9..507cd5dcc12 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -77,11 +77,10 @@
.modal-dialog
.modal-content
.modal-header
- %button.close{ type: 'button', 'data-dismiss': 'modal' }
- %span
- &times;
%h4.modal-title
Position and size your new avatar
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
.profile-crop-image-container
%img.modal-profile-crop-image{ alt: 'Avatar cropper' }
diff --git a/app/views/projects/_bitbucket_import_modal.html.haml b/app/views/projects/_bitbucket_import_modal.html.haml
index c24a496486c..c54a4ceb890 100644
--- a/app/views/projects/_bitbucket_import_modal.html.haml
+++ b/app/views/projects/_bitbucket_import_modal.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
- %h3 Import projects from Bitbucket
+ %h3.modal-title Import projects from Bitbucket
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
To enable importing projects from Bitbucket,
- if current_user.admin?
diff --git a/app/views/projects/_gitlab_import_modal.html.haml b/app/views/projects/_gitlab_import_modal.html.haml
index 00aef66e1f8..5519415cdc3 100644
--- a/app/views/projects/_gitlab_import_modal.html.haml
+++ b/app/views/projects/_gitlab_import_modal.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
- %h3 Import projects from GitLab.com
+ %h3.modal-title Import projects from GitLab.com
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
To enable importing projects from GitLab.com,
- if current_user.admin?
diff --git a/app/views/projects/_issuable_by_email.html.haml b/app/views/projects/_issuable_by_email.html.haml
index e3dc0677bd6..22adf5b4008 100644
--- a/app/views/projects/_issuable_by_email.html.haml
+++ b/app/views/projects/_issuable_by_email.html.haml
@@ -8,10 +8,10 @@
.modal-dialog{ role: "document" }
.modal-content
.modal-header
- %button.close{ type: "button", data: { dismiss: "modal" }, aria: { label: "close" } }
- %span{ aria: { hidden: "true" } }= icon("times")
%h4.modal-title
Create new #{name} by email
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p
You can create a new #{name} inside this project by sending an email to the following email address:
diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml
index e7a4e3d67cb..6f3a691518b 100644
--- a/app/views/projects/blob/_new_dir.html.haml
+++ b/app/views/projects/blob/_new_dir.html.haml
@@ -2,8 +2,9 @@
.modal-dialog.modal-lg
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
%h3.page-title= _('Create New Directory')
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
= form_tag project_create_dir_path(@project, @id), method: :post, remote: false, class: 'js-create-dir-form js-quick-submit js-requires-input' do
.form-group.row
diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml
index 4628ecff3d6..f80bae5c88c 100644
--- a/app/views/projects/blob/_remove.html.haml
+++ b/app/views/projects/blob/_remove.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
%h3.page-title Delete #{@blob.name}
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
= form_tag project_blob_path(@project, @id), method: :delete, class: 'js-delete-blob-form js-quick-submit js-requires-input' do
diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml
index 60a49441ce8..0a5c73c9037 100644
--- a/app/views/projects/blob/_upload.html.haml
+++ b/app/views/projects/blob/_upload.html.haml
@@ -2,8 +2,9 @@
.modal-dialog.modal-lg
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } &times;
%h3.page-title= title
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
= form_tag form_path, method: method, class: 'js-quick-submit js-upload-blob-form', data: { method: method } do
.dropzone
diff --git a/app/views/projects/branches/_delete_protected_modal.html.haml b/app/views/projects/branches/_delete_protected_modal.html.haml
index e0008e322a0..8aa79d2d464 100644
--- a/app/views/projects/branches/_delete_protected_modal.html.haml
+++ b/app/views/projects/branches/_delete_protected_modal.html.haml
@@ -2,11 +2,12 @@
.modal-dialog
.modal-content
.modal-header
- %button.close{ data: { dismiss: 'modal' } } ×
%h3.page-title
- title_branch_name = capture do
%span.js-branch-name.ref-name>[branch name]
= s_("Branches|Delete protected branch '%{branch_name}'?").html_safe % { branch_name: title_branch_name }
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p
diff --git a/app/views/projects/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml
index 430bc8f59f9..30605927fd1 100644
--- a/app/views/projects/commit/_change.html.haml
+++ b/app/views/projects/commit/_change.html.haml
@@ -15,8 +15,9 @@
.modal-dialog
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
%h3.page-title= title
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
- if description
%p.append-bottom-20= description
diff --git a/app/views/projects/deploy_tokens/_revoke_modal.html.haml b/app/views/projects/deploy_tokens/_revoke_modal.html.haml
index ace3480c815..a67c3a0c841 100644
--- a/app/views/projects/deploy_tokens/_revoke_modal.html.haml
+++ b/app/views/projects/deploy_tokens/_revoke_modal.html.haml
@@ -2,11 +2,11 @@
.modal-dialog
.modal-content
.modal-header
- %h4.modal-title.float-left
+ %h4.modal-title
= s_('DeployTokens|Revoke')
%b #{token.name}?
- %button.close{ 'aria-label' => _('Close'), 'data-dismiss' => 'modal', type: 'button' }
- %span{ 'aria-hidden' => 'true' } &times;
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p
= s_('DeployTokens|You are about to revoke')
diff --git a/app/views/projects/merge_requests/_how_to_merge.html.haml b/app/views/projects/merge_requests/_how_to_merge.html.haml
index 5353fa8a88f..62dd21ef6e0 100644
--- a/app/views/projects/merge_requests/_how_to_merge.html.haml
+++ b/app/views/projects/merge_requests/_how_to_merge.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %h3 Check out, review, and merge locally
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
+ %h3.modal-title Check out, review, and merge locally
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p
%strong Step 1.
diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml
index 06a3cac12d5..38382aae67c 100644
--- a/app/views/projects/wikis/_new.html.haml
+++ b/app/views/projects/wikis/_new.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
%h3.page-title= s_("WikiNewPageTitle|New Wiki Page")
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%form.new-wiki-page
.form-group
diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml
index 7c326d36d99..1dcf4369253 100644
--- a/app/views/shared/_confirm_modal.html.haml
+++ b/app/views/shared/_confirm_modal.html.haml
@@ -4,7 +4,8 @@
.modal-header
%h3.page-title
Confirmation required
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p.text-danger.js-confirm-text
diff --git a/app/views/shared/_delete_label_modal.html.haml b/app/views/shared/_delete_label_modal.html.haml
index 01effefc34d..b96380923ac 100644
--- a/app/views/shared/_delete_label_modal.html.haml
+++ b/app/views/shared/_delete_label_modal.html.haml
@@ -2,8 +2,9 @@
.modal-dialog
.modal-content
.modal-header
- %button.close{ data: {dismiss: 'modal' } } &times;
%h3.page-title Delete #{render_colored_label(label, tooltip: false)} ?
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
%p
diff --git a/app/views/shared/notifications/_custom_notifications.html.haml b/app/views/shared/notifications/_custom_notifications.html.haml
index 51d912b4a66..1f6e8f98bbb 100644
--- a/app/views/shared/notifications/_custom_notifications.html.haml
+++ b/app/views/shared/notifications/_custom_notifications.html.haml
@@ -2,10 +2,10 @@
.modal-dialog
.modal-content
.modal-header
- %button.close{ type: "button", "aria-label": "close", data: { dismiss: "modal" } }
- %span{ "aria-hidden": "true" } ×
%h4#custom-notifications-title.modal-title
#{ _('Custom notification events') }
+ %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
+ %span{ "aria-hidden": true } &times;
.modal-body
.container-fluid
diff --git a/changelogs/unreleased/47113-modal-header-styling-is-broken.yml b/changelogs/unreleased/47113-modal-header-styling-is-broken.yml
new file mode 100644
index 00000000000..1c78e5d4211
--- /dev/null
+++ b/changelogs/unreleased/47113-modal-header-styling-is-broken.yml
@@ -0,0 +1,5 @@
+---
+title: Fixes the styling on the modal headers
+merge_request: 19312
+author: samdbeckham
+type: fixed