Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
9a642f7a
Commit
9a642f7a
authored
Feb 13, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes alignment of changed icon in Web IDE
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/57649
parent
bd17881b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
4 deletions
+36
-4
app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
...vascripts/ide/components/commit_sidebar/editor_header.vue
+1
-1
app/assets/javascripts/vue_shared/components/changed_file_icon.vue
...s/javascripts/vue_shared/components/changed_file_icon.vue
+11
-1
changelogs/unreleased/web-ide-commit-header-icon-alignment-fix.yml
...s/unreleased/web-ide-commit-header-icon-alignment-fix.yml
+5
-0
spec/javascripts/vue_shared/components/changed_file_icon_spec.js
...vascripts/vue_shared/components/changed_file_icon_spec.js
+19
-2
No files found.
app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
View file @
9a642f7a
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
<div
class=
"d-flex ide-commit-editor-header align-items-center"
>
<div
class=
"d-flex ide-commit-editor-header align-items-center"
>
<file-icon
:file-name=
"activeFile.name"
:size=
"16"
class=
"mr-2"
/>
<file-icon
:file-name=
"activeFile.name"
:size=
"16"
class=
"mr-2"
/>
<strong
class=
"mr-2"
>
{{
activeFile
.
path
}}
</strong>
<strong
class=
"mr-2"
>
{{
activeFile
.
path
}}
</strong>
<changed-file-icon
:file=
"activeFile"
class=
"ml-0
"
/>
<changed-file-icon
:file=
"activeFile"
:is-centered=
"false
"
/>
<div
class=
"ml-auto"
>
<div
class=
"ml-auto"
>
<button
<button
v-if=
"!isStaged"
v-if=
"!isStaged"
...
...
app/assets/javascripts/vue_shared/components/changed_file_icon.vue
View file @
9a642f7a
...
@@ -37,6 +37,11 @@ export default {
...
@@ -37,6 +37,11 @@ export default {
required
:
false
,
required
:
false
,
default
:
12
,
default
:
12
,
},
},
isCentered
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
},
},
computed
:
{
computed
:
{
changedIcon
()
{
changedIcon
()
{
...
@@ -78,7 +83,12 @@ export default {
...
@@ -78,7 +83,12 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<span
v-gl-tooltip
.
right
:title=
"tooltipTitle"
class=
"file-changed-icon ml-auto"
>
<span
v-gl-tooltip
.
right
:title=
"tooltipTitle"
:class=
"
{ 'ml-auto': isCentered }"
class="file-changed-icon"
>
<icon
v-if=
"showIcon"
:name=
"changedIcon"
:size=
"size"
:css-classes=
"changedIconClass"
/>
<icon
v-if=
"showIcon"
:name=
"changedIcon"
:size=
"size"
:css-classes=
"changedIconClass"
/>
</span>
</span>
</
template
>
</
template
>
...
...
changelogs/unreleased/web-ide-commit-header-icon-alignment-fix.yml
0 → 100644
View file @
9a642f7a
---
title
:
Fixed alignment of changed icon in Web IDE
merge_request
:
author
:
type
:
fixed
spec/javascripts/vue_shared/components/changed_file_icon_spec.js
View file @
9a642f7a
...
@@ -5,27 +5,40 @@ import createComponent from 'spec/helpers/vue_mount_component_helper';
...
@@ -5,27 +5,40 @@ import createComponent from 'spec/helpers/vue_mount_component_helper';
describe
(
'
Changed file icon
'
,
()
=>
{
describe
(
'
Changed file icon
'
,
()
=>
{
let
vm
;
let
vm
;
beforeEach
(()
=>
{
function
factory
(
props
=
{})
{
const
component
=
Vue
.
extend
(
changedFileIcon
);
const
component
=
Vue
.
extend
(
changedFileIcon
);
vm
=
createComponent
(
component
,
{
vm
=
createComponent
(
component
,
{
...
props
,
file
:
{
file
:
{
tempFile
:
false
,
tempFile
:
false
,
changed
:
true
,
changed
:
true
,
},
},
});
});
}
);
}
afterEach
(()
=>
{
afterEach
(()
=>
{
vm
.
$destroy
();
vm
.
$destroy
();
});
});
it
(
'
centers icon
'
,
()
=>
{
factory
({
isCentered
:
true
,
});
expect
(
vm
.
$el
.
classList
).
toContain
(
'
ml-auto
'
);
});
describe
(
'
changedIcon
'
,
()
=>
{
describe
(
'
changedIcon
'
,
()
=>
{
it
(
'
equals file-modified when not a temp file and has changes
'
,
()
=>
{
it
(
'
equals file-modified when not a temp file and has changes
'
,
()
=>
{
factory
();
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
});
});
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
factory
();
vm
.
file
.
tempFile
=
true
;
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
...
@@ -34,10 +47,14 @@ describe('Changed file icon', () => {
...
@@ -34,10 +47,14 @@ describe('Changed file icon', () => {
describe
(
'
changedIconClass
'
,
()
=>
{
describe
(
'
changedIconClass
'
,
()
=>
{
it
(
'
includes file-modified when not a temp file
'
,
()
=>
{
it
(
'
includes file-modified when not a temp file
'
,
()
=>
{
factory
();
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-modified
'
);
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-modified
'
);
});
});
it
(
'
includes file-addition when a temp file
'
,
()
=>
{
it
(
'
includes file-addition when a temp file
'
,
()
=>
{
factory
();
vm
.
file
.
tempFile
=
true
;
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-addition
'
);
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-addition
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment