Commit dfaf51da authored by David O'Regan's avatar David O'Regan

Merge branch 'yo-gl-button-project-page' into 'master'

Add gl-button to nav buttons in the project page

See merge request gitlab-org/gitlab!51427
parents c5c14282 f5351af4
...@@ -437,19 +437,6 @@ ...@@ -437,19 +437,6 @@
} }
} }
.btn-missing {
color: $gl-text-color-secondary;
border: 1px dashed $border-gray-normal-dashed;
border-radius: $border-radius-default;
&:hover,
&:active,
&:focus {
color: $gl-text-color-secondary;
background-color: $white-normal;
}
}
// The .btn-svg class is available for legacy icon buttons to // The .btn-svg class is available for legacy icon buttons to
// preserve a 34px height and have 16x16 icons at the same time. // preserve a 34px height and have 16x16 icons at the same time.
// Once a button is migrated (to the current 32px height) // Once a button is migrated (to the current 32px height)
......
...@@ -571,10 +571,6 @@ ...@@ -571,10 +571,6 @@
top: 0; top: 0;
} }
} }
.btn-missing {
@extend .btn-missing;
}
} }
} }
......
...@@ -11,14 +11,14 @@ module StatAnchorsHelper ...@@ -11,14 +11,14 @@ module StatAnchorsHelper
private private
def button_attribute(anchor) def button_attribute(anchor)
"btn-#{anchor.class_modifier || 'missing'}" "btn-#{anchor.class_modifier || 'dashed'}"
end end
def extra_classes(anchor) def extra_classes(anchor)
if anchor.is_link if anchor.is_link
'stat-link' 'stat-link'
else else
"btn #{button_attribute(anchor)}" "gl-button btn #{button_attribute(anchor)}"
end end
end end
end end
...@@ -17,7 +17,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -17,7 +17,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
MAX_TOPICS_TO_SHOW = 3 MAX_TOPICS_TO_SHOW = 3
def statistic_icon(icon_name = 'plus-square-o') def statistic_icon(icon_name = 'plus-square-o')
sprite_icon(icon_name, css_class: 'icon gl-mr-2') sprite_icon(icon_name, css_class: 'icon gl-mr-2 gl-text-gray-500')
end end
def statistics_anchors(show_auto_devops_callout:) def statistics_anchors(show_auto_devops_callout:)
...@@ -239,7 +239,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -239,7 +239,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
AnchorData.new(false, AnchorData.new(false,
statistic_icon + _('New file'), statistic_icon + _('New file'),
new_file_path, new_file_path,
'missing') 'dashed')
end end
end end
......
---
title: Add gl-button to nav buttons in the project page
merge_request: 51427
author: Yogi (@yo)
type: other
...@@ -21,7 +21,7 @@ RSpec.describe StatAnchorsHelper do ...@@ -21,7 +21,7 @@ RSpec.describe StatAnchorsHelper do
let(:anchor) { anchor_klass.new(false, nil, nil, 'default') } let(:anchor) { anchor_klass.new(false, nil, nil, 'default') }
it 'returns the proper attributes' do it 'returns the proper attributes' do
expect(subject[:class]).to include('btn btn-default') expect(subject[:class]).to include('gl-button btn btn-default')
end end
end end
...@@ -29,7 +29,7 @@ RSpec.describe StatAnchorsHelper do ...@@ -29,7 +29,7 @@ RSpec.describe StatAnchorsHelper do
let(:anchor) { anchor_klass.new(false) } let(:anchor) { anchor_klass.new(false) }
it 'returns the proper attributes' do it 'returns the proper attributes' do
expect(subject[:class]).to include('btn btn-missing') expect(subject[:class]).to include('gl-button btn btn-dashed')
end end
end end
end end
......
...@@ -350,7 +350,7 @@ RSpec.describe ProjectPresenter do ...@@ -350,7 +350,7 @@ RSpec.describe ProjectPresenter do
is_link: false, is_link: false,
label: a_string_including("New file"), label: a_string_including("New file"),
link: presenter.project_new_blob_path(project, 'master'), link: presenter.project_new_blob_path(project, 'master'),
class_modifier: 'missing' class_modifier: 'dashed'
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment