canvas-lms/app/jsx
Eric Berry b27294a720 LTI 2 Registration
Heavily refactored app center and external tools settings. Added
LTI2 with feature flag

fixes: PLAT-732
fixes: PLAT-732
fixes: PLAT-734

Test steps:

Visit settings on an account:
- Add LTI2 tool
- Add LTI1 tool manually
- Add LTI1 tool via URL
- Add LTI1 tool via XML
- Edit LTI1 tool
- Edit LTI2 tool (permissions)
- Disable LTI2 tool
- Delete LTI1 tool
- Delete LTI2 tool

Visit settings on a course:
- Add LTI2 tool
- Add LTI1 tool manually
- Add LTI1 tool via URL
- Add LTI1 tool via XML
- Edit LTI1 tool
- Edit LTI2 tool (permissions)
- Disable LTI2 tool
- Delete LTI1 tool
- Delete LTI2 tool

Extra items to test:
- Verify adding invalid URL on LTI2, close modal, click add button
  resets the forms
- Verify toggle enable/disable LTI2
- Verify LTI2 form submit via Enter key
- Verify disabled LTI2 apps are shown
- Flag LTI2 app as disabled when disable
- LTI2 feature flag

Change-Id: Ic8925cf5cfba0ebee9ed3242b4e2bff7809a3e98
Reviewed-on: https://gerrit.instructure.com/45816
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Matt Zabriskie <mzabriskie@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
2015-01-22 21:04:43 +00:00
..
course_wizard Makes the new wizard remember to not auto open more than once 2015-01-09 21:02:29 +00:00
external_apps LTI 2 Registration 2015-01-22 21:04:43 +00:00
gradebook/SISGradePassback Displays last sync time in section drop down 2015-01-20 16:48:05 +00:00
grading reactify grading standards page 2015-01-09 20:42:51 +00:00
groups Groups membership from student perspective fixed 2015-01-21 18:58:26 +00:00
shared added createStore.js 2014-11-04 17:58:08 +00:00
styleguide Canvas UI Component Style Update - Modals 2015-01-05 14:35:05 +00:00
README.md typo in jsx README 2014-11-04 23:06:46 +00:00

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:

  1. Have a file name with the .jsx extension.
  2. Start with /** @jsx React.DOM */

JSX

function foo(paths) {
  return <svg>{paths}</svg>;
}

Arrow Functions

Arrow Function Reference

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 Reference

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

Rest Parameters Reference

// 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

String Template Reference

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}.`);