Commit 44ba6521 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '273316-update-edit-file-buttons' into 'master'

Update edit file buttons and spacing

See merge request gitlab-org/gitlab!60318
parents c158729c 3d7d2e71
...@@ -37,10 +37,6 @@ ...@@ -37,10 +37,6 @@
.file-title { .file-title {
@include gl-font-monospace; @include gl-font-monospace;
line-height: 35px;
padding-top: 7px;
padding-bottom: 7px;
display: flex;
} }
.editor-ref { .editor-ref {
...@@ -69,19 +65,15 @@ ...@@ -69,19 +65,15 @@
} }
.file-buttons { .file-buttons {
display: flex;
flex: 1; flex: 1;
justify-content: flex-end;
} }
.soft-wrap-toggle { .soft-wrap-toggle {
display: inline-block;
vertical-align: top;
font-family: $regular-font; font-family: $regular-font;
margin: 0 $btn-side-margin; margin-left: $gl-padding-8;
.soft-wrap { .soft-wrap {
display: block; display: inline-flex;
} }
.no-wrap { .no-wrap {
...@@ -94,7 +86,7 @@ ...@@ -94,7 +86,7 @@
} }
.no-wrap { .no-wrap {
display: block; display: inline-flex;
} }
} }
} }
...@@ -111,17 +103,21 @@ ...@@ -111,17 +103,21 @@
.new-file-path { .new-file-path {
max-width: none; max-width: none;
width: 100%; width: 100%;
margin-bottom: 3px; margin-top: $gl-padding-8;
} }
.file-buttons { .file-buttons {
display: block; display: flex;
flex-direction: column;
width: 100%; width: 100%;
margin-bottom: 10px;
.md-header-toolbar {
margin: $gl-padding 0;
}
.soft-wrap-toggle { .soft-wrap-toggle {
width: 100%; width: 100%;
margin: 3px 0; margin-left: 0;
} }
@media(max-width: map-get($grid-breakpoints, md)-1) { @media(max-width: map-get($grid-breakpoints, md)-1) {
......
.form-actions .form-actions.gl-display-flex
= button_tag 'Commit changes', id: 'commit-changes', class: 'gl-button btn btn-confirm js-commit-button qa-commit-button' = button_tag 'Commit changes', id: 'commit-changes', class: 'gl-button btn btn-confirm js-commit-button qa-commit-button'
= link_to 'Cancel', cancel_path, = link_to 'Cancel', cancel_path,
class: 'gl-button btn btn-default btn-cancel', data: {confirm: leave_edit_message} class: 'gl-button btn btn-default gl-ml-3', data: {confirm: leave_edit_message}
= render 'shared/projects/edit_information' = render 'shared/projects/edit_information'
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- is_markdown = Gitlab::MarkupHelper.gitlab_markdown?(file_name) - is_markdown = Gitlab::MarkupHelper.gitlab_markdown?(file_name)
.file-holder-bottom-radius.file-holder.file.gl-mb-3 .file-holder-bottom-radius.file-holder.file.gl-mb-3
.js-file-title.file-title.align-items-center.clearfix{ data: { current_action: action } } .js-file-title.file-title.gl-display-flex.gl-align-items-center.clearfix{ data: { current_action: action } }
.editor-ref.block-truncated.has-tooltip{ title: ref } .editor-ref.block-truncated.has-tooltip{ title: ref }
= sprite_icon('fork', size: 12) = sprite_icon('fork', size: 12)
= ref = ref
...@@ -26,16 +26,18 @@ ...@@ -26,16 +26,18 @@
dismiss_key: @project.id, dismiss_key: @project.id,
human_access: human_access } } human_access: human_access } }
.file-buttons .file-buttons.gl-display-flex.gl-align-items-center.gl-justify-content-end
- if is_markdown - if is_markdown
= render 'shared/blob/markdown_buttons', show_fullscreen_button: false = render 'shared/blob/markdown_buttons', show_fullscreen_button: false
= button_tag class: 'soft-wrap-toggle btn gl-button', type: 'button', tabindex: '-1' do = button_tag class: 'soft-wrap-toggle btn gl-button btn-default', type: 'button', tabindex: '-1' do
%span.no-wrap .no-wrap
= custom_icon('icon_no_wrap') = sprite_icon('soft-unwrap', css_class: 'gl-button-icon')
No wrap %span.gl-button-text
%span.soft-wrap No wrap
= custom_icon('icon_soft_wrap') .soft-wrap
Soft wrap = sprite_icon('soft-wrap', css_class: 'gl-button-icon')
%span.gl-button-text
Soft wrap
.file-editor.code .file-editor.code
.js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }<
......
---
title: Update edit file buttons and spacing
merge_request: 60318
author:
type: changed
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