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
58f73094
Commit
58f73094
authored
Apr 14, 2022
by
Sam Beckham
Committed by
Kushal Pandya
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turns the view more participants button into a gl-button
parent
437ae2c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
app/assets/javascripts/sidebar/components/participants/participants.vue
...ascripts/sidebar/components/participants/participants.vue
+10
-5
spec/frontend/sidebar/participants_spec.js
spec/frontend/sidebar/participants_spec.js
+2
-3
No files found.
app/assets/javascripts/sidebar/components/participants/participants.vue
View file @
58f73094
<
script
>
<
script
>
import
{
GlIcon
,
GlLoadingIcon
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
,
Gl
Icon
,
GlLoadingIcon
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
__
,
n__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
n__
,
sprintf
}
from
'
~/locale
'
;
import
userAvatarImage
from
'
~/vue_shared/components/user_avatar/user_avatar_image.vue
'
;
import
userAvatarImage
from
'
~/vue_shared/components/user_avatar/user_avatar_image.vue
'
;
...
@@ -8,9 +8,10 @@ export default {
...
@@ -8,9 +8,10 @@ export default {
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
},
},
components
:
{
components
:
{
userAvatarImage
,
GlButton
,
GlIcon
,
GlIcon
,
GlLoadingIcon
,
GlLoadingIcon
,
userAvatarImage
,
},
},
props
:
{
props
:
{
loading
:
{
loading
:
{
...
@@ -124,9 +125,13 @@ export default {
...
@@ -124,9 +125,13 @@ export default {
</div>
</div>
</div>
</div>
<div
v-if=
"hasMoreParticipants"
class=
"participants-more hide-collapsed"
>
<div
v-if=
"hasMoreParticipants"
class=
"participants-more hide-collapsed"
>
<button
type=
"button"
class=
"btn-transparent btn-link"
@
click=
"toggleMoreParticipants"
>
<gl-button
{{
toggleLabel
}}
variant=
"link"
</button>
button-text-classes=
"gl-text-secondary"
data-testid=
"more-participants"
@
click=
"toggleMoreParticipants"
>
{{
toggleLabel
}}
</gl-button
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
spec/frontend/sidebar/participants_spec.js
View file @
58f73094
...
@@ -17,8 +17,7 @@ const PARTICIPANT_LIST = [PARTICIPANT, { ...PARTICIPANT, id: 2 }, { ...PARTICIPA
...
@@ -17,8 +17,7 @@ const PARTICIPANT_LIST = [PARTICIPANT, { ...PARTICIPANT, id: 2 }, { ...PARTICIPA
describe
(
'
Participants
'
,
()
=>
{
describe
(
'
Participants
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
getMoreParticipantsButton
=
()
=>
wrapper
.
find
(
'
button
'
);
const
getMoreParticipantsButton
=
()
=>
wrapper
.
find
(
'
[data-testid="more-participants"]
'
);
const
getCollapsedParticipantsCount
=
()
=>
wrapper
.
find
(
'
[data-testid="collapsed-count"]
'
);
const
getCollapsedParticipantsCount
=
()
=>
wrapper
.
find
(
'
[data-testid="collapsed-count"]
'
);
const
mountComponent
=
(
propsData
)
=>
const
mountComponent
=
(
propsData
)
=>
...
@@ -167,7 +166,7 @@ describe('Participants', () => {
...
@@ -167,7 +166,7 @@ describe('Participants', () => {
expect
(
wrapper
.
vm
.
isShowingMoreParticipants
).
toBe
(
false
);
expect
(
wrapper
.
vm
.
isShowingMoreParticipants
).
toBe
(
false
);
getMoreParticipantsButton
().
trigger
(
'
click
'
);
getMoreParticipantsButton
().
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
vm
.
isShowingMoreParticipants
).
toBe
(
true
);
expect
(
wrapper
.
vm
.
isShowingMoreParticipants
).
toBe
(
true
);
});
});
...
...
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