• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / GitProjectHealth / 13900391149

17 Mar 2025 01:15PM UTC coverage: 67.843% (+0.4%) from 67.481%
13900391149

Pull #156

github

web-flow
Merge c938cc982 into 7593d9ff0
Pull Request #156: add Jira time merge Request time diffrence for project metric

397 of 839 new or added lines in 13 files covered. (47.32%)

30 existing lines in 1 file now uncovered.

12481 of 18397 relevant lines covered (67.84%)

0.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/GitLabHealth-Model-Visualization/GLHProjectContributorVisualization.class.st
1
Class {
2
        #name : #GLHProjectContributorVisualization,
3
        #superclass : #MiAbstractVisualization,
4
        #instVars : [
5
                'fakeUserColor',
6
                'userColor'
7
        ],
8
        #category : #'GitLabHealth-Model-Visualization'
9
}
10

11
{ #category : #private }
NEW
12
GLHProjectContributorVisualization >> createLegend [
×
NEW
13

×
NEW
14
        | legend |
×
NEW
15
        legend := RSLegend new.
×
NEW
16
        legend
×
NEW
17
                text: 'fake user'
×
NEW
18
                withBoxColor: self fakeUserColor .
×
NEW
19
        legend
×
NEW
20
                text: 'real user'
×
NEW
21
                withBoxColor: self userColor .
×
NEW
22
        
×
NEW
23

×
NEW
24
        legend legendDo: [ :l |
×
NEW
25
                l
×
NEW
26
                        draggable;
×
NEW
27
                        withBorder;
×
NEW
28
                        padding: 20 ].
×
NEW
29
        legend location right middle.
×
NEW
30

×
NEW
31
        ^ legend
×
NEW
32
]
×
33

34
{ #category : #'as yet unclassified' }
NEW
35
GLHProjectContributorVisualization >> createShapeForProject: aProject [
×
NEW
36
        
×
NEW
37
                | box inspect |
×
NEW
38

×
NEW
39
        box := RSBox new
×
NEW
40
                       size: 5;
×
NEW
41
                       model: aProject;
×
NEW
42
                       yourself.
×
NEW
43
        box color: Color lightBlue .
×
NEW
44

×
NEW
45
        inspect := RSInspectableInteraction new.
×
NEW
46
        inspect inspectShapeBlock: [ :user |
×
NEW
47
                user inspect.
×
NEW
48
                "block must return a Window :-("
×
NEW
49
                SystemWindow  new
×
NEW
50
        ].
×
NEW
51
        box @ inspect.
×
NEW
52

×
NEW
53
        box @ (RSPopup text: [ :user |
×
NEW
54
                String streamContents: [ :st | 
×
NEW
55
                         ] ]).
×
NEW
56

×
NEW
57
        ^ box
×
NEW
58
]
×
59

60
{ #category : #'as yet unclassified' }
NEW
61
GLHProjectContributorVisualization >> createShapeForUser: aUser [
×
NEW
62
        
×
NEW
63
                | box inspect rsGroup|
×
NEW
64
                
×
NEW
65
        box := RSBox new
×
NEW
66
                       size: 10;
×
NEW
67
                       model: aUser;
×
NEW
68
                       yourself.
×
NEW
69
        box color: (aUser id
×
NEW
70
                ifNil: [ self fakeUserColor  ]
×
NEW
71
                ifNotNil: [ self userColor.]).
×
NEW
72
                
×
NEW
73

×
NEW
74
        inspect := RSInspectableInteraction new.
×
NEW
75
        inspect inspectShapeBlock: [ :user |
×
NEW
76
                user inspect.
×
NEW
77
                "block must return a Window :-("
×
NEW
78
                SystemWindow  new
×
NEW
79
        ].
×
NEW
80
        box @ inspect.
×
NEW
81

×
NEW
82
        box @ (RSPopup text: [ :user |
×
NEW
83
                String streamContents: [ :st | 
×
NEW
84
                        st << user name"; << 'id: ' ; << (user id ifNil: ['-'])".
×
NEW
85
                         ] ]).
×
NEW
86

×
NEW
87
        rsGroup := RSGroup new add: box; yourself.
×
NEW
88
                rsGroup add: (RSLabel new text: aUser name; yourself ). 
×
NEW
89
                
×
NEW
90
        RSHorizontalLineLayout new alignMiddle  on: rsGroup.
×
NEW
91

×
NEW
92
        ^ RSComposite new
×
NEW
93
                  shapes: rsGroup;
×
NEW
94
                  model: aUser;
×
NEW
95

×
NEW
96
                  yourself
×
NEW
97
]
×
98

99
{ #category : #accessing }
NEW
100
GLHProjectContributorVisualization >> fakeUserColor [
×
NEW
101
        ^ Color lightGray
×
NEW
102
]
×
103

104
{ #category : #'as yet unclassified' }
NEW
105
GLHProjectContributorVisualization >> forProject: aGLHProject [
×
NEW
106
        
×
NEW
107
        | c shapes legend |
×
NEW
108
        c := RSCanvas new.
×
NEW
109

×
NEW
110
        shapes := ((aGLHProject toScope: GLHCommit) collect: #commitCreator) asSet reject: #isNil thenCollect: [:author | self createShapeForUser: author ].
×
NEW
111
"        shapes add: (self createShapeForProject: aGLHProject )."
×
NEW
112

×
NEW
113
        c addAll: shapes.
×
NEW
114

×
NEW
115
        c @ RSCanvasController.
×
NEW
116
        RSLineBuilder orthoHorizontal
×
NEW
117
                markerEnd: (RSMarker new
×
NEW
118
                                 offset: 2;
×
NEW
119
                                 shape: (RSShapeFactory triangle
×
NEW
120
                                                  color: Color black;
×
NEW
121
                                                  size: 5;
×
NEW
122
                                                  yourself));
×
NEW
123
                attachPoint: RSHorizontalAttachPoint new;
×
NEW
124
                canvas: c;
×
NEW
125
                shapes: c nodes;
×
NEW
126
                connectFrom: [  ].
×
NEW
127
        RSHorizontalVanDerPloegTreeLayout new on: c nodes.
×
NEW
128

×
NEW
129
        legend := self createLegend.
×
NEW
130
        legend container: c.
×
NEW
131
        legend build.
×
NEW
132

×
NEW
133
        ^ c
×
NEW
134
]
×
NEW
135

×
NEW
136
{ #category : #initialization }
×
NEW
137
GLHProjectContributorVisualization >> initialize [
×
NEW
138

×
NEW
139
        super initialize.
×
NEW
140

×
NEW
141
        fakeUserColor := Color purple lighter.
×
NEW
142
        userColor  := Color green.
×
NEW
143

×
NEW
144
]
×
NEW
145

×
NEW
146
{ #category : #accessing }
×
NEW
147
GLHProjectContributorVisualization >> userColor [
×
NEW
148
        ^ Color lightGreen 
×
NEW
149
]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc