Skip to content

Commit 5bf63cf

Browse files
authored
Merge pull request #39 from documize/section-rework
Section rework, making Trello and Github sections simpler, with a cleaner design
2 parents eb902d8 + ec8e0d7 commit 5bf63cf

File tree

20 files changed

+318
-293
lines changed

20 files changed

+318
-293
lines changed

app/app/components/section/github/type-editor.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
4141
branchLines: "100",
4242
userId: "",
4343
pageId: page.get('id'),
44+
showMilestones: false,
45+
showIssues: false,
46+
showCommits: false,
4447
};
4548

4649
try {
@@ -50,6 +53,9 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
5053
config.branchSince = metaConfig.branchSince;
5154
config.userId = metaConfig.userId;
5255
config.pageId = metaConfig.pageId;
56+
config.showMilestones = metaConfig.showMilestones;
57+
config.showIssues = metaConfig.showIssues;
58+
config.showCommits = metaConfig.showCommits;
5359
} catch (e) {}
5460

5561
self.set('config', config);
@@ -168,12 +174,16 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
168174
return this.get('isDirty');
169175
},
170176

171-
onListCheckbox(id) {
177+
onListCheckbox(id) { // select one repository only
172178
let lists = this.get('config.lists');
173179
let list = lists.findBy('id', id);
174180

181+
lists.forEach(function (entry) {
182+
Ember.set(entry, 'included', false);
183+
});
184+
175185
if (list !== null) {
176-
Ember.set(list, 'included', !list.included);
186+
Ember.set(list, 'included', true);
177187
}
178188
},
179189

app/app/styles/base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ html {
3535
background-color: $color-white;
3636
font-size: 14px;
3737
height: 100%;
38+
-webkit-font-smoothing: antialiased;
39+
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
3840
}
3941

4042
body {
@@ -46,6 +48,8 @@ a {
4648
color: $color-link;
4749
text-decoration: none;
4850
cursor: pointer;
51+
-webkit-font-smoothing: antialiased;
52+
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
4953

5054
a:hover, a:focus {
5155
text-decoration: underline;

app/app/styles/color.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ $color-gray: #8b9096;
2121
$color-goldy: #cc9933;
2222

2323
$color-header: #f3f5f8;
24-
$color-link: #4caf50;
24+
$color-link: #0092d3;
2525
$color-border: #e1e1e1;
2626

27-
$color-input: #a1a1a1;
27+
$color-input: #5a5a5a;
2828
$color-stroke: #e1e1e1;
2929

3030
$color-tooltip: #a1a1a1;

app/app/styles/section/github.scss

Lines changed: 55 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
.section-github-editor {
2+
.github-view label {
3+
margin: 0 10px;
4+
}
5+
26
.github-repo {
37
width: 100%;
48
padding: 10px;
@@ -40,8 +44,13 @@
4044
}
4145

4246
.section-github-render {
47+
48+
a:hover {
49+
text-decoration: underline;
50+
}
51+
4352
.github-table {
44-
margin: 0 !important;
53+
margin: 10px 0 !important;
4554
border: none !important;
4655
line-height: 30px;
4756

@@ -56,63 +65,65 @@
5665
margin: 30px 0 0 0;
5766
}
5867

59-
.issue-label {
60-
font-size: 11px;
61-
color: $color-white;
62-
padding: 0px 8px;
63-
margin-right: 5px;
64-
border-radius: 2px;
65-
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
66-
display: inline-block;
67-
line-height: 22px;
68-
}
69-
70-
progress[value] {
71-
background-color: $color-off-white;
72-
border-radius: 3px;
73-
height: 15px;
74-
width: 150px;
75-
}
68+
.github-table thead tr th {
69+
padding: 15px 0;
70+
border-bottom: 1px solid #e1e1e1;
71+
text-transform: uppercase;
72+
font-size: 14px;
73+
text-align: left;
7674

77-
.progress-meta {
78-
color: $color-gray;
79-
font-size: 1rem;
80-
font-family: "arial";
81-
}
75+
span {
76+
color:#838d94;
77+
}
8278

83-
.contributor-name {
84-
line-height: 15px;
8579
}
8680

87-
.milestone-name, .issue-name, .contributor-name {
88-
font-size: 1.2rem;
81+
.github-table tbody tr td {
82+
border: none!important;
83+
padding: 5px 20px 5px 20px !important;
8984
}
9085

91-
.milestone-symbol {
92-
padding-top: 3px;
86+
.github-table .right-column {
87+
text-align: right;
88+
color:#838d94;
9389
}
9490

95-
.issue-symbol {
96-
padding-top: 3px;
91+
span.data {
92+
color:#838d94;
9793
}
9894

99-
.contributor-meta {
100-
line-height: 30px;
95+
.issue-label {
96+
color:white;
97+
font-size: 11px;
98+
padding: 4px 6px;
99+
border-radius: 4px;
100+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
101+
margin-left: 10px;
102+
}
103+
104+
.progress-bar {
105+
display: inline-block; border-radius: 3px;
106+
width: 40%;
107+
background-color: #f1f1f1;
108+
height: 8px;
109+
margin-left: 10px;
110+
111+
.progress {
112+
height: 8px;
113+
border-radius: 4px;
114+
background-color: #4caf50;
115+
}
101116
}
102117

103-
.milestone-meta, .issue-meta, .contributor-meta {
104-
color: $color-gray;
105-
font-size: 1rem;
118+
span.issue-state {
119+
float: left;
120+
margin-right: 10px;
121+
margin-top: 3px;
106122
}
107123

108-
.github-avatar {
124+
img.github-avatar {
125+
width: 24px;
109126
border-radius: 4px;
110-
width: 36px;
111-
height: 36px;
112-
margin-right: 5px;
113-
}
114-
115-
.branch {
116-
font-family: "open_sanssemibold";
127+
margin-right: 10px;
117128
}
118129
}

app/app/styles/section/trello.scss

Lines changed: 27 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -53,140 +53,51 @@
5353
}
5454

5555
.section-trello-render {
56-
.trello-table {
57-
border: none!important;
58-
margin: 0px !important;
5956

60-
td {
61-
border: none !important;
62-
vertical-align: top;
63-
}
57+
a:hover {
58+
text-decoration: underline;
6459
}
6560

6661
.heading {
67-
font-size: 1.6rem;
68-
margin: 30px 0 0 0;
69-
}
7062

71-
.trello-label {
72-
font-size: 11px;
73-
color: #fff;
74-
padding: 0 8px;
75-
margin-right: 5px;
76-
border-radius: 2px;
77-
box-shadow: inset 0 -1px 0 rgba(0,0,0,.12);
78-
display: inline-block;
79-
line-height: 22px;
80-
text-shadow: 0 0 5px rgba(0,0,0,.2),0 0 2px #000;
63+
h3 {
64+
font-size: 22px;
65+
margin: 0;
66+
font-family: "open_sanslight";
67+
}
68+
8169
}
8270

83-
.board-stats {
84-
margin-bottom: 10px;
85-
td {
86-
color: $color-gray;
87-
padding: 20px 40px 30px 0px !important;
88-
}
89-
.stat-number {
90-
font-family: "open_sanslight";
91-
font-size: 40px;
92-
margin-right: 20px;
93-
color: black;
94-
}
71+
table.trello-single-board {
72+
border: none!important;
73+
text-align: left;
74+
margin:0!important;
9575
}
9676

97-
.trello-board {
98-
color: white;
99-
padding: 15px 20px;
100-
width: 190px;
101-
white-space: nowrap;
102-
overflow: hidden;
103-
text-overflow: ellipsis;
104-
display: inline-block;
105-
border-radius: 4px;
106-
margin-right: 20px;
77+
.trello-single-board thead tr th {
78+
padding: 15px 0;
79+
border-bottom: 1px solid #e1e1e1;
80+
text-transform: uppercase;
81+
font-size: 14px;
10782

10883
span {
109-
display: table;
110-
font-size: 14px;
111-
line-height: 10px;
112-
opacity: 0.5;
113-
padding-bottom: 10px;
114-
margin-bottom: 8px;
84+
color:#838d94;
11585
}
116-
}
11786

118-
.board-summary {
119-
font-size: 1.2rem;
120-
}
121-
122-
.member-name {
123-
font-size: 1.2rem;
124-
line-height: 15px;
12587
}
12688

127-
.board-meta, .member-meta {
128-
color: $color-gray;
89+
.trello-single-board tbody tr td {
90+
border: none!important;
91+
padding: 5px 20px 5px 20px !important;
12992
}
13093

131-
.trello-avatar {
94+
.trello-label {
95+
color:white;
96+
font-size: 11px;
97+
padding: 4px 6px;
13298
border-radius: 4px;
133-
width: 36px;
134-
height: 36px;
135-
margin-right: 5px;
99+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
100+
margin-left: 14px;
136101
}
137102

138-
> .single-trello-board {
139-
width: 100%;
140-
max-height: 600px;
141-
padding: 10px;
142-
white-space: nowrap;
143-
overflow: auto;
144-
145-
> a {
146-
> .trello-board-title {
147-
font-weight: bold;
148-
color: #fff;
149-
font-size: 16px;
150-
}
151-
}
152-
153-
> .trello-list {
154-
background-color: #e2e4e6;
155-
padding: 10px;
156-
border-radius: 3px;
157-
margin: 10px 10px 0 0;
158-
width: 300px;
159-
max-height: 500px;
160-
display: inline-block;
161-
white-space: nowrap;
162-
overflow: auto;
163-
vertical-align: top;
164-
165-
> .trello-list-title {
166-
font-weight: bold;
167-
color: #4c4c4c;
168-
font-size: 14px;
169-
margin: 0 10px 10px 0;
170-
}
171-
172-
> a {
173-
> .trello-card {
174-
color: #4c4c4c;
175-
border-bottom: 1px solid #CDD2D4;
176-
background-color: #fff;
177-
border-radius: 3px;
178-
padding: 7px 7px;
179-
margin: 5px 0;
180-
font-size: 14px;
181-
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
182-
line-height: 18px;
183-
overflow: hidden;
184-
word-wrap: break-word;
185-
white-space: normal;
186-
cursor: pointer;
187-
vertical-align: top;
188-
}
189-
}
190-
}
191-
}
192103
}

0 commit comments

Comments
 (0)