Skip to content
代码片段 群组 项目
未验证 提交 ad82acf5 编辑于 作者: 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.
上级 d9117a45
No related branches found
No related tags found
无相关合并请求
...@@ -20,7 +20,6 @@ def page_with_sidebar_class ...@@ -20,7 +20,6 @@ def page_with_sidebar_class
def page_gutter_class def page_gutter_class
if page_has_markdown? if page_has_markdown?
if cookies[:collapsed_gutter] == 'true' if cookies[:collapsed_gutter] == 'true'
%w[page-gutter right-sidebar-collapsed] %w[page-gutter right-sidebar-collapsed]
else else
......
...@@ -11,7 +11,9 @@ def show_separator? ...@@ -11,7 +11,9 @@ def show_separator?
override :page_has_markdown? override :page_has_markdown?
def page_has_markdown? def page_has_markdown?
super || current_path?('epics#show') super ||
current_path?('epics#show') ||
current_path?('issues#designs')
end end
override :admin_monitoring_nav_links override :admin_monitoring_nav_links
......
---
title: Fix page layout for sidebar on designs view
merge_request: 17579
author:
type: fixed
...@@ -9,16 +9,28 @@ ...@@ -9,16 +9,28 @@
before do before do
enable_design_management enable_design_management
create(:design, :with_file, issue: issue, filename: 'world.png') create(:design, :with_file, issue: issue)
end
visit project_issue_path(project, issue)
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 end
it 'fetches list of designs' do context 'navigates directly to the design view' do
expect(page).to have_selector('.js-design-list-item', count: 1) 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
end end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册