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
d1c4a795
Commit
d1c4a795
authored
Sep 08, 2020
by
Marcin Sedlak-Jakubowski
Committed by
Phil Hughes
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated button in project_selector/project_list_item.vue
parent
77836aae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue
..._shared/components/project_selector/project_list_item.vue
+11
-12
app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
...e_shared/components/project_selector/project_selector.vue
+1
-1
spec/frontend/add_context_commits_modal/components/__snapshots__/add_context_commits_modal_spec.js.snap
...ents/__snapshots__/add_context_commits_modal_spec.js.snap
+1
-1
spec/frontend/vue_shared/components/project_selector/project_list_item_spec.js
...red/components/project_selector/project_list_item_spec.js
+2
-2
No files found.
app/assets/javascripts/vue_shared/components/project_selector/project_list_item.vue
View file @
d1c4a795
<
script
>
<
script
>
/* eslint-disable vue/no-v-html */
/* eslint-disable vue/no-v-html */
import
{
Gl
Deprecated
Button
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
isString
}
from
'
lodash
'
;
import
{
isString
}
from
'
lodash
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
import
highlight
from
'
~/lib/utils/highlight
'
;
import
highlight
from
'
~/lib/utils/highlight
'
;
...
@@ -8,7 +8,7 @@ import { truncateNamespace } from '~/lib/utils/text_utility';
...
@@ -8,7 +8,7 @@ import { truncateNamespace } from '~/lib/utils/text_utility';
export
default
{
export
default
{
name
:
'
ProjectListItem
'
,
name
:
'
ProjectListItem
'
,
components
:
{
GlIcon
,
ProjectAvatar
,
Gl
Deprecated
Button
},
components
:
{
GlIcon
,
ProjectAvatar
,
GlButton
},
props
:
{
props
:
{
project
:
{
project
:
{
type
:
Object
,
type
:
Object
,
...
@@ -40,17 +40,16 @@ export default {
...
@@ -40,17 +40,16 @@ export default {
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<gl-deprecated-button
<gl-button
class=
"d-flex align-items-center btn pt-1 pb-1 border-0 project-list-item"
category=
"tertiary"
class=
"gl-display-flex gl-align-items-center gl-justify-content-start! gl-mb-2 gl-w-full"
@
click=
"onClick"
@
click=
"onClick"
>
>
<gl-icon
<div
class=
"gl-ml-3 gl-mr-3 flex-shrink-0 position-top-0 js-selected-icon"
class=
"gl-display-flex gl-align-items-center gl-flex-wrap project-namespace-name-container"
:class=
"
{ 'js-selected visible': selected, 'js-unselected invisible': !selected }"
>
name="mobile-issue-close"
<gl-icon
v-if=
"selected"
class=
"js-selected-icon"
name=
"mobile-issue-close"
/>
/>
<project-avatar
class=
"gl-flex-shrink-0 js-project-avatar"
:project=
"project"
:size=
"32"
/>
<project-avatar
class=
"flex-shrink-0 js-project-avatar"
:project=
"project"
:size=
"32"
/>
<div
class=
"d-flex flex-wrap project-namespace-name-container"
>
<div
<div
v-if=
"truncatedNamespace"
v-if=
"truncatedNamespace"
:title=
"projectNameWithNamespace"
:title=
"projectNameWithNamespace"
...
@@ -65,5 +64,5 @@ export default {
...
@@ -65,5 +64,5 @@ export default {
v-html=
"highlightedProjectName"
v-html=
"highlightedProjectName"
></div>
></div>
</div>
</div>
</gl-
deprecated-
button>
</gl-button>
</
template
>
</
template
>
app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
View file @
d1c4a795
...
@@ -100,7 +100,7 @@ export default {
...
@@ -100,7 +100,7 @@ export default {
@
bottomReached=
"bottomReached"
@
bottomReached=
"bottomReached"
>
>
<template
v-if=
"!showLoadingIndicator"
#items
>
<template
v-if=
"!showLoadingIndicator"
#items
>
<div
class=
"
d-flex flex-column
"
>
<div
class=
"
gl-display-flex gl-flex-direction-column gl-p-3
"
>
<project-list-item
<project-list-item
v-for=
"project in projectSearchResults"
v-for=
"project in projectSearchResults"
:key=
"project.id"
:key=
"project.id"
...
...
spec/frontend/add_context_commits_modal/components/__snapshots__/add_context_commits_modal_spec.js.snap
View file @
d1c4a795
...
@@ -47,4 +47,4 @@ exports[`AddContextCommitsModal renders modal with 2 tabs 1`] = `
...
@@ -47,4 +47,4 @@ exports[`AddContextCommitsModal renders modal with 2 tabs 1`] = `
</gl-tab-stub>
</gl-tab-stub>
</gl-tabs-stub>
</gl-tabs-stub>
</gl-modal-stub>
</gl-modal-stub>
`;
`;
\ No newline at end of file
spec/frontend/vue_shared/components/project_selector/project_list_item_spec.js
View file @
d1c4a795
...
@@ -29,7 +29,7 @@ describe('ProjectListItem component', () => {
...
@@ -29,7 +29,7 @@ describe('ProjectListItem component', () => {
it
(
'
does not render a check mark icon if selected === false
'
,
()
=>
{
it
(
'
does not render a check mark icon if selected === false
'
,
()
=>
{
wrapper
=
shallowMount
(
Component
,
options
);
wrapper
=
shallowMount
(
Component
,
options
);
expect
(
wrapper
.
find
(
'
.js-selected-icon
.js-unselected
'
).
exists
()).
toBe
(
tru
e
);
expect
(
wrapper
.
find
(
'
.js-selected-icon
'
).
exists
()).
toBe
(
fals
e
);
});
});
it
(
'
renders a check mark icon if selected === true
'
,
()
=>
{
it
(
'
renders a check mark icon if selected === true
'
,
()
=>
{
...
@@ -37,7 +37,7 @@ describe('ProjectListItem component', () => {
...
@@ -37,7 +37,7 @@ describe('ProjectListItem component', () => {
wrapper
=
shallowMount
(
Component
,
options
);
wrapper
=
shallowMount
(
Component
,
options
);
expect
(
wrapper
.
find
(
'
.js-selected-icon
.js-selected
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.js-selected-icon
'
).
exists
()).
toBe
(
true
);
});
});
it
(
`emits a "clicked" event when clicked`
,
()
=>
{
it
(
`emits a "clicked" event when clicked`
,
()
=>
{
...
...
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