File tree Expand file tree Collapse file tree 3 files changed +54
-7
lines changed Expand file tree Collapse file tree 3 files changed +54
-7
lines changed Original file line number Diff line number Diff line change 1
- <ul local-class =' owners ' data-test-owners>
1
+ <ul local-class =" list {{ if this.showDetailedList " detailed " }} " data-test-owners>
2
2
{{ #each @owners as |owner |}}
3
3
<li >
4
- <LinkTo @route ={{ owner.kind }} @model ={{ owner.login }} data-test-owner-link ={{ owner.login }} >
5
- <UserAvatar @user ={{ owner }} @size =" medium-small" />
4
+ <LinkTo
5
+ @route ={{ owner.kind }}
6
+ @model ={{ owner.login }}
7
+ local-class =" link"
8
+ data-test-owner-link ={{ owner.login }}
9
+ >
10
+ <UserAvatar @user ={{ owner }} @size =" medium-small" local-class =" avatar" />
11
+ <span local-class =" name" >{{ or owner.display_name owner.name }} </span >
6
12
</LinkTo >
7
13
</li >
8
14
{{ /each }}
Original file line number Diff line number Diff line change
1
+ import Component from '@glimmer/component' ;
2
+
3
+ export default class VersionRow extends Component {
4
+ get showDetailedList ( ) {
5
+ return this . args . owners . length <= 5 ;
6
+ }
7
+ }
Original file line number Diff line number Diff line change 1
- .owners {
1
+ .list .detailed {
2
+ list-style : none;
3
+ padding : 0 ;
4
+ margin : 0 ;
5
+
6
+ > * + * {
7
+ margin-top : 5px ;
8
+ }
9
+
10
+ .link {
11
+ display : grid;
12
+ grid-template-columns : auto 1fr ;
13
+ align-items : center;
14
+ }
15
+
16
+ .avatar {
17
+ margin-right : 10px ;
18
+ }
19
+
20
+ .name {
21
+ overflow : hidden;
22
+ text-overflow : ellipsis;
23
+ white-space : nowrap;
24
+ }
25
+ }
26
+
27
+ .list : not (.detailed ) {
2
28
display : flex;
3
29
flex-wrap : wrap;
4
30
list-style : none;
5
31
padding : 0 ;
6
- margin : 0 ;
32
+ margin : 0 0 -10 px ;
7
33
8
- li {
9
- margin : 0 7 px 7 px 0 ;
34
+ > * {
35
+ margin : 0 10 px 10 px 0 ;
10
36
}
37
+
38
+ .name {
39
+ display : none;
40
+ }
41
+ }
42
+
43
+ .avatar {
44
+ border-radius : 4px ;
11
45
}
You can’t perform that action at this time.
0 commit comments