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
>
/* 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
ProjectAvatar
from
'
~/vue_shared/components/project_avatar/default.vue
'
;
import
highlight
from
'
~/lib/utils/highlight
'
;
...
...
@@ -8,7 +8,7 @@ import { truncateNamespace } from '~/lib/utils/text_utility';
export
default
{
name
:
'
ProjectListItem
'
,
components
:
{
GlIcon
,
ProjectAvatar
,
Gl
Deprecated
Button
},
components
:
{
GlIcon
,
ProjectAvatar
,
GlButton
},
props
:
{
project
:
{
type
:
Object
,
...
...
@@ -40,17 +40,16 @@ export default {
};
</
script
>
<
template
>
<gl-deprecated-button
class=
"d-flex align-items-center btn pt-1 pb-1 border-0 project-list-item"
<gl-button
category=
"tertiary"
class=
"gl-display-flex gl-align-items-center gl-justify-content-start! gl-mb-2 gl-w-full"
@
click=
"onClick"
>
<gl-icon
class=
"gl-ml-3 gl-mr-3 flex-shrink-0 position-top-0 js-selected-icon"
:class=
"
{ 'js-selected visible': selected, 'js-unselected invisible': !selected }"
name="mobile-issue-close"
/>
<project-avatar
class=
"flex-shrink-0 js-project-avatar"
:project=
"project"
:size=
"32"
/>
<div
class=
"d-flex flex-wrap project-namespace-name-container"
>
<div
class=
"gl-display-flex gl-align-items-center gl-flex-wrap project-namespace-name-container"
>
<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"
/>
<div
v-if=
"truncatedNamespace"
:title=
"projectNameWithNamespace"
...
...
@@ -65,5 +64,5 @@ export default {
v-html=
"highlightedProjectName"
></div>
</div>
</gl-
deprecated-
button>
</gl-button>
</
template
>
app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
View file @
d1c4a795
...
...
@@ -100,7 +100,7 @@ export default {
@
bottomReached=
"bottomReached"
>
<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
v-for=
"project in projectSearchResults"
: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`] = `
</gl-tab-stub>
</gl-tabs-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', () => {
it
(
'
does not render a check mark icon if selected === false
'
,
()
=>
{
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
'
,
()
=>
{
...
...
@@ -37,7 +37,7 @@ describe('ProjectListItem component', () => {
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`
,
()
=>
{
...
...
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