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