BigW Consortium Gitlab

Commit f5534059 by Clement Ho

Merge branch '28377-add-edit-button-to-mobile-file-view' into 'master'

Add edit button to mobile file view Closes #28377 See merge request gitlab-org/gitlab-ce!15199
parents 6ebf6661 1760e377
......@@ -364,6 +364,18 @@ span.idiff {
float: none;
}
}
@media (max-width: $screen-xs-max) {
display: block;
.file-actions {
white-space: normal;
.btn-group {
padding-top: 5px;
}
}
}
}
.is-stl-loading {
......
......@@ -2,7 +2,7 @@
.js-file-title.file-title-flex-parent
= render 'projects/blob/header_content', blob: blob
.file-actions.hidden-xs
.file-actions
= render 'projects/blob/viewer_switcher', blob: blob unless blame
.btn-group{ role: "group" }<
......
---
title: Add edit button to mobile file view
merge_request: 15199
author: Travis Miller
type: added
require 'spec_helper'
feature 'File blob', :js do
include MobileHelpers
let(:project) { create(:project, :public, :repository) }
def visit_blob(path, anchor: nil, ref: 'master')
......@@ -30,6 +32,16 @@ feature 'File blob', :js do
expect(page).to have_link('Open raw')
end
end
it 'displays file actions on all screen sizes' do
file_actions_selector = '.file-actions'
resize_screen_sm
expect(page).to have_selector(file_actions_selector, visible: true)
resize_screen_xs
expect(page).to have_selector(file_actions_selector, visible: true)
end
end
context 'Markdown file' do
......
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