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

moosetechnology / GitProjectHealth / 11277687347

10 Oct 2024 03:58PM UTC coverage: 58.55% (+2.3%) from 56.272%
11277687347

Pull #81

github

web-flow
Merge 7276be932 into 150421ba8
Pull Request #81: Refactoring/rename

35 of 107 new or added lines in 7 files covered. (32.71%)

53 existing lines in 2 files now uncovered.

8930 of 15252 relevant lines covered (58.55%)

0.59 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 }
12
GLHProjectContributorVisualization >> createLegend [
×
13

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

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

×
31
        ^ legend
×
32
]
×
33

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

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

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

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

×
57
        ^ box
×
58
]
×
59

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

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

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

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

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

×
96
                  yourself
×
97
]
×
98

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

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

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

×
113
        c addAll: shapes.
×
114

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

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

×
133
        ^ c
×
134
]
×
135

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

×
139
        super initialize.
×
140

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

×
144
]
×
145

×
146
{ #category : #accessing }
×
147
GLHProjectContributorVisualization >> userColor [
×
148
        ^ Color lightGreen 
×
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