Commit ad82acf5 authored by Markus Koller's avatar Markus Koller

Fix page layout for sidebar on designs view

The .layout-page div was missing the .right-sidebar-expanded class,
causing the main content to be misaligned.
parent d9117a45
......@@ -20,7 +20,6 @@ module NavHelper
def page_gutter_class
if page_has_markdown?
if cookies[:collapsed_gutter] == 'true'
%w[page-gutter right-sidebar-collapsed]
else
......
......@@ -11,7 +11,9 @@ module EE
override :page_has_markdown?
def page_has_markdown?
super || current_path?('epics#show')
super ||
current_path?('epics#show') ||
current_path?('issues#designs')
end
override :admin_monitoring_nav_links
......
---
title: Fix page layout for sidebar on designs view
merge_request: 17579
author:
type: fixed
......@@ -9,16 +9,28 @@ describe 'User views issue designs', :js do
before do
enable_design_management
create(:design, :with_file, issue: issue, filename: 'world.png')
visit project_issue_path(project, issue)
create(:design, :with_file, issue: issue)
end
click_link 'Designs'
context 'navigates from the issue view' do
before do
visit project_issue_path(project, issue)
click_link 'Designs'
wait_for_requests
end
wait_for_requests
it 'fetches list of designs' do
expect(page).to have_selector('.js-design-list-item', count: 1)
end
end
it 'fetches list of designs' do
expect(page).to have_selector('.js-design-list-item', count: 1)
context 'navigates directly to the design view' do
before do
visit designs_project_issue_path(project, issue)
end
it 'expands the sidebar' do
expect(page).to have_selector('.layout-page.right-sidebar-expanded')
end
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