![]() closes: CORE-1944 test plan: As a teacher, open the Status Modal in New Gradebook. You shouldn’t see: Warning: [Modal] `closeButtonLabel` was deprecated in 5.0.0. the header of the modal should look the same as it did before the “X” button should have “Close” screenreader text Clicking it should close the modal Change-Id: Ibc91e83e532f565c48fae5e30973fcfeb03e9f98 Reviewed-on: https://gerrit.instructure.com/166021 Tested-by: Jenkins Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com> |
||
---|---|---|
.. | ||
__tests__ | ||
account_course_user_search | ||
actAs | ||
add_people | ||
announcements | ||
assignments | ||
authentication_providers | ||
blueprint_courses | ||
bundles | ||
calendar | ||
canvas_cropper | ||
choose_mastery_path | ||
collaborations | ||
conditional_release_stats | ||
context_cards | ||
context_modules | ||
course_link_validator | ||
course_settings | ||
course_wizard | ||
courses | ||
custom_help_link_settings | ||
dashboard | ||
dashboard_card | ||
developer_keys | ||
discussion_topics | ||
discussions | ||
due_dates | ||
editor | ||
eportfolios | ||
epub_exports | ||
external_apps | ||
files | ||
grade_summary | ||
gradebook | ||
gradebook-history | ||
gradezilla | ||
grading | ||
groups | ||
help_dialog | ||
login | ||
mediaelement | ||
modules | ||
move_item | ||
navigation_header | ||
new_user_tutorial | ||
notification_preferences | ||
outcomes | ||
permissions | ||
profiles | ||
quizzes | ||
rubrics | ||
shared | ||
speed_grader | ||
student_last_attended | ||
subnav_menu | ||
theme_editor | ||
views | ||
webzip_export | ||
.eslintrc.js | ||
README.md | ||
appBootstrap.js | ||
canvas-apollo.js | ||
canvasCssVariablesPolyfill.js | ||
fakeRequireJSFallback.js | ||
railsFlashNotificationsHelper.js |
README.md
This directory is temporary until we rework the front-end build This is where we are headed.
Stuff you can do in Canvas JSX files
BUT WAIT!
Your file needs to:
- Have a file name with the
.jsx
extension.
JSX
function foo(paths) {
return <svg>{paths}</svg>;
}
Arrow Functions
var arr = ['hydrogen', 'helium', 'lithium'];
// es5
var a = arr.map(function(s){ return s.length });
// es6
var b = arr.map( s => s.length );
// with curlies requires normal return
var b = arr.map( (s) => {
return s.length
});
// lexical `this`
var obj = {
multiplier: 3,
multiplyStuff (stuff) {
return stuff.map((x) =>
// no bind!
return this.multiplier * x;
)
}
};
Classes
class EventEmitter {
constructor() {
// called when created
}
emit() {
// ...
}
on() {
// ...
}
once() {
// ...
}
removeListener() {
// ...
}
removeAllListeners() {
// ...
}
}
Extending and calling super
.
class Domain extends EventEmitter {
constructor() {
super();
this.members = [];
}
}
Creating instances
var domain = new Domain();
Destructuring
// es5
var map = _.map;
var each = _.each;
// es6
var {map, each} = _;
Concise Object Methods
// es5
var obj = {
foo: function() {}
bar: function() {}
};
// es6
var obj = {
foo() {}
bar() {}
};
Object Short Notation
// es5
function() {
// ...
return {foo: foo, bar: bar, x: 10};
}
// es6
function() {
// ...
return {foo, bar, x: 10};
}
Rest Parameters
// es5
function multiply(multiplier) {
var numbers = Array.prototype.slice.call(arguments, 0);
return number.map(function(n) { return multiplier * n; });
}
// es6
function multiply(multiplier, ...numbers) {
return numbers.map( n => multiplier * n);
}
String Templates
Multiline strings:
// es5
console.log("string text line 1" +
"string text line 2");
// es6
console.log(`string text line 1
string text line 2`);
Interpolated strings
var a = 5;
var b = 10;
// es5
console.log("Fifteen is " + (a + b) + " and not " + (2 * a + b) + ".");
// es6
console.log(`Fifteen is ${a + b} and not ${2 * a + b}.`);