Commit 8cb10ebd authored by Florie Guibert's avatar Florie Guibert

Remove scoped label docs link - fix tests

Remove docs link and icon in scoped labels
Revert CSS changes
parent 3fcea45c
......@@ -28,7 +28,6 @@ const boardsStore = {
limitToHours: false,
},
scopedLabels: {
helpLink: '',
enabled: false,
},
filter: {
......
......@@ -9,12 +9,7 @@ export default {
GlLabel,
},
computed: {
...mapState([
'selectedLabels',
'allowScopedLabels',
'labelsFilterBasePath',
'scopedLabelsDocumentationPath',
]),
...mapState(['selectedLabels', 'allowScopedLabels', 'labelsFilterBasePath']),
},
methods: {
labelFilterUrl(label) {
......
......@@ -67,11 +67,6 @@ export default {
required: false,
default: '',
},
scopedLabelsDocumentationPath: {
type: String,
required: false,
default: '',
},
labelsListTitle: {
type: String,
required: false,
......@@ -113,7 +108,6 @@ export default {
labelsFetchPath: this.labelsFetchPath,
labelsManagePath: this.labelsManagePath,
labelsFilterBasePath: this.labelsFilterBasePath,
scopedLabelsDocumentationPath: this.scopedLabelsDocumentationPath,
labelsListTitle: this.labelsListTitle,
labelsCreateTitle: this.labelsCreateTitle,
footerCreateLabelTitle: this.footerCreateLabelTitle,
......
......@@ -11,7 +11,6 @@ export default () => ({
namespace: '',
labelsFetchPath: '',
labelsFilterBasePath: '',
scopedLabelsDocumentationPath: '#',
// UI Flags
allowLabelCreate: false,
......
......@@ -167,6 +167,10 @@
}
}
a.gl-label-icon {
color: $gray-500;
}
.gl-label .gl-label-link:hover {
text-decoration: none;
color: inherit;
......@@ -176,6 +180,11 @@
}
}
.gl-label .gl-label-icon:hover {
text-decoration: none;
color: $gray-500;
}
.btn-link {
color: inherit;
}
......@@ -817,6 +826,10 @@
}
}
}
.gl-label-icon {
color: $gray-500;
}
}
@media(max-width: map-get($grid-breakpoints, lg)-1) {
......
......@@ -460,7 +460,8 @@
// Label inside title of Delete Label Modal
.modal-header .page-title {
.scoped-label-wrapper {
.scoped-label {
.scoped-label,
.gl-label-icon {
line-height: 20px;
}
......
......@@ -68,6 +68,10 @@ $status-box-line-height: 26px;
.gl-label-link {
color: inherit;
}
.gl-label-icon {
color: $gray-500;
}
}
}
......
......@@ -688,7 +688,8 @@ $note-form-margin-left: 72px;
text-decoration: underline;
}
.gl-label-link:hover {
.gl-label-link:hover,
.gl-label-icon:hover {
text-decoration: none;
color: inherit;
......
......@@ -25,7 +25,7 @@ module EE
focus_mode_available: true,
weight_feature_available: current_board_parent.feature_available?(:issue_weights).to_s,
show_promotion: show_feature_promotion,
scoped_labels: current_board_parent.feature_available?(:scoped_labels)&.to_s,
scoped_labels: current_board_parent.feature_available?(:scoped_labels)&.to_s
}
super.merge(data)
......
......@@ -44,7 +44,7 @@ module EE
def label_dropdown_data(edit_context, opts = {})
scoped_labels_fields = {
scoped_labels: edit_context&.feature_available?(:scoped_labels)&.to_s,
scoped_labels: edit_context&.feature_available?(:scoped_labels)&.to_s
}
return super.merge(scoped_labels_fields) unless edit_context.is_a?(Group)
......
......@@ -78,7 +78,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
labels_path: group_labels_path(group, format: :json, only_group_labels: true, include_ancestor_groups: true),
toggle_subscription_path: toggle_subscription_group_epic_path(group, epic),
labels_web_url: group_labels_path(group),
epics_web_url: group_epics_path(group),
epics_web_url: group_epics_path(group)
}
paths[:todo_delete_path] = dashboard_todo_path(epic_pending_todo) if epic_pending_todo.present?
......
---
title: Remove scoped labels documentation link
merge_request: 28701
author:
type: changed
......@@ -13,14 +13,6 @@ describe LabelsHelper do
stub_licensed_features(scoped_labels: true)
end
it 'includes link to scoped labels documentation' do
expect(render_label(scoped_label)).to match(%r(<span.+>#{scoped_label.scoped_label_key}</span><span.+>#{scoped_label.scoped_label_value}</span><a.+>.*question-circle.*</a>)m)
end
it 'does not include link to scoped label documentation for common labels' do
expect(render_label(label)).to match(%r(<span.+><span.+>#{label.name}</span></span>$)m)
end
it 'right text span does not have .gl-label-text-dark class if label color is dark' do
scoped_label.color = '#D10069'
......@@ -56,7 +48,7 @@ describe LabelsHelper do
show_no: "true",
show_any: "true",
default_label: "Labels",
scoped_labels: "false",
scoped_labels: "false"
}
end
......
......@@ -13,14 +13,13 @@ describe MarkupHelper do
stub_licensed_features(scoped_labels: true)
end
it 'shows proper tooltip and documentation link' do
it 'shows proper tooltip' do
note = build(:note, note: label.to_reference, project: project)
result = first_line_in_markdown(note, :note, nil, project: project)
doc = Nokogiri::HTML.parse(result)
expect(doc.css('.gl-label-link')[0].attr('data-html')).to eq('true')
expect(doc.css('a .fa-question-circle').length).to eq(1)
end
end
end
......
......@@ -100,10 +100,6 @@ describe('LabelsSelect', () => {
expect($labelEl.find('a').attr('data-html')).toBe('true');
});
it('generated label item template has question icon', () => {
expect($labelEl.find('i.fa-question-circle')).toHaveLength(1);
});
it('generated label item template has correct label styles', () => {
expect($labelEl.find('span.gl-label-text').attr('style')).toBe(
`background-color: ${label.color}; color: ${label.text_color};`,
......
......@@ -38,7 +38,6 @@ export const mockConfig = {
labelsFetchPath: '/gitlab-org/my-project/-/labels.json',
labelsManagePath: '/gitlab-org/my-project/-/labels',
labelsFilterBasePath: '/gitlab-org/my-project/issues',
scopedLabelsDocumentationPath: '/help/user/project/labels.md#scoped-labels-premium',
};
export const mockSuggestedColors = {
......
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