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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
80f04194
Commit
80f04194
authored
Oct 30, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unreferenced list_collapsed component
`git grep -E import.*list_collapsed` shows this isn't being used.
parent
90657593
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
188 deletions
+0
-188
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
...ascripts/ide/components/commit_sidebar/list_collapsed.vue
+0
-103
locale/gitlab.pot
locale/gitlab.pot
+0
-10
spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js
...tend/ide/components/commit_sidebar/list_collapsed_spec.js
+0
-75
No files found.
app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue
deleted
100644 → 0
View file @
90657593
<
script
>
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
{
sprintf
,
n__
,
__
}
from
'
~/locale
'
;
export
default
{
components
:
{
GlIcon
,
},
directives
:
{
tooltip
,
},
props
:
{
files
:
{
type
:
Array
,
required
:
true
,
},
iconName
:
{
type
:
String
,
required
:
true
,
},
title
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
addedFilesLength
()
{
return
this
.
files
.
filter
(
f
=>
f
.
tempFile
).
length
;
},
modifiedFilesLength
()
{
return
this
.
files
.
filter
(
f
=>
!
f
.
tempFile
).
length
;
},
addedFilesIconClass
()
{
return
this
.
addedFilesLength
?
'
multi-file-addition
'
:
''
;
},
modifiedFilesClass
()
{
return
this
.
modifiedFilesLength
?
'
multi-file-modified
'
:
''
;
},
additionsTooltip
()
{
return
sprintf
(
n__
(
'
1 %{type} addition
'
,
'
%{count} %{type} additions
'
,
this
.
addedFilesLength
),
{
type
:
this
.
title
.
toLowerCase
(),
count
:
this
.
addedFilesLength
,
},
);
},
modifiedTooltip
()
{
return
sprintf
(
n__
(
'
1 %{type} modification
'
,
'
%{count} %{type} modifications
'
,
this
.
modifiedFilesLength
),
{
type
:
this
.
title
.
toLowerCase
(),
count
:
this
.
modifiedFilesLength
,
},
);
},
titleTooltip
()
{
return
sprintf
(
__
(
'
%{title} changes
'
),
{
title
:
this
.
title
});
},
additionIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-addition-solid
'
:
'
file-addition
'
;
},
modifiedIconName
()
{
return
this
.
title
.
toLowerCase
()
===
'
staged
'
?
'
file-modified-solid
'
:
'
file-modified
'
;
},
},
};
</
script
>
<
template
>
<div
class=
"multi-file-commit-list-collapsed text-center"
>
<div
v-tooltip
:title=
"titleTooltip"
data-container=
"body"
data-placement=
"left"
class=
"gl-mb-5"
>
<gl-icon
v-once
:name=
"iconName"
:size=
"18"
/>
</div>
<div
v-tooltip
:title=
"additionsTooltip"
data-container=
"body"
data-placement=
"left"
class=
"gl-mb-3"
>
<gl-icon
:name=
"additionIconName"
:size=
"18"
:class=
"addedFilesIconClass"
/>
</div>
{{
addedFilesLength
}}
<div
v-tooltip
:title=
"modifiedTooltip"
data-container=
"body"
data-placement=
"left"
class=
"gl-mt-3 gl-mb-3"
>
<gl-icon
:name=
"modifiedIconName"
:size=
"18"
:class=
"modifiedFilesClass"
/>
</div>
{{
modifiedFilesLength
}}
</div>
</
template
>
locale/gitlab.pot
View file @
80f04194
...
...
@@ -1062,16 +1062,6 @@ msgstr ""
msgid "0t1DgySidms"
msgstr ""
msgid "1 %{type} addition"
msgid_plural "%{count} %{type} additions"
msgstr[0] ""
msgstr[1] ""
msgid "1 %{type} modification"
msgid_plural "%{count} %{type} modifications"
msgstr[0] ""
msgstr[1] ""
msgid "1 Day"
msgid_plural "%d Days"
msgstr[0] ""
...
...
spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js
deleted
100644 → 0
View file @
90657593
import
Vue
from
'
vue
'
;
import
{
createComponentWithStore
}
from
'
helpers/vue_mount_component_helper
'
;
import
{
createStore
}
from
'
~/ide/stores
'
;
import
listCollapsed
from
'
~/ide/components/commit_sidebar/list_collapsed.vue
'
;
import
{
file
}
from
'
../../helpers
'
;
import
{
removeWhitespace
}
from
'
../../../helpers/text_helper
'
;
describe
(
'
Multi-file editor commit sidebar list collapsed
'
,
()
=>
{
let
vm
;
let
store
;
beforeEach
(()
=>
{
store
=
createStore
();
const
Component
=
Vue
.
extend
(
listCollapsed
);
vm
=
createComponentWithStore
(
Component
,
store
,
{
files
:
[
{
...
file
(
'
file1
'
),
tempFile
:
true
,
},
file
(
'
file2
'
),
],
iconName
:
'
staged
'
,
title
:
'
Staged
'
,
});
vm
.
$mount
();
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
it
(
'
renders added & modified files count
'
,
()
=>
{
expect
(
removeWhitespace
(
vm
.
$el
.
textContent
).
trim
()).
toBe
(
'
1 1
'
);
});
describe
(
'
addedFilesLength
'
,
()
=>
{
it
(
'
returns an length of temp files
'
,
()
=>
{
expect
(
vm
.
addedFilesLength
).
toBe
(
1
);
});
});
describe
(
'
modifiedFilesLength
'
,
()
=>
{
it
(
'
returns an length of modified files
'
,
()
=>
{
expect
(
vm
.
modifiedFilesLength
).
toBe
(
1
);
});
});
describe
(
'
addedFilesIconClass
'
,
()
=>
{
it
(
'
includes multi-file-addition when addedFiles is not empty
'
,
()
=>
{
expect
(
vm
.
addedFilesIconClass
).
toContain
(
'
multi-file-addition
'
);
});
it
(
'
excludes multi-file-addition when addedFiles is empty
'
,
()
=>
{
vm
.
files
=
[];
expect
(
vm
.
addedFilesIconClass
).
not
.
toContain
(
'
multi-file-addition
'
);
});
});
describe
(
'
modifiedFilesClass
'
,
()
=>
{
it
(
'
includes multi-file-modified when addedFiles is not empty
'
,
()
=>
{
expect
(
vm
.
modifiedFilesClass
).
toContain
(
'
multi-file-modified
'
);
});
it
(
'
excludes multi-file-modified when addedFiles is empty
'
,
()
=>
{
vm
.
files
=
[];
expect
(
vm
.
modifiedFilesClass
).
not
.
toContain
(
'
multi-file-modified
'
);
});
});
});
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