Commit f84fd813 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'fix-mr-source-branch-styling' into 'master'

Fix MR Source Branch styling

See merge request gitlab-org/gitlab!57662
parents e21bf6a2 86ab4387
......@@ -120,7 +120,7 @@ export default class ShortcutsIssuable extends Shortcuts {
static copyBranchName() {
// There are two buttons - one that is shown when the sidebar
// is expanded, and one that is shown when it's collapsed.
const allCopyBtns = Array.from(document.querySelectorAll('.sidebar-source-branch button'));
const allCopyBtns = Array.from(document.querySelectorAll('.js-sidebar-source-branch button'));
// Select whichever button is currently visible so that
// the "Copied" tooltip is shown when a click is simulated.
......
......@@ -225,8 +225,7 @@
}
}
.cross-project-reference,
.sidebar-mr-source-branch {
.cross-project-reference {
color: inherit;
span {
......
......@@ -133,12 +133,12 @@
.block.with-sub-blocks
#js-reference-entry-point
- if issuable_type == 'merge_request'
.sidebar-source-branch.sub-block
.sub-block.js-sidebar-source-branch
.sidebar-collapsed-icon.dont-change-state
= clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport')
.sidebar-mr-source-branch.hide-collapsed
%span
= _('Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}').html_safe % { source_branch_open: "<cite class='ref-name' title='#{source_branch}'>".html_safe, source_branch_close: "</cite>".html_safe, source_branch: source_branch }
.gl-display-flex.gl-align-items-center.gl-justify-content-space-between.gl-mb-2.hide-collapsed
%span.gl-overflow-hidden.gl-text-overflow-ellipsis.gl-white-space-nowrap
= _('Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}').html_safe % { source_branch_open: "<span class='gl-font-monospace' title='#{source_branch}'>".html_safe, source_branch_close: "</span>".html_safe, source_branch: source_branch }
= clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport')
- if show_forwarding_email
......
---
title: Fix MR Source Branch styling
merge_request: 57662
author:
type: fixed
......@@ -329,7 +329,7 @@ describe('ShortcutsIssuable', () => {
window.shortcut = new ShortcutsIssuable();
[sidebarCollapsedBtn, sidebarExpandedBtn] = document.querySelectorAll(
'.sidebar-source-branch button',
'.js-sidebar-source-branch button',
);
[sidebarCollapsedBtn, sidebarExpandedBtn].forEach((btn) => jest.spyOn(btn, 'click'));
......
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