Skip to content

Commit 2eca790

Browse files
author
Chris Hart
committed
Update item groups layout and styles
Fixes: CNVS-29681 Test plan: - Please test this change as both a student and a teacher/admin, because Modules, Assignments and Quiz item groups appear differently for each kind of user. - Go to a Canvas course with a lot of Assignments. The Assignments index page should now look like this: http://screencast.com/t/rEowTYSzrh It should show the exact same information as before this update, and the drag-and-drop should function exactly as it did before: The only thing that should have changed is the design. Experiment with editing the details of an Assignment, to make sure it still updates correctly. - Go to a Canvas course with plenty of Quizzes. Go to the main Quizzes page. The Quiz item groups should look just like the Assignments item groups (above) -- and function exactly as they did before. - Go to a Canvas course with a lot of Modules. Test in the same manner as assignments. Modules item groups should now look like this: http://screencast.com/t/u9juucjivDZ - Go to a Canvas course with active and past Conferences. Test in the same manner as Assignments and Modules. Conferences item groups should now look like this: http://screencast.com/t/ff7VyTH18L60 Change-Id: I30779d222210a602cb5dca01ce95db04b1ece81f Reviewed-on: https://gerrit.instructure.com/82116 Tested-by: Jenkins Reviewed-by: Colleen Palmer <colleen@instructure.com> Product-Review: Colleen Palmer <colleen@instructure.com> QA-Review: Pierce Arner <pierce@instructure.com>
1 parent 2400c77 commit 2eca790

21 files changed

Lines changed: 573 additions & 505 deletions

app/coffeescripts/views/assignments/AssignmentGroupListItemView.coffee

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ define [
238238
@$('.search_show').first().addClass("first_visible")
239239
@$('.search_show').last().addClass("last_visible")
240240

241-
242241
shouldBeExpanded: ->
243242
@cache.get(@cacheKey())
244243

app/coffeescripts/views/assignments/AssignmentListItemView.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ define [
147147
# can move items if there's more than one parent
148148
# collection OR more than one in the model's collection
149149
data.canMove = @model.collection.view?.parentCollection?.length > 1 or @model.collection.length > 1
150+
data.showAvailability = @model.multipleDueDates() or not @model.defaultDates().available()
151+
data.showDueDate = @model.multipleDueDates() or @model.singleSectionDueDate()
150152

151153
if data.canManage
152154
data.spanWidth = 'span3'

app/coffeescripts/views/quizzes/QuizItemView.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,7 @@ define [
9999
base.selector = @model.get("id")
100100
base.link_text = @messages.multipleDates
101101
base.link_href = @model.get("url")
102+
103+
base.showAvailability = @model.multipleDueDates() or not @model.defaultDates().available()
104+
base.showDueDate = @model.multipleDueDates() or @model.singleSectionDueDate()
102105
base

app/stylesheets/base/_variables.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ $ic-header-background: #34444f;
137137
$ic-header-primary-width: 84px;
138138
$ic-header-primary-expanded-width: $ic-sp*15;
139139

140-
//============================
141-
// List Functional Variables
142-
//============================
143-
$ic-list-item-background--hover: #eef7ff;
144-
$ic-list-item-background--selected: #d9edf9;
145-
146140
//================================
147141
// Global light background colors
148142
//================================
@@ -161,7 +155,7 @@ $ic-bg-light-danger: lighten($ic-color-danger, 48%);
161155
//============================
162156
// List Functional Variables
163157
//============================
164-
$ic-list-item-background--hover: $ic-bg-light-primary;
158+
$ic-list-item-background--hover: lighten($ic-bg-light-neutral, 2%);
165159
$ic-list-item-background--selected: $ic-bg-light-primary;
166160

167161
//=====================

app/stylesheets/bundles/conferences.scss

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,30 @@ header:not(.ic-app-header) {
4444
}
4545
}
4646

47-
i[class*=icon-]:before, i[class^=icon-]:before {
48-
font-size: 13px;
49-
}
47+
}
5048

49+
.ig-row-label {
50+
margin-right: $ic-sp;
51+
@include breakpoint(desktop) {
52+
margin-right: $ic-sp*1.5;
53+
}
5154
}
5255

5356
.ig-header-title a {
54-
color: #434343;
57+
color: $ic-font-color-dark;
5558
}
5659

57-
.ig-list .ig-row {
60+
.ig-list .ig-row {
61+
padding-left: $ic-sp;
62+
padding-right: $ic-sp;
63+
}
5864

59-
.ellipses { color: $ic-font-color--subdued; }
65+
.ig-info {
66+
margin-left: 0;
67+
}
68+
69+
.ig-title {
70+
margin-bottom: 0;
6071
}
6172

6273
#add_conference_form {
@@ -72,19 +83,10 @@ header:not(.ic-app-header) {
7283
}
7384

7485
.item-group-expandable .emptyMessage {
75-
color: #676b6e;
76-
background: #f3f6f7;
86+
color: $ic-font-color--subdued;
87+
background: $ic-color-light;
7788
text-align: center;
78-
padding: 10px;
89+
padding: $ic-sp;
7990
margin: 0;
8091
border-radius: 3px;
8192
}
82-
83-
.ig-title {
84-
flex: 0 0 200px;
85-
@include breakpoint(desktop) { flex: 0 0 40%; }
86-
}
87-
88-
.ig-details {
89-
flex: 1;
90-
}

app/stylesheets/bundles/content_next.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
background-color: transparent;
144144
border-bottom: none;
145145
padding: auto;
146-
color: #3d454c;
146+
color: $ic-font-color-dark;
147147
}
148148
.sortable-handle a, .draggable-handle a {
149149
color: #b4b7ba;
@@ -181,12 +181,6 @@
181181
color: inherit;
182182
}
183183

184-
.context_module_item .item_name .title {
185-
padding: 0;
186-
color: inherit;
187-
@include fontSize(13px);
188-
}
189-
190184
.context_module_placeholder {
191185
height: 40px !important;
192186
border: none !important;

app/stylesheets/bundles/new_assignments.scss

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@
106106
}
107107
}
108108

109-
.draggable-handle {
110-
margin: 0 4px 0 -15px;
111-
padding: 0 0px 0 10px;
112-
}
113-
114109
.sortable-dropzone {
115110
height: 50px;
116111
background-color: #dce1e6;
@@ -119,10 +114,9 @@
119114
}
120115

121116
.ui-sortable-helper {
122-
background-color: #e8ecef;
123-
border: 1px solid #c1c7cf !important;
124-
border-radius: 3px;
125-
box-shadow: 0px 1px 4px #b7b7b7;
117+
background-color: $ic-color-light;
118+
border: 1px solid $ic-border-dark !important;
119+
box-shadow: 0px 1px 16px rgba(black, 0.3);
126120
}
127121

128122
.draggable .ui-sortable-helper {
@@ -134,9 +128,9 @@
134128

135129
.draggable-dropzone {
136130
height: 40px;
137-
background-color: #dce1e6;
138-
border-right: 1px dashed #c1c7cf;
139-
border-left: 1px dashed #c1c7cf;
131+
background-color: lighten($ic-color-dark, 15%);
132+
border-right: 1px dashed $ic-border-dark;
133+
border-left: 1px dashed $ic-border-dark;
140134
}
141135

142136
.ag-header-controls .tooltip_link {

app/stylesheets/components/_g_context_modules.scss

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,6 @@ $context_module_bg_color: #f2f3f4;
5555
.ig-row {
5656
display: flex;
5757
align-items: center;
58-
}
59-
.ig-details {
60-
.due_date_display {
61-
text-align: center;
62-
@include breakpoint(desktop) {
63-
text-align: right;
64-
}
65-
}
66-
67-
.points_possible_display {
68-
text-align: center;
69-
}
7058

7159
.module-item-status-icon {
7260
width: 16px;
@@ -75,8 +63,26 @@ $context_module_bg_color: #f2f3f4;
7563
.icon-mark-as-read {
7664
opacity: 0.4;
7765
}
66+
67+
+ .ig-admin {
68+
margin-left: $ic-sp;
69+
}
70+
}
71+
72+
// if there is going to be nothing in the
73+
// .requirement-description.ig-details__item
74+
// element, suppress the pipe of the
75+
// .ig-details__item before it. (The element
76+
// can't be removed bc it might be updated via js.)
77+
&:not(.with-completion-requirements) {
78+
.ig-details__item:nth-last-child(2) {
79+
&:after {
80+
display: none;
81+
}
82+
}
7883
}
7984
}
85+
8086
h2 .name {
8187
display: inline;
8288
position: absolute;
@@ -299,7 +305,6 @@ $context_module_bg_color: #f2f3f4;
299305
}
300306
}
301307
.type_icon {
302-
display: inline-block;
303308
i {
304309
color: #777;
305310
display: none;
@@ -430,8 +435,6 @@ $context_module_bg_color: #f2f3f4;
430435
}
431436
}
432437
.module_item_icons {
433-
vertical-align: top;
434-
padding-top: 2px;
435438
text-align: left;
436439
white-space: nowrap;
437440
width: 3.2em;
@@ -460,13 +463,6 @@ $context_module_bg_color: #f2f3f4;
460463

461464
.context_module_item {
462465
.item_name {
463-
vertical-align: top;
464-
.title {
465-
padding-left: 5px;
466-
padding-top: 5px;
467-
padding-bottom: 5px;
468-
font-size: 0.9em;
469-
}
470466
.locked_title {
471467
display: none;
472468
}
@@ -490,13 +486,19 @@ $context_module_bg_color: #f2f3f4;
490486
.type_icon {
491487
width: 0px;
492488
}
489+
.ig-type-icon {
490+
display: none;
491+
}
492+
.ig-info {
493+
margin-left: $ic-sp/4;
494+
}
493495
.criterion img {
494496
display: none;
495497
}
496498
.locked_title {
499+
@include fontSize($ic-font-size--medium);
497500
display: inline;
498-
font-weight: bold;
499-
color: #888;
501+
font-weight: $ic-font-weight;
500502
}
501503
}
502504
.links {

0 commit comments

Comments
 (0)