Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-06-07 21:25:53 +0300
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-06-07 21:25:53 +0300
commit3268675a0996d63297ba04330529ad8404d697a5 (patch)
tree16e024b90ffc3da1c7f233e8e16a0c735424154e
parent4cb619fd73fbdfe174497e39a2a655c1896e21d7 (diff)
Add sticky confidential issue bar
-rw-r--r--app/assets/stylesheets/pages/issuable.scss31
-rw-r--r--app/assets/stylesheets/pages/note_form.scss35
-rw-r--r--app/views/projects/_md_preview.html.haml6
-rw-r--r--app/views/projects/issues/show.html.haml8
-rw-r--r--changelogs/unreleased/fixed-confidential-issue-bar.yml4
5 files changed, 42 insertions, 42 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index c2346f2f1c3..a321941e0c9 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -729,3 +729,34 @@
}
}
}
+
+.confidential-issue-warning {
+ background-color: $gl-gray;
+ border-radius: 3px;
+ padding: $gl-btn-padding $gl-padding;
+ margin-top: $gl-padding-top;
+ font-size: 14px;
+ color: $white-light;
+
+ .fa {
+ margin-right: 8px;
+ }
+
+ a {
+ color: $white-light;
+ text-decoration: underline;
+ }
+
+ &.affix {
+ position: static;
+ width: initial;
+
+ @media (min-width: $screen-sm-min) {
+ position: sticky;
+ position: -webkit-sticky;
+ top: 60px;
+ z-index: 200;
+ @include transition(all);
+ }
+ }
+}
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index 0ddaab0da14..aa307414737 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -103,41 +103,6 @@
}
}
-.confidential-issue-warning {
- background-color: $gray-normal;
- border-radius: 3px;
- padding: 3px 12px;
- margin: auto;
- margin-top: 0;
- text-align: center;
- font-size: 12px;
- align-items: center;
-
- @media (max-width: $screen-md-max) {
- // On smaller devices the warning becomes the fourth item in the list,
- // rather than centering, and grows to span the full width of the
- // comment area.
- order: 4;
- margin: 6px auto;
- width: 100%;
- }
-
- .fa {
- margin-right: 8px;
- }
-}
-
-.right-sidebar-expanded {
- .confidential-issue-warning {
- // When the sidebar is open the warning becomes the fourth item in the list,
- // rather than centering, and grows to span the full width of the
- // comment area.
- order: 4;
- margin: 6px auto;
- width: 100%;
- }
-}
-
.discussion-form {
padding: $gl-padding-top $gl-padding $gl-padding;
background-color: $white-light;
diff --git a/app/views/projects/_md_preview.html.haml b/app/views/projects/_md_preview.html.haml
index d0698285f84..07445434cf3 100644
--- a/app/views/projects/_md_preview.html.haml
+++ b/app/views/projects/_md_preview.html.haml
@@ -9,12 +9,6 @@
%li
%a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
Preview
-
- - if defined?(@issue) && @issue.confidential?
- %li.confidential-issue-warning
- = icon('warning')
- %span This is a confidential issue. Your comment will not be visible to the public.
-
%li.pull-right
.toolbar-group
= markdown_toolbar_button({ icon: "bold fw", data: { "md-tag" => "**" }, title: "Add bold text" })
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index d909b0bfbbd..5f92d020eef 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -5,6 +5,13 @@
- can_update_issue = can?(current_user, :update_issue, @issue)
- can_report_spam = @issue.submittable_as_spam_by?(current_user)
+- if defined?(@issue) && @issue.confidential?
+ .confidential-issue-warning{ data: { spy: 'affix' } }
+ %span.confidential-issue-text
+ #{confidential_icon(@issue)} This issue is confidential.
+ %a{ href: help_page_path('user/project/issues/confidential_issues'), target: '_blank' }
+ What are confidential issues?
+
.clearfix.detail-page-header
.issuable-header
.issuable-status-box.status-box.status-box-closed{ class: issue_button_visibility(@issue, false) }
@@ -19,7 +26,6 @@
= icon('angle-double-left')
.issuable-meta
- = confidential_icon(@issue)
= issuable_meta(@issue, @project, "Issue")
.issuable-actions
diff --git a/changelogs/unreleased/fixed-confidential-issue-bar.yml b/changelogs/unreleased/fixed-confidential-issue-bar.yml
new file mode 100644
index 00000000000..6a41590d0af
--- /dev/null
+++ b/changelogs/unreleased/fixed-confidential-issue-bar.yml
@@ -0,0 +1,4 @@
+---
+title: Make confidential issues more obviously confidential
+merge_request:
+author: