Commit Graph

385 Commits

Author SHA1 Message Date
Jeremy Neander 8d26b51a3f update @instructure/ui-core to 4.5.0
closes GRADE-737

test plan:
* ensure Jenkins passes
* verify Canvas is not totally borked

Change-Id: I05907db24eeed2791b6dd755cca8e8a224f408df
Reviewed-on: https://gerrit.instructure.com/136186
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-20 00:23:52 +00:00
Ryan Shaw d4b0982c33 Upgrade ui-core from 4.2.0 to 4.4.0
would be good to get this in before anyone does more QA on all the
instui4 commits

Change-Id: Ief71e4a76c009836910584d4d05cc219f6d38565
Reviewed-on: https://gerrit.instructure.com/135768
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-18 17:59:33 +00:00
Ryan Shaw 4e64e18fd5 publish jUnit test result file from karma tests
Test plan:
* run `yarn test`
* there should be xml file in coverage-js/karma-test-results.xml
  With the spec results that we will use for Jenkins builds

Change-Id: Ic68de197d2b52dbccdf58dc2d148aef1f2ca2646
Reviewed-on: https://gerrit.instructure.com/135949
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-18 15:44:53 +00:00
Brent Burgoyne 5177893361 bump a11y checker version to 1.2.3
fixes issue where re-check would cause contrast errors for the
default canvas link style

closes CORE-781

test plan:
- yarn install
- put content in an rce with something that will fail and a link
- fix the error
- it should not show a contrast error for the link

Change-Id: Ia72d0cfaebb98999c39290ae5de26b52defa52f3
Reviewed-on: https://gerrit.instructure.com/135744
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-12-14 22:51:04 +00:00
Ryan Shaw 88c1c61bdf Add Jest for testing JavaScript
closes: CNVS-34337

* For now, you can only test things that don’t require any coffeescript
  files
* Write your tests using es6 module syntax
* see app/jsx/shared/helpers/__tests__/parseLinkHeader.test.js for an
  example

test plan:
* run `yarn run jest`
* you should see some output like:
 PASS  app/jsx/shared/helpers/__tests__/parseLinkHeader.test.js
 PASS  app/jsx/actAs/__tests__/ActAsModal.test.js

Test Suites: 2 passed, 2 total
Tests:       5 passed, 5 total
Snapshots:   1 passed, 1 total
Time:        3.072s
Ran all test suites.
* make sure it runs on jenkins build

Change-Id: Ia79cd8ce35dc863c4cc5ce7512998320c7cfdb84
Reviewed-on: https://gerrit.instructure.com/100685
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-14 22:08:09 +00:00
Ed Schiebel 34494f112c Bump canvas-planner version to 1.0.13
closes: ADMIN-605

test plan:
  - the planner should exhibit all the fixes as enumerated in the commit
    message for https://gerrit.instructure.com/#/c/135411/

Change-Id: I7c249834582fc27d5183846e69bfe797e9d4c230
Reviewed-on: https://gerrit.instructure.com/135414
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-12-13 19:12:46 +00:00
Brent Burgoyne 7fecb11a08 upgrade a11y checker to include translatsions
call setLocale when initializing the a11y checker

closes CORE-632

test plan:
- change users language to other languages
- the strings in the a11y checker should be translated
- still waiting on translations for he, hy, ko, and tr

Change-Id: Idfe82194acd078f29b194b9184059985c162fa17
Reviewed-on: https://gerrit.instructure.com/135379
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-12-12 23:04:32 +00:00
Ryan Shaw ddcd097e10 get window.location.orgin polyfill from npm
…instead of the copy-pasta’ed one in our repo

Test plan:
Make sure the files search results page works in ie11

Change-Id: I61433363eda53d44b897bf1f88837cef7c239f87
Reviewed-on: https://gerrit.instructure.com/135141
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-12 16:22:06 +00:00
Ryan Shaw 8fc5d174c5 add InstUI4's ui-core to package.json
...so people can start upgrading all of their stuff

closes:  CORE-735

test plan:
* check out a follow on commit after this and make test that
* make sure theming works for new components

Change-Id: I1ab6141152c353cbae88657b8913431c2634a4f2
Reviewed-on: https://gerrit.instructure.com/135330
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-12 15:52:40 +00:00
Clay Diffrient 1d533e5a94 Bump tinymce-a11y-checker to version 1.1.3
closes CORE-688

Test Plan:
  - Create a violation in the a11y checker
  - Use a11y checker to fix it
  - The apply button should work
  - Also, you should QA the following things from the 1.1.0
    release:
      - [482f02c] removing redudant alt text from adjacent links
      - [cf9083a] UI design alignment
Change-Id: I47c85200f7ad487506f53e1875fb251851231359
Reviewed-on: https://gerrit.instructure.com/134170
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-12-12 14:19:50 +00:00
Ryan Shaw e7ec697d02 [spec] upgrade to newest 2.x enzyme
Change-Id: I4b518f68a938d4695074a19bc2a5611c74029cd7
Reviewed-on: https://gerrit.instructure.com/135147
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-11 20:23:08 +00:00
Brent Burgoyne d642fb6609 upgrade canvas-rce to version 2.6.2
closes CORE-673

test plan:
- ensure rcs flag is enabled
- run latest RichContentService locally w/ flickr api key
- insert a flickr image
  - should be linked to image on flickr website
- test with a wiki page
- test uploading an image from the images tab in the sidebar
  - it should have the place to enter alt text or decorative
- save the page
  - it should render image and have correct alt text
- edit wiki page
- test uploading a pdf from the files tab
- save the page
- the inline preview should work (canvadocs plugin must be enabled)
- smoke test common rce workflows

Change-Id: Ia8c9c020d4318729cc0f15bd60a05672614863ec
Reviewed-on: https://gerrit.instructure.com/134639
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-12-08 16:22:50 +00:00
Ryan Shaw 06ae2f2287 add eslint rules to lint Qunit specs
We just had a thing where a commit made it through that added an
.only(…), which made it so Jenkins would only run that one test.
This should help prevent that.
And it should help us write more helpful tests too.

Test plan:
* change a test from “test(” to “Qunit.only(“, eslint should print an
  error.

Change-Id: If43640a74cadbe88ed8d49a9c66232356a339104
Reviewed-on: https://gerrit.instructure.com/134893
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-12-07 16:46:34 +00:00
Ed Schiebel e6e6f5c825 bump canvas to instui 3.3.4
fixes ADMIN-570
refs ADMIN-80, ADMIN-259

test plan:
  - try test plan from ADMIN-80
  - try test plan from ADMIN-259

Change-Id: I0169be49b732ad89a5d6fe44934ddab8b600fec0
Reviewed-on: https://gerrit.instructure.com/133886
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
2017-11-29 18:15:53 +00:00
Ryan Shaw 907ca23efc move redux-logger from prod deps to devDeps
Because nothing should be including or using redux-logger in production,
It is safe to move it to devDependencies

Test plan:
* automated builds should pass

Change-Id: Ic532f86a559a748388dc2d6b0481f760debc2ac0
Reviewed-on: https://gerrit.instructure.com/133702
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-27 18:38:24 +00:00
Ryan Shaw deab67450f Update a bunch of npm dependencies
Change-Id: I089fa97c1e18417f52e7b3baa9ba618129820755
Reviewed-on: https://gerrit.instructure.com/133722
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-27 17:09:44 +00:00
Ryan Shaw c11e737980 force using yarn 1.3.2
closes: CORE-674

test plan:
* while running yarn 0.27, try to run `yarn`
* it should give you an error about how you need to upgrade yarn
* brew install yarn (or upgrade to yarn 1.3.2 however else you do that)
* run `yarn` 
* it should work and should not make any changes to your yarn.lock or 
  node_modules

Change-Id: I916febab60755c93d3f2591c9067c1c8d8903674
Reviewed-on: https://gerrit.instructure.com/133501
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-22 16:38:47 +00:00
Ryan Shaw 2e2dadbd1b make it so it works with yarn 1.3.2 (frd)
closes: CORE-675

test plan:
* while running yarn 0.27,
* run `yarn`
* it should work and there should only be one jquery in node_modules
* brew upgrade yarn (or whatever else you do to upgrade yarn to 1.3.2)
* run `yarn`
* it should not log any warning about unpacking jquery to the same
  location as something else
* it should work and not make any changes to yarn.lock or node_modules
* load the calendar page, there should not be any errors

Change-Id: I08a1b8ceddf31cae59720270f870516ad213b87d
Reviewed-on: https://gerrit.instructure.com/133548
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-22 16:01:54 +00:00
Ryan Shaw 34dd5b44c1 Make it so it works with newest yarn (1.3.2)
test plan:
* while running yarn 0.27,
* run `yarn`
* it should work and there should only be one jquery in node_modules
* brew upgrade yarn (or whatever else you do to upgrade yarn to 1.3.2)
* run `yarn`
* it should work and not make any changes to yarn.lock or node_modules


Change-Id: Idf2eefbc1707d4c77ec8d1d6a78909240fd9b9f9
Reviewed-on: https://gerrit.instructure.com/133500
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-21 20:46:52 +00:00
Clay Diffrient 367c776bff Bump tinymce-a11y-checker to 1.1.0
Change-Id: Iddf150297716363c73adfbe32c124837e41c77e5
Reviewed-on: https://gerrit.instructure.com/133199
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-11-21 16:31:09 +00:00
Ed Schiebel 273015e755 Upgrade canvas-planner to v1.0.12
closes ADMIN-542

test plan:
  - if you _really_ want to dig deep, all the planner changes listed
    in the commit message vrom https://gerrit.instructure.com/#/c/132763/
    should be evident in canvas now
  - student_planner_spec.rb should have run w/o error

Change-Id: Ic94468de01fbc91cffc288fb7a4ce7be61ff8e62
Reviewed-on: https://gerrit.instructure.com/132785
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Minkevitch <dan@instructure.com>
2017-11-20 19:37:07 +00:00
Ryan Shaw 3c30c9b6df Clean up account course/user search pages
Closes: CORE-334 CORE-211

* takes out tabs from page
* changes “Courses & People” tab back to separate
  “Courses” and “People” tabs. They are still a single page app
  between those 2 tabs
* changes urls back to accounts/x for “Courses” tab and
  accounts/x/users for “People” tab (like they were previously)

Test plan:
* turn on MRA, Make sure the “suspend/unsuspend account”
  button on account settings page still works
* make sure the “find a user anywhere for siteAdmin/consortium root
  accounts” still works
* check to make sure going to the “People” and “courses” tab on the
  Left of the account nav works correctly
* verify that you can copy/paste the url showing for a given
  search result and it will come up with the same search results in
  another tab
* general regression on the account course & user pages.

Change-Id: Idfade57b2abd189a84ba5372d8e4aad1fb3ea49b
Reviewed-on: https://gerrit.instructure.com/128822
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-11-07 18:50:50 +00:00
Ryan Shaw 5528e05bf6 Remove phantomjs in favor of chrome headless
the preferred way to do headless testing is now chrome headless and
we have a bunch of tests that don't work in phantom anymore anyway since
they use es6 syntax that phantom's old safari doesn't support.

test plan:
* `yarn test` should still work

Change-Id: I16496ef77fe65ca61bda8c8e18d1c887b6a48486
Reviewed-on: https://gerrit.instructure.com/131340
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-11-06 16:35:25 +00:00
Brent Burgoyne 5b3dc812d6 upgrade canvas-rce to v2.5.6
fixes issue with inline file preview for document links inserted from
the rce sidebar

refs CORE-378

test plan:
- have canvadocs plugin configured
- make sure rcs feature flag is enabled
- create/edit a wiki page
- upload/insert a pdf
- save
- the inline preview should work
- edit the page
- put the cursor on the link
- click the link button in the editor toolbar
- test wil both checkboxes (autoexpand/hide inline preview)

Change-Id: I1fd5d8a41ae34f325a63b98d86b0d98ab3e2f34f
Reviewed-on: https://gerrit.instructure.com/131752
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-11-03 16:44:32 +00:00
Jeremy Neander 32975e3e9b spec: upgrade sinon
test plan:
* ensure Jenkins passes

Change-Id: I4d98500e19cc3287acba965454466e2c9c9c4aa1
Reviewed-on: https://gerrit.instructure.com/131756
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2017-11-03 14:40:45 +00:00
brian kirkby 2b75963cd0 bump canvas-rce version to 2.5.5
fixes CORE-377

Change-Id: I7e70cdcd12b4d9c71ff3b76ab816da51196d3b6b
Reviewed-on: https://gerrit.instructure.com/131566
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
QA-Review: brian kirkby <bkirkby@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2017-11-02 15:23:35 +00:00
Matthew Berns 23e41db772 spec: add aXe unit testing capability
this patch updates the a11y helper, adds a new spec
script to run, and adds aXe testing to discussion views

test plan:
- run the spec files edited in this patch normally with
  yarn run jspec-watch path/to/spec
- tests should all pass as expected
- run the spec files edited in this patch with the new command
  yarn run a11y-report path/to/spec
- you should get aXe errors on existing a11y violations

Change-Id: Ib3db892046e115bedb363752d1e56226eef893af
Reviewed-on: https://gerrit.instructure.com/87962
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Berns <mberns@instructure.com>
QA-Review: Matt Berns <mberns@instructure.com>
2017-10-25 16:44:56 +00:00
Brent Burgoyne e02d5ce2d0 upgrade a11y checker, fix placeholders / contrast
set new config option to ignore contrast checks if the the user does
not have high contrast enabled. this is a temporary fix to prevent
the checker from failing some default canvas styles that would pass
with high contrast enabled.

closes CORE-364, closes CORE-354, closes CORE-341, closes CORE-218,
closes CORE-217

test plan:
- the first heading should not have a heading sequence error
- default link styles should not fail contrast checks
- links that only contain a link should not have contrast issues
  - must test with high contrast flag for now
- test haveing an h2 then an h4 with more than 125 characters
  - run the checker, and correct the heading order on the first
    issue
  - you should still be able to convert the long heading to a
    paragraph on the second issue

Change-Id: Iaec77c7fb1bdcc8d512eb35e20ce8c45ecc0b99f
Reviewed-on: https://gerrit.instructure.com/130650
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-10-24 17:27:10 +00:00
Ed Schiebel de7c17e33c Bump canvas-planner to v1.0.11 in canvas
closes ADMIN-294

test plan:
  the planner works and we see the new stuff
  some new stuff:
  - click the bell and the popup can be taller than 2 items
  - new activity button has an up-arrow in it
  - scroll planner into the past and you eventually get to the TV image
  - edit the date of a todo and you don't get a duplicate
  - edit the date of a todo and it goes where you expect it to go

Change-Id: I8a53885c3d6a1a7d6e68a4aced1d8c28a2bd648f
Reviewed-on: https://gerrit.instructure.com/129626
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-10-18 15:44:56 +00:00
Clay Diffrient 03c7b0e5bf Bump canvas-rce to version 2.5.4
fixes CNVS-39778

Test Plan:
  - Enable Sidebar enhancements feature flag
  - Set up a custom theme (changing the primary color)
  - Go to /pages and create/edit a page
  - The sidebar accordion colors should match the primary color
    you selected

Change-Id: Ib45019b7aa07cbaefac975dce984eccdbcfe035a
Reviewed-on: https://gerrit.instructure.com/129569
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-10-17 20:13:02 +00:00
Brent Burgoyne 5cdea871af upgrade tinymce-a11y-checker to v1.0.3
fixes issue with alt text length rule and images without an alt
attribute

refs CNVS-39943

test plan:
- a11y checker does not spin with images without alt text

Change-Id: Ie92374c6f5a99f6d4b0804cab2489f390d131e72
Reviewed-on: https://gerrit.instructure.com/129697
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-10-16 21:21:53 +00:00
Ryan Shaw 3b74d4e588 Resolve more yarn.lock weirdness
This is the result of 
Rm -rf node_modules yarn.lock
Yarn install —production —flat
Then manually de-duping a couple things 

Change-Id: I63ed1ecd0233658b9d72ac11fa68047fd7ea1f8a
Reviewed-on: https://gerrit.instructure.com/129576
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-13 15:08:41 +00:00
Ryan Shaw 40d1b2b2d5 add babel-plugin-transform-runtime for smaller JS
This will make our webpack bundles smaller

Test plan: 
run `yarn run webpack-production` without this
Run it again with this applied.
The output it spits out with this should be smaller

Change-Id: Ieb77a6528cd6f7759d7ebbbbc944bd9900ea90f0
Reviewed-on: https://gerrit.instructure.com/129371
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-12 14:35:46 +00:00
Ryan Shaw 8406c0d199 Upgrade some package.json devDependencies
Change-Id: I4df825ff17c4123c58b7478d698726caed704586
Reviewed-on: https://gerrit.instructure.com/129353
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-12 14:35:29 +00:00
Derek Bender b36a52bb60 react-preset-es2015 -> react-preset-env
Per the deprecation notice on react-preset-es2015, this commit
replaces react-preset-es2015 with react-preset-env. This library
can target specific browsers and result in slimmer assets since
it only transpiles what's needed instead of everything.

context: http://babeljs.io/env

Change-Id: Ia5107776c34bed200cb45aba2d30fa7671457b12
Reviewed-on: https://gerrit.instructure.com/129307
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-11 20:33:44 +00:00
Ryan Shaw ea18e9cec5 a11y-checker: Don’t use separate inst-{ui,icons}
This also updates yarn.lock to reflect current master

Fixes: CNVS-39906

Test plan:
* the rce a11y checker should work
* the components in the a11y checker should be themed to your
  Theme editor colors

Change-Id: Iead53ec1895a7f4c441aad207a46a93404991b5d
Reviewed-on: https://gerrit.instructure.com/129311
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-11 19:35:29 +00:00
Brent Burgoyne 6a77f6fc27 add a11y checker plugin to rce
closes CNVS-39091

test plan:
- a Check Accessibility button should show on the right side of all
  editors
- try adding a empty table
- click the check a11y button
- should have two errors
  - missing caption
  - missing headers
- correct both errors
- should show no errors detected and close

Change-Id: I4028d98d082bdbdebc034facc529cccb67fc4dcf
Reviewed-on: https://gerrit.instructure.com/128951
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-10-09 15:36:25 +00:00
Ryan Shaw d77bcbf934 move things from “devDeps” to “dependencies”
Closes CNVS-39744

we used to only have the things needed to compile brandable_css in
“Dependencies”. This was because, when we used to have to run 
brandable_css on a job server when someone pressed “preview” in the 
theme editor, we only wanted to have the minimum amount of node_modules
installed there to do that. But now that we no longer have to do
any brand-specific css compiling we can just do what is considered
normal and put anything that actually goes on the page in “dependencies”
and leave all the build tooling, linting, etc stuff in devDependencies.

This also makes it so it is really easy to see the cases that we
might be loading 2 versions of something in our webpack bundles
by running `yarn install --prod --flat`. Whatever that prompts you
about is something that will be included more than once in our webpack
bundles.

Test plan:
* run `yarn install`
* it should not generate a new yarn.lock because everything is the
  same versions as before.

Change-Id: I87b88f50d2cdbe494f928e5418e8540da9cc084c
Reviewed-on: https://gerrit.instructure.com/128244
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-10-04 18:59:59 +00:00
Ryan Shaw 094d65a1cb Remove remaining dynamic brand css code
closes: CNVS-39103 CNVS-39104 CNVS-38650

test plan:
* do a general css styling regression pass
* make sure that the urls to css files look like
  /dist/brandable_css/new_styles_normal_contrast/<bundle>-<fingerprint>.css
  and not:
  /dist/brandable_css/<big long md5>/new_styles_normal_contrast/<bundle>-<fingerprint>.css
* make sure that stylesheets loaded by handlebars templates work
  eg: go to the calendar page and make sure it is styled correctly
* verify that the theme editor works. especially the process when you hit
  "preivew" and "apply"
* set up config/canvas_cdn.yml to use the dev cdn
* run `bundle exec canvas:compile_assets && bundle exec rake canvas:cdn:upload_to_s3`
* load a page, all the css should load from the cdn
* verify the theme editor works when using the cdn too.

* also review the changes in the brandable_css npm package:
  https://github.com/ryankshaw/brandable_css/compare/c6bef...b159d5

Change-Id: I55db41e90f6bc54183a661128f1050445a086d6b
Reviewed-on: https://gerrit.instructure.com/120912
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-10-03 22:49:11 +00:00
Graham Ballantyne 5c9ae8f6aa Generate JavaScript sourcemaps in production
Resolves instructure/canvas-lms#1101

In production, generate separate sourcemap files so that bundles appear
split into their original, un-obfuscated source files in browser
devtools.

Note: `source-map` generation on large projects can cause node/v8 to
exhaust its memory allocation (see webpack/webpack#1914,
webpack/webpack#2157). This is the reason for the change to
package.json. In the future (e.g. when Canvas uses Node 8, or the
NODE_OPTIONS feature is back-ported to Node 6, this can go back to
a traditional npm script that doesn't directly invoke `node`.

Test Plan:
- Remove the `public/dist/webpack-*` directories.
- Run `JS_BUILD_NO_UGLIFY=true npm run webpack-production`. No sourcemap
  files should be present in  `public/dist/webpack-production`.
- Run `npm run webpack-production`. Sourcemap files should be present in
  `public/dist/webpack-production`

Change-Id: Iebc85b5f52a6c7c25fdc5c2326cf9436dd42c2dd
Reviewed-on: https://gerrit.instructure.com/128070
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2017-10-02 18:43:52 +00:00
Derek Bender b598775360 Replace react-addons-update -> immutability-helper
React-addons-update is deprecated[1] and needs to be replaced with
immutability-helper[2], which is a drop-in replacement for
react-addons-update.

[1]: https://reactjs.org/docs/update.html
[2]: https://github.com/kolodny/immutability-helper

closes: GRADE-318

test plan:
- tests pass

Change-Id: Ic74d31b0a3a998d766df9d778800377d4ede5f53
Reviewed-on: https://gerrit.instructure.com/128053
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-10-02 16:32:16 +00:00
Cameron Matheson 93e2005da5 use graphql for student context cards
closes CNVS-37584

Test plan:
  - student context cards should work as usual with graphql turned off
  - when graphql is on, student context cards should behave
    identically, but should hit the /api/graphql endpoint instead of
    the REST api

Change-Id: I723ac48a7c7f58c4b6065b92ec37c9985498c9d3
Reviewed-on: https://gerrit.instructure.com/122427
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-09-15 22:50:17 +00:00
Stephen Jensen 3514168c86 Bump InstUI version in Canvas to 3.3.0
Closes: CNVS-39133

Test Plan:
- Pay special attention to instui Modals and Popovers
- Also DatePickers/DateInputs
- Test an InstUI component in Canvas high contrast mode
  and ensure that it shows correctly

Change-Id: I24a1fa7502397a433e872a114afe64bab6f97f96
Reviewed-on: https://gerrit.instructure.com/125239
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Stephen Jensen <sejensen@instructure.com>
2017-09-12 20:59:36 +00:00
Neil Gupta b9737cc05c Upgrade to Inst-UI 3.2
fixes GRADE-180

Test plan:
Smoke test all Canvas pages that use InstUI.

Change-Id: I9ca3dc199924ec3a26c21bcc47dacb51ed12df6a
Reviewed-on: https://gerrit.instructure.com/122611
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-09-07 17:14:42 +00:00
Cameron Matheson b5e55d89d7 fix graphql deps
Change-Id: Idd02f9b1f64b51ac42100df5b786ef9e9e1ebb3d
Reviewed-on: https://gerrit.instructure.com/123680
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-08-31 21:29:14 +00:00
Pam Hiett 6cb9dee2ee bump inst-icon version in canvas from 4.2 to 4.3
Fixes: CNVS-38904

test plan:
- local environment set-up... since this is updating our
  icon dependecy you will need to remove /dist folder and
  re-compile all the things prior to viewing
- once all things are up and running - navigate to a course
  select an assignment... if it's pubished click to unpublish
  so you can see the "updated unpublish icon"
- example of new view: https://screencast.com/t/n5TSgNXpCSr

Change-Id: I42fb39a3856ee331460623a8964818c0925f32f4
Reviewed-on: https://gerrit.instructure.com/124362
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-08-31 14:32:27 +00:00
Ryan Shaw 57f025163b dedupe things in yarn.lock
this will make it so all of our bundles share one copy of:
axios, browser, react-redux, redux-thunk. uuid, core-js etc.

it will make it so users have to download less bytes of javscript
in their webpack bundles


test plan:
make sure pages that use axios work.
automated specs should pass

Change-Id: If3698452e3d6f1095997bd97505efc11ae05c678
Reviewed-on: https://gerrit.instructure.com/124266
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-29 17:20:06 +00:00
Cameron Matheson 9fab292083 add prettier and config-eslint-prettier
Change-Id: I16b8e5337435136e6b8ea1e1f7edb05612d8a2aa
Reviewed-on: https://gerrit.instructure.com/123269
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-08-24 16:41:57 +00:00
Omar Khan 0fdd64e53f Remove karma container from docker-compose.override.yml
Test plan:

- Add docker-compose/js-tests.override.yml to COMPOSE_FILE in .env
- docker-compose build js-tests
- docker-compose run --rm js-tests

Change-Id: I6d43cb2da47c1b6985a9fefd9cc23262e5f56233
Reviewed-on: https://gerrit.instructure.com/123284
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2017-08-18 20:03:30 +00:00
Mysti Sadler 7a4ce6580a Update canvas_offline_course_viewer for new translations
Test plan
- Smoke test to ensure dependency pinning hasn't
  caused any issues

Change-Id: I98f2feec9c56f98f530685fa9c94c106d9881c4c
Reviewed-on: https://gerrit.instructure.com/122023
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
2017-08-17 21:43:24 +00:00
Ryan Shaw 82068ca5eb upgrade webpack related npm modules
Refs: CNVS-38653

This upgrades us to webpack 3.5.4 and upgrades uglify
and Istanbul related stuff too:

Test plan:
* automated build should pass
* run yarn && COVERAGE=1 yarn test && open coverage-js/index.html
* it should run karma & open your browser to a bunch of istambul reports
* run `yarn run webpack-production`
* it should generate minified code that works in your browser when you
  open canvas in prod mode

Change-Id: Id8b3c2457f47a30f299eafc6a8206102cfe98dc5
Reviewed-on: https://gerrit.instructure.com/122993
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-16 21:33:10 +00:00
Omar Khan 399414b3ec Run javascript tests in headless chrome
Test plan: docker-compose run --rm karma yarn test

Change-Id: I316d80e7a1b712b0dda91a390c4dddeb09b3e6fb
Reviewed-on: https://gerrit.instructure.com/122776
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-16 16:11:52 +00:00
Cameron Matheson 1606e9558b update graphiql
Change-Id: Ib5f5152ed915918ab95efe0fdf1fc93b8ca12eb9
Reviewed-on: https://gerrit.instructure.com/122348
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-08-10 20:37:39 +00:00
Brent Burgoyne 0c1c81fef2 make all locale files agree on short month names
fixes CNVS-34165

test plan:
- make sure you are running with RAILS_LOAD_ALL_LOCALES=1
  for (web and webpack if you are running docker)
- change locale to each of es, de, fr, fr-ca, he and pl
- create/edit a quiz
- in the due date try setting the due date to a day in each month
  - no need to save
- make sure after clicking the day it doesn't change to a different
  month or year

Change-Id: I2da96f80678193e084786d867b27f2944a6e402c
Reviewed-on: https://gerrit.instructure.com/119926
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
2017-08-04 22:14:48 +00:00
Ryan Shaw 5b3953ba0e bump canvas-rce to share deps for smaller bundles
Refs: QUIZ-2556

have canvas-rce share the same lodash, prop-types, 
format-message, & redux that's already on the page, 
so bundles are smaller.

test plan:
* check to make sure the service version of RCE works right
* the webpack bundle for it should be smaller

Change-Id: I9e9cb96524760987138d4a9ef24073a854889366
Reviewed-on: https://gerrit.instructure.com/121276
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-03 22:26:43 +00:00
Ryan Shaw bb14a49a36 Don’t show webpack progress on prod build
… so Jenkins logs are less noisy

Test plan:
* verify that the “full console” view
  For the selenium build of this patchset doesn’t
  Have a bunch of noisy progress output from webpack 

Change-Id: Id69b04435be52bcc3213298e5ae55ac146d8e2ed
Reviewed-on: https://gerrit.instructure.com/120863
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-07-28 19:59:01 +00:00
Ryan Shaw 96c115963e Update yarn.lock with newest versions of deps
closes:  CNVS-38384

This is just to keep our tooling up to date

Test plan:

* automated tests should pass
* build tooling should work (meaning webpack builds
  In prod & dev)

Change-Id: I11fbda35827487e59712c762a71540a51258d1db
Reviewed-on: https://gerrit.instructure.com/120434
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-07-27 22:07:59 +00:00
Steven Burnett d33861c444 bump planner to 1.0.7
Change-Id: I86483b6a9d3db18cf89f4e0d4badb49b5b68dfb4
Reviewed-on: https://gerrit.instructure.com/119724
Product-Review: Aaron Kc Hsu <ahsu@instructure.com>
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-07-19 21:44:28 +00:00
Clay Diffrient e3714a3891 Bump canvas-planner to 1.0.6
closes FALCOR-495

This release includes these things from canvas-planner:
    - Bump planner to version 1.0.6
    - Handle long strings in planner items and groups
    - Bump version to 1.0.5
    - Make past items load in descending order when fetching
    - Make close button for opportunities modal show at bottom and be hidden
    - Dismissing Opportunties breaks for certain planner items
    - update readme for deploying
    - fix instui defaultValue error
    - Finally patches scrolling bug
    - [i18n] update locales with new translations
    - Canvas Planner Fix For Showing Due Dates at 12:00 A.M.
    - Bump version to 1.0.4
    - Change dismissing opportunity to different API field
    - [i18n] update locales with new translations
    - Add copyright notice linting
    - Add LICENSE file to repository
    - Make ungraded discussion topics show the new replies pill
    - Upgrade a few libraries that we depend on
    - Make todo items associate properly with courses
    - Create non-existing days when needed
    - fix a time dependent test
    - [i18n] update locales with new translations
    - Fix IE x wrong spot issue
    - [i18n] update english locale with new strings
    - fix translations in utilities file
    - Bump version to 1.0.3

Test Plan:
  - Things work, automated tests pass

Change-Id: I6ac18ed79c19d99a352681458507876adbf26412
Reviewed-on: https://gerrit.instructure.com/119306
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
2017-07-18 23:51:37 +00:00
Pam Hiett 22cf38efd4 bump canvas to using INST-ICON v4.2.0
Fixed: CNVS-38040

test plan:
- ensure package.json is referencing the correct version
- clean compile all assets (may require rm /public/dist)
- fire up local instance and ensure all icons are displaying
  correctly

note:
- this commit also removed the unnessacry call-out to Icon-Line for
  dashcard icon for accessing color as well as removed some
  gradebook code that was rotating the old icon so it looks like
  what the new one actually is now (vertical vs horizontal)

Change-Id: I7c74c64e16245d43bd9f717c7a44baab232fb002
Reviewed-on: https://gerrit.instructure.com/118182
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
2017-07-11 14:18:26 +00:00
Ryan Shaw 9e3c4466ef try not to use 2 versions of redux or prop-types
Change-Id: If9d17b409b2d5eba100848eedd25103f5ec70392
Reviewed-on: https://gerrit.instructure.com/117173
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-06-30 20:15:38 +00:00
Clay Diffrient c9df4b05cc Bump to canvas-planner 1.0.3
closes FALCOR-447

Test Plan:
  - Regression test planner
  - New changes include:
       [debcbf1629] (Clay Diffrient)  Bump version to 1.0.3
       [0087bf1781] (Jon Willesen)  fix crash on status unread_count > 0
       [f61625989c] (Ubuntu)  [i18n] update locales with new translations
       [3ff846d51e] (Aaron Kc Hsu)  Fix scrolling to top when opening TODO update tray

Change-Id: I77d7e846021528649a97c5a0b5f5bd8f549571a4
Reviewed-on: https://gerrit.instructure.com/117467
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-06-29 19:26:46 +00:00
Clay Diffrient 182a14f8fd Bump canvas-planner to 1.0.2
closes FALCOR-435

Change-Id: I7e891b10473adbdb79fa2c5610de43f554cfe91d
Reviewed-on: https://gerrit.instructure.com/117298
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Tested-by: Jenkins
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-06-28 17:38:13 +00:00
Clay Diffrient 4ce5ae9288 Bump canvas-planner version to 1.0.0
closes FALCOR-427

Test Plan:
  - Automated tests pass
  - Regression on planner in Canvas
  - The following commits from canvas-planner are added
    in this release (in case that helps with testing new stuff)
         [1a260a5b76] (Clay Diffrient)  Bump version to 1.0.0
         [0d743e31c6] (Clay Diffrient)  Clear update todo item details when closing the tray
         [b694a49c55] (Clay Diffrient)  Handle focus management with the to do item tray better
         [04322e9ed8] (Ubuntu)  [i18n] update locales with new translations
         [4df1ae93d5] (Clay Diffrient)  [i18n] update english locale with new strings
         [f582e8a4e4] (Clay Diffrient)  Improve a11y of the update item tray
         [018e1ec45f] (Clay Diffrient)  Make opportunities popover aria-hide non-popover content
         [9f2d288183] (Clay Diffrient)  Make to do items show without needing refresh
         [84f218acd5] (Jon Willesen)  remove course link from to do groups
         [cf1b9af0f1] (Aaron Kc Hsu)  Fixes Moment Fail Test
         [bc8f51a4ae] (Chris Hart)  Better line-heights for Planner components
         [c5839b7058] (Steven Burnett)  allow updating of todos
         [64df109598] (Clay Diffrient)  Add alerts in places that need them
         [f6170ad01a] (Aaron Kc Hsu)  To Do items default to 11:59 PM on the front end
         [fcf82f31b0] (Ubuntu)  [i18n] update locales with new translations
         [2c08e5bf92] (Jon Willesen)  Revert "show days with nothing planned"
         [98cc1bed74] (Aaron Kc Hsu)  Change Todo link from black to correct color
         [500aff0303] (Ubuntu)  [i18n] update locales with new translations

Change-Id: I94aeefd20d3974844da05b0a6dd8e28327a4a790
Reviewed-on: https://gerrit.instructure.com/117081
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-06-27 19:08:38 +00:00
Gary Mei 6ad73b1b08 upgrade instructure-ui to 2.5.0
closes CNVS-37721

Test Plan
- check to make sure package.json and yarn.lock makes sense

Change-Id: I90a7d47557a0d350d8b424d6e6e5023490d85f1e
Reviewed-on: https://gerrit.instructure.com/116406
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-06-26 20:06:20 +00:00
Pam Hiett c7b6ca55e5 clean up icon css, increase base font size, update inst-icons
Fixes: CNVS-37057, CNVS-37327
Refs: CNVS-37056

test plan:
- navigate around canvas to ensure the icons are aligned
  and showing correctly :D

- overall note - icons are now the "line" version vs the
  solid (with this implementation the assignments and
  modules pages have removed the circle with background color
  for better legibility for the icon)

- the overall base font size for canvas has been increased
  to 1rem = 16px (there are still areas that have overriding
  css to manipulate the font size smaller than the base and
  can be addressed individually)

- this bumps inst-icons to a beta version for testing

Change-Id: I5ef389298257122f0c3016e97beff50ed8925df1
Reviewed-on: https://gerrit.instructure.com/114343
Tested-by: Jenkins
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
2017-06-26 20:00:21 +00:00
Brent Burgoyne aee3a584ca upgrade canvas-rce and tinymce-light-skin
the new version of the rce and skin no longer incorrectly display the
font size of text in tables. many of the canvas style overrides have
also been moved to the skin and are no longer needed in canvas.

the initial push of this fix broke several rcs selenium tests due to a
circular destroy chain. https://gerrit.instructure.com/#/c/116660/ fixes
that and has been published to npm as v2.2.0-alpha.1. we should test this
patchset against that npm version

fixes CNVS-37517

test plan:
- run yarn install first to get new dependency versions. canvas-lms should
  be version 2.2.0-alpha.1
- test rcs and legacy editors
- insert a table, type in a cell, text should be same size as outside
  the table (shows as 11pt in toobar)
- test the toolbar nav with and without high contrast (alt+f10)
- toolbar styles should match colors and have a triangle under for
  active state, and a border for focus state, and both when focusing
  on an active button
- create a discussion thread
- add a reply to the discussion thread
- edit the reply to the discussion thread
- verify that this works and has no console errors

Change-Id: I7e8696cf54afda6de08fa729452f14fc1868510a
Reviewed-on: https://gerrit.instructure.com/116036
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
2017-06-23 22:55:06 +00:00
Steven Burnett 62303cf5cd bump canvas planner to 0.0.7
Test Plan:
- Full regresssion on the dashboard

Change-Id: I514f06497fb8d6c06208f3ccd4a959c7c84e8352
Reviewed-on: https://gerrit.instructure.com/116441
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2017-06-21 22:45:32 +00:00
Felix Milea-Ciobanu 67739bc63a make npm build scripts more user friendly :)
test plan:
- run the following commands and assess that they run as expected:
  - yarn run build
  - yarn run build:css
  - yarn run build:css:watch
  - yarn run build:js
  - yarn run build:jss:watch

Change-Id: I4c0a2a68ce62896364bc2da5e7956002c15f5847
Reviewed-on: https://gerrit.instructure.com/110497
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-06-21 20:04:47 +00:00
Derek Bender d0dc5fd25a add color picker to StatusesModal
closes: CNVS-31854

Test Plan:
 - Given the New Gradebook
 - When the Statuses Modal is open from the View Menu
 - Then a popover kabob is present for each status

 - When the kabob icon is clicked
 - Then the color picker appears
 - Then the displayed color for that status row is selected in the
   color picker
 - Then focus is on the first swatch

 - When a swatch is selected
 - Then swatch appears as selected with a bolder border
 - Then the hex display is updated to that swatch's color
 - Then the color preview updates to that swatch's color

 - When Apply is clicked
 - Then the color in the grid is updated
 - Then the color picker popover is closed
 - Then focus is returned to the kabob

 - When the page is reloaded
 - The updated color settings persists

 - Given the color picker is open
 - When clicking anywhere but the color popover content
 - Then color picker closes

 - Given the color picker is open
 - Given another color is selected
 - When cancel is clicked
 - The color is not updated
 - Focus is returned to the kabob

 - This patchset should not change any behavior with the color picker on
   the dashboard for course colors

Change-Id: I131eb6e564e78265db77a04fba63ba318e8ffaf6
Reviewed-on: https://gerrit.instructure.com/115212
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-06-20 18:48:53 +00:00
Jon Willesen 9bcb7a67dd offline course viewer is a production dependency
fixes CNVS-37610

test plan:
* on a machine with only production node modules installed (like a job
  server), the offline export works.

Change-Id: I5013895c3b4a5faa51a13e569c4004a60f33b11e
Reviewed-on: https://gerrit.instructure.com/115793
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-06-16 13:55:09 +00:00
Clay Diffrient 34389833e1 Upgrade canvas-planner to 0.0.6
closes FALCOR-344

Test Plan:
  - Enable planner feature flag
  - Create some items that have dates
  - As a student log in and switch to "List View" in the dashboard
    options menu
  - Planner should display data appropriately
  - NOTE: Checking items complete, will NOT work in this version.
  - NOTE: Adding to do items will NOT work in this version.

Change-Id: Ifb3edc70c8d6f44e0b099c11b702a3d0fc4b7355
Reviewed-on: https://gerrit.instructure.com/115162
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-06-13 21:14:53 +00:00
Ed Schiebel 1daba336d3 Uplift canvas to instui 2.4.0
this addresses the brand theme issue

fixes CNVS-37386

Test plan:
  - enable a different theme in canvas
  - go to a course People paage
  - click on +People
  > expect the modal buttons and such to be themed correctly

Change-Id: I37bdf0c1528b94dc51e724f680ea1cbac96ed778
Reviewed-on: https://gerrit.instructure.com/115196
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-06-13 18:39:56 +00:00
Ryan Shaw 7162d14389 Upgrade brandable_css to see if it fixes intermittent node-sass build error
fixes: CNVS-37355

Some people have reported getting errors while
`yarn install`ing or `npm install`ing when
it tries to build node-sass from brandable_css
(Especially in docker)
This commit updates brandable_css, which updates
the version of node-sass it uses. I want to see
if it fixes anything

test plan:
css should generate and node-sass should not fail when `yarn install`ing

Change-Id: I018560baf151479a402fa1dbd868eaca9d51bb02
Reviewed-on: https://gerrit.instructure.com/113228
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-06-07 16:27:47 +00:00
Brent Burgoyne 0e80cdb29a upgrade tinymce-light-skin to 1.2.5
fixes CNVS-37316

fixes issue cause by a const not-transpiled to var

test plan:
- pages with tinymce don't have non-transpiled const

Change-Id: I2ff0bdae30921780b376fdb7ec7a5a128d495f7b
Reviewed-on: https://gerrit.instructure.com/114170
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-06-05 15:03:50 +00:00
Ed Schiebel d91405dc0a Update blueprint icons and button behavior
closes MC-183 CNVS-36933

test plan:
  - create a master course with locked and unlocked content
  - go to a learning object's index page
  > expect the lock and unlock buttons to have the new icons, and for the
  > mouse-over and tooltips to behave similarly to the publish icons
  - go to an object's show page
  > expect the locked/unlocked button to have the new icons, and for the
  > mouse-over and tooltips to behave like the publish button
  - create a child course and sync
  > expect the child course's learning objects' pages to have the
  > new lock and unlock icons

NOTE: this gerrit will never pass Jenkins tests because it depends on a
corresponding change in the demo_site gem/plugin.
https://gerrit.instructure.com/#/c/112656/ exists to test the 2
interdependent commits together. If it gets a Jenkins +1, then this is
OK too.

Change-Id: I5e4a8bb109d6b9574fdf8650787f530c4597b2ab
Reviewed-on: https://gerrit.instructure.com/112422
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
2017-06-04 15:14:56 +00:00
Neil Gupta 8e1587f354 Bump Inst-UI to 2.3.0
Change-Id: I74c3cb8521fb77415e679e65ccc5f8f00f016461
Reviewed-on: https://gerrit.instructure.com/114005
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
2017-06-02 21:41:53 +00:00
Derek Bender 7e8e782f8b upgrade instructure-ui to 2.2.2
Change-Id: I08b9f544b024d1e5e92c49909e4abdf5bfacaa05
Reviewed-on: https://gerrit.instructure.com/113219
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-05-26 21:51:48 +00:00
Cameron Matheson 5545a6e121 introduce /api/graphql
DO NOT USE THIS YET.  It is beautiful, but unready.

Test plan:
  1. enable graphql feature flag
  1. go to /graphiql
  2. shed tears of joy

closes CNVS-37001, CNVS-37004

Change-Id: I94ae9c452fe987efcc5e88659ca9c932c280097e
Reviewed-on: https://gerrit.instructure.com/112867
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-05-25 21:38:22 +00:00
Ryan Shaw 09726a07c2 Get jquery-ui-touch-punch from NPM, not vendor
closes: CNVS-37135

test plan:
try to drag drop things (like on the discussions
index page) on an iPad or other touch interface

make sure it still works

Change-Id: I290d5adc2a956edda367b95de1184224d5f1e66a
Reviewed-on: https://gerrit.instructure.com/113066
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-25 16:23:02 +00:00
Neil Gupta 2dd5ab97eb Bump inst-ui to 2.2
Change-Id: I0d4ca419131df23315d37c865bf4b74649dd0b24
Reviewed-on: https://gerrit.instructure.com/113023
Tested-by: Jenkins
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-05-24 21:41:19 +00:00
Ryan Shaw 5a077107f8 Sort out package.json dev and prod dependencies
This moves the things in the prod dependencies
That are not actually needed for brandable_css
Previews to generate to the devDependencies

Test plan:
rm -rf node_modules yarn.lock
yarn install --production
yarn run brandable_css

All your css should generate without errors

Change-Id: I68bc3aeaf4b8ac934cdd3372476795a062cdcc69
Reviewed-on: https://gerrit.instructure.com/112514
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2017-05-23 20:00:45 +00:00
Ryan Shaw 3dd16484e6 upgrade timezone to 1.0.6
closes CNVS-35897

test plan
* Set your time zone to Cairo (+2) or Istanbul (+3)
* Set a recurring calendar event to extend into the next month
* the calendar event should not be one hour ahead when it
  extends into the next month

Change-Id: I078697bc533bdb5a4f70d3f037ba9d2d25d3a058
Reviewed-on: https://gerrit.instructure.com/112420
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-23 18:25:05 +00:00
Brent Burgoyne 2941d588a1 upgrade canvas-rce to v2.1.0
this upgrade includes support for hiding the "link to a new page"
link based on can_create_pages from the jwt workflow state.

fixes CNVS-35271

test plan:
- make sure you `yarn install` to git the latest npm module
- ensure you are running the latest RichContentService api server
- ensure rich content service flags are enabled in canvas
- go to a course discussion as a student
- you should not see the "link to a new page" link under the "pages"
  section of the links tab for the rcs sidebar
- you should still see at as any user, regardless of role, who has
  rights to create wiki pages in the context

Change-Id: Icfcc187e9c18d6c2d718830c09b8bd1ad2506f0d
Reviewed-on: https://gerrit.instructure.com/112503
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-05-22 20:00:08 +00:00
Ryan Shaw 83d5247954 use jquery.elastic from npm, not vendor
closes: CNVS-37028

Test plan:
* the textarea in the speedgrader should still
  grow as you type in it as it did before

Change-Id: Iff6d03ff1e032073a211674b1c3d2ee3bacca89c
Reviewed-on: https://gerrit.instructure.com/112312
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-22 17:20:53 +00:00
Ryan Shaw 80a83a7857 get md5 from NPM, not public/javascripts/vendor
Closes  CNVS-37032

    test plan:
     - navigate to user settings page and click the avatar.
     - select the gravatar tab of the dialog.
     - input field should be pre-populated with user's default
       email address.
     - image preview should show gravatar for default email.
     - input new email address and click preview.
     - new gravatar should be displayed in the preview.
     - click select image button. dialog should close and new
       avatar should be diplayed.
     - refresh and make sure new avatar sticks.
     - inspect element on the avatar image; it should point to
       the gravatar domain.

Change-Id: I55891a567e54a1df4bb982133f2adc8f4872672e
Reviewed-on: https://gerrit.instructure.com/112433
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-22 16:37:45 +00:00
Ryan Shaw fb41a8a46a rm …/vendor/{timezone,ie11-polyfill,fontface}
closes: CNVS-36805

I’m working towards turning on babel for public/javascripts
And so instead of having to worry about selectively adding excludes
For things in public/javascripts/vendor that we haven’t modified,
I’m just moving things out of there.

This commit just relies on gulp rev to put these files in
public/dist/* instead of having the intermediate artifacts
hanging around in public/javascripts/vendor/* that then
get copied/revved to public/dist by gulp rev.

This also minifies any gulp-revved js in production

Test plan:
* Nothing should change
* run compile_assets
* the javascript for your timezone data should load
  just fine like it did before
* the lato fontface observer should still be working
* go to the site in IE, there should not be any
  Js errors (like “Promise is not defined”)

Change-Id: I10b2e3f102276ab0ef5f58cbc0d981f5aa800522
Reviewed-on: https://gerrit.instructure.com/111251
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-19 18:21:14 +00:00
Ryan Shaw 913d5ebe6a get jquery.getScrollbarWidth from npm, not vendor
closes: CNVS-37030

Test plan:
* the student dropdown menu in Speedgrader should still work

Change-Id: Icb7464188b4480e07356521609108caffc5c6f5e
Reviewed-on: https://gerrit.instructure.com/112310
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-19 16:15:15 +00:00
Clay Diffrient 6e1d34b08f Pass proper course data into canvas-planner
closes FALCOR-265

Test Plan:
  - Enable planner feature flag
  - Switch to list view dashboard
  - Have several assignments with due dates
  - Notice that the assignments show up

Change-Id: I235795b86b704fd33d8f0ba82a874c89e9c3348d
Reviewed-on: https://gerrit.instructure.com/111723
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Mary Jane Anderson <manderson@instructure.com>
2017-05-17 21:53:31 +00:00
Jennifer Stern 29ce91643a Upgrade React, instructure-ui and instructure-icons
fixes CNVS-36648, closes INSTUI-421

Test plan:

The following areas of Canvas are affected by this upgrade:
- High contrast mode and theme editor branding
- blueprint courses
- conditional release stats
- student context cards
- new user tutorial
- course home dialog

Change-Id: I5d7128e4ebf88a34342ffcb99d4ccf7dd839b2f7
Reviewed-on: https://gerrit.instructure.com/111443
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Tested-by: Jenkins
2017-05-16 21:15:44 +00:00
Brent Burgoyne 839d192c10 add focus indication to tinymce modal tabs
closes CNVS-28612

test plan:
- test in legacy editor and with rcs enabled
- insert a table
- click table properties icon at bottom left of table context menu
- shift+tab to move focus back to tabs
- should indicate focus with a box outline in the tab

Change-Id: I547d2c204dab670ecfe3208c442a7250c40204ab
Reviewed-on: https://gerrit.instructure.com/111626
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-05-15 20:28:22 +00:00
Clay Diffrient bf8837cfe8 Add canvas-planner package to canvas
closes FALCOR-245

Test Plan:
  - Enable planner feature flag
  - Go to dashboard and switch to List View
  - You should see the planner header items (+ and bell) in the
    top right
  - There should be a spinner in the middle
  - NOTE: At this point, the spinner will not go away and will
    remain because the API is not in place yet.

Change-Id: Id9f3f0c678ec295976b8e29d0092a96fbfec089d
Reviewed-on: https://gerrit.instructure.com/111479
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-05-12 17:08:49 +00:00
Ryan Shaw 118207ee8b Use swfobject from npm
closes: CNVS-36810

I’m working towards turning on babel for public/javascripts
And so instead of having to worry about selectively adding excludes
For things in public/javascripts/vendor that we haven’t modified,
I’m just moving things out of there.


Test plan:
* Nothing should change
* run compile_assets
* the flash widget for the video/audio recording in the rce editor
  should work exactly as before.

Change-Id: Iaa85df60c82a354b05864156a68418f14b332a23
Reviewed-on: https://gerrit.instructure.com/111112
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-05-11 21:18:01 +00:00
brian kirkby 5ff873c6da upgrade canvas to tinymce 4.5.7
also uses new npm module for the tinymce-light-skin

closes CNVS-30080

test plan:
- turn off RCS features for tinymce
- thorough test of the tinymce editor in all locations
- one visible added feature is to create a table and look
  for the table context menu

Change-Id: If0396e79ffd58cab6ba6ec45a871f477a3f1feba
Reviewed-on: https://gerrit.instructure.com/107020
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: brian kirkby <bkirkby@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
2017-05-11 20:20:21 +00:00
Ryan Shaw 58e46d02b2 Revert "spec: preserve stderr from the browser, refs SD-2148"
This reverts commit 06d3bf9537.

Jon said he didn't need this anymore. If we really don't,
I figured I'd delete it so there is not cruft laying around

test plan:
* karma specs should work like normal

Change-Id: I91c017bb09e485bba654ba5604e37c73cd0876d7
Reviewed-on: https://gerrit.instructure.com/111263
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-05-09 21:07:39 +00:00
Ryan Shaw 8ab39a092e get jquery and jquery.cookie from npm, not vendor
closes: CNVS-35923

test plan:
* all specs should pass
* if you open your devtools there should still be a $ and jQuery
  variable globally available for you to use
* check to make sure that the client_app quizzes stuff works.
* e.g.: go to view a quiz’s stats as well as quiz log auditing

Change-Id: Ibcb55c8f319fc02974814452273aea5af793b205
Reviewed-on: https://gerrit.instructure.com/106474
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-05-08 20:47:23 +00:00
Brent Burgoyne d90fc8baf8 upgrade canvas-rce to v1.1.5
- fixes known bugs
- includes additional translations

closes CNVS-36607

test plan:
- enable RCS
- add image to text area
- select the image and then add a new image to replace
- select the image and add a link with the link button
  and or Links panel
- verify the image links to the correct link
- while editing a page, select an existing image
- fromt he Images tab on the sidebar, upload a new image
- verify that it replaces the selected image with the new image instead
  of hyperlinking the old image to the new image

Change-Id: I2f9eff61a1d40ca989efb07b56bee9d60dd70e41
Reviewed-on: https://gerrit.instructure.com/110260
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-05-01 21:47:40 +00:00
Jennifer Stern 8bfbf4f1d4 Upgrade instructure-ui to v1.4.2
fixes CNVS-36568

Test plan:
The instructure-ui patch release fixes an issue with the TabList component
which is used in the following areas of Canvas:
- Conditional release
- Account user search

Change-Id: I9f72fcda1e035401fd11f36ce612e00f55b4a490
Reviewed-on: https://gerrit.instructure.com/110189
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-04-28 18:35:42 +00:00
Michael Brewer-Davis 7537e29068 improve assignment a11y
- prevent navigation to unselectable assignees
- remove tabindex from non-form field

closes CNVS-35509

Test plan:

Change-Id: Ic65585caced5502e54dbdf8bb05b81387737e411
Reviewed-on: https://gerrit.instructure.com/109407
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-04-24 21:12:22 +00:00
Mysti Sadler e631365a92 Update canvas_offline_course_viewer for new bug changes
Change-Id: I45ff12a314449330ffa3939b61c343d7152add40
Reviewed-on: https://gerrit.instructure.com/109416
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2017-04-21 21:54:05 +00:00
Brent Burgoyne 5d64de62fe replace hot-loaded rcs with canvas-rce module
closes CNVS-33443

test plan:
- regression test RCS editor and sidebar
  - up to level 2 feature flag
  - do not need to test with high-risk flag (yet)

Change-Id: I92f9282d655203f6b76e7667d4e00cbcc147db6e
Reviewed-on: https://gerrit.instructure.com/107130
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-04-17 22:36:46 +00:00
Jennifer Stern 930745fe7e Bump instructure-icons and instructure-ui
closes: CNVS-35498, CNVS-36371

- New icon
- Better SVG support
- PopoverMenu bug fixes

Test Plan:
- Make sure icons show up
- Make sure icon-external-link works (you can do this by
just changing a class name on any icon in inspector)
- Regression test areas that use instructure-ui

Change-Id: Ib43d0698571f8e22a2977cde5e9bbdfc1e6acf40
Reviewed-on: https://gerrit.instructure.com/108745
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Pam Hiett <phiett@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
2017-04-17 20:39:38 +00:00
Ryan Shaw 5d998e808e clean up old webpack artifacts after each build
closes: CNVS-36233

webpack adds a fingerprint to the filenames that it outputs, which 
means that if the content changes, the filename changes. so over 
time, unless you manually know to rm -rf public/dist/webpack* 
periodically, you'll start accumulating a ton of javascript files 
in that dir that you don't need which can slow down your editor's 
grepping, take up a ton of space, and confuse you. this change makes 
it so right before webpack emits all of the new bundles, it cleans up 
the ones that were there. it only cleans up the ones in the dir it is 
outputting to, so you can still have prod bundles in 
public/dist/webpack-production/ and dev bundles in 
public/dist/webpack-development

test plan:
* run webpack before you check this out
* check this out
* run yarn then run webpack again
* you should see something in the webpack output like:
  WebpackCleanupPlugin: 220 file(s) deleted.
* and there should be only one copy of each bundle in the 
  public/dist/webpack-development dir.

Change-Id: Ide7a7f53c255c7aa5ad09fb4ff0bcfd7436b2852
Reviewed-on: https://gerrit.instructure.com/108147
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-04-11 16:31:12 +00:00
Ryan Shaw 8ed5ab2252 Use jQuery.tabelsorter from npm
closes: CNVS-35924

Test plan:
webpack && bin/rspec ./spec/selenium/interactions_report_student_spec.rb:33
Should pass.

Also, go to that page and verify that you
Can click on the column headers and sort by that
column

Change-Id: I68227ea44b44ee33ce2d1078299b2f62e52bd058
Reviewed-on: https://gerrit.instructure.com/106513
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-04-11 15:45:03 +00:00
Derek Bender d261106efe upgrade sinon
Change-Id: I4dfe355bbfe1f0de2fb5028b1d4b4b8443a69cc7
Reviewed-on: https://gerrit.instructure.com/108112
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-04-10 22:09:34 +00:00
Jon Jensen 0939898e56 fetch all pages of students for adhoc override
fixes CNVS-28479

when a course has more than 200 students (so not all are prefetched) and
an adhoc assignment override specifies more than a page size (default
10) of students, it's possible for some students in the override to be
neither prefetched nor in the first page of results when fetched by ID.
make sure to fetch all pages of results when fetched by ID.

also make the 4 prefetch requests happen serially, and only once the user
begins interacting with the component (hover or focus). this way we don't
fetch more than we need to in small courses, and we don't fetch anything
if the teacher isn't using this part of the UI (generally the case). this
has the added benefit of speeding up selenium specs, as it has only one
server thread and the `get` waits for all ajax requests to complete

test-plan:
  part 1:
   - have a course with at least 201 students
   - have an assignment in that course with an override that specifies 11
     students
   - have the 11th student specified for the override be the 201st student
     in the course
   - edit the assignment
   - confirm you see the name for the 201st student (11th in override)
     instead of "Loading..."
  part 2:
   - have a course with 51 students
   - go to edit a new assignment
   - confirm no /users ajax requests happen initially
   - focus the "Assign to" widget so you can manage overrides
   - confirm there are 2 ajax requests for /users
   - confirm you see 7 students in the dropdown (either immediately or
     with a very slight delay, depending on whether you clicked or
     tabbed into the widget)
   - confirm you can search for any of them without additional ajax
     requests

Change-Id: I47ed202eb0d8ac1ad9e4ad21e50ceae930a6f3fe
Reviewed-on: https://gerrit.instructure.com/106693
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2017-03-31 18:58:45 +00:00
Mysti Sadler 5008dda896 Update webzip export version to 1.0
closes OFFW-179

Change-Id: I30ade8c7931b3ae49fbbb01b2ef3fa199cd8d065
Reviewed-on: https://gerrit.instructure.com/106770
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2017-03-29 16:13:22 +00:00
Shahbaz Javeed 1f70432fa2 upgrade instructure-ui to 1.3.1
test plan
* Specs should pass
* Load up gradebook and everything should work

Change-Id: I5734e9262244154c495725f89d92841547aba473
Reviewed-on: https://gerrit.instructure.com/106662
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
2017-03-28 21:57:55 +00:00
Jon Jensen 06d3bf9537 spec: preserve stderr from the browser, refs SD-2148
test plan:
1. see previous patchset build where Xvfb was intentionally killed
2. note the `ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: :20.0`

Change-Id: Ia7bd7f82e85972c25fe7221cb2441473a3267936
Reviewed-on: https://gerrit.instructure.com/106517
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-27 22:41:57 +00:00
Neil Gupta 42efe68dd8 Update InstUI to 1.2
Change-Id: Idf9a961c691fa398ed50445bd77aefb6fb00483c
Reviewed-on: https://gerrit.instructure.com/105852
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2017-03-21 17:47:32 +00:00
Jon Willesen 3e9365cc88 bump offline course viewer to 0.3.0
fixes OFFW-126

test plan:
* build passes

Change-Id: Ic5a4d3dea5527b1c8c98448a4dd0751b863872dc
Reviewed-on: https://gerrit.instructure.com/105006
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-03-14 17:18:31 +00:00
Ryan Shaw 3c3078b3ac upgrade coffescript so we can use import/export
Fixes: CNVS-35540

test plan:
Since this upgrades the coffeescript compiler version,
it changes the format of the code that it generates so it has
the possibility to break things in a strange way if someone was
doing something in a way that was not actually supposed to be
supported as part of the coffeescript language spec or if we
run into a weird edge case of the compiler doing one thing before
but doing it in a way where our code breaks now. Having said that,
since there is no specific place where we intended things to change:

* automated specs should pass

Change-Id: I0630c25db7f97e69675992bba2ebccfdaf918ed3
Reviewed-on: https://gerrit.instructure.com/104677
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-14 16:09:54 +00:00
Jon Jensen 54d558146b yarnify package.json
Change-Id: I04b98d8911adcc7f391bdf9c904aee2650943bb9
Reviewed-on: https://gerrit.instructure.com/104966
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-03-13 23:49:59 +00:00
Ryan Shaw e5f479421d Strip out react propTypes in prod webpack build
closes: CNVS-34774

I did this before with 
https://github.com/thejameskyle/babel-react-optimize
but it had a few other transforms that were more
complex that introduced an error in the compiled
result. This enables just the propType transform
from that

test plan:
* using webpack in prod mode
* look at the javascript sources for some components,
  there shouldn’t be anything in there about PropTypes
* the generated code should be smaller & run faster

Change-Id: Idffd020c99e34fcd6fe29f916d0a8482e0d4e90d
Reviewed-on: https://gerrit.instructure.com/104202
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 23:04:17 +00:00
Stephen Jensen ed5d6260a7 Bump instui to version 1.0.2
Test Plan:
- InstUI components in canvas should behave as before

Change-Id: Icf74b119347d1af7d037abe6bed1cab655ca4a48
Reviewed-on: https://gerrit.instructure.com/104670
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-03-13 22:21:58 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Ed Schiebel d1664390e2 Upgrade instructure-ui to 1.0
fixes CNVS-34969

test plan:
  - go /profile/settings and turn on high contrast
  - go to the course people page (/courses/#/users)
  - click on the +People button
  > expected result: the modal honors high contrast

  - enter some text in he text area
  > expected result: nothing bad happens, as the event
    handler for TextArea has changed.
  - there's a TextArea in MessageStudents also, but I don't
    know where to find it in the UI. You should probalby
    test it doesn't blow up either.

Change-Id: Ia8102dacfa2b01ee043002ee0f5c27943abe5743
Reviewed-on: https://gerrit.instructure.com/102133
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-03-08 19:23:07 +00:00
Ryan Shaw 0627c2faef Upgrade brandable_css
fixes: CNVS-35414

the actual changes are here:
https://github.com/ryankshaw/brandable_css/commit/1fa1c2bc10c

Test plan:
Before checking this out, run:
rm -rf public/dist/brandable_css
RAILS_ENV=production node_modules/.bin/brandable_css
rm public/dist/brandable_css/brandable_css_*
cd public/dist/brandable_css/
git init .
git add .
git commit -am “original”
cd ../../..

Check this out, then run:
yarn install
RAILS_ENV=production node_modules/.bin/brandable_css
rm public/dist/brandable_css/brandable_css_*
cd public/dist/brandable_css
git diff

There should be no difference

to test the S3 stuff still works:

* set up your config/cavnas_cdn.yml file with a valid s3 bucket
* run `brandable_css`
* pull up a canvas page.
* the css should show up right and should be coming from your 
  cloudfront url

Change-Id: Iee1a7a916c3f17341adf513c2981b018420f7c16
Reviewed-on: https://gerrit.instructure.com/104016
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-06 20:02:51 +00:00
Jon Jensen ec1840b502 make xsslint not need js:generate, fixes SD-2160
this does make xsslint about 10x slower, since:
1. babel is slower than acorn
2. we now have to coffeescript everything on the fly

will revisit perf in another commit

Change-Id: I2ddad309d1921ba6a4e15cd79d3d8bd956a7e403
Reviewed-on: https://gerrit.instructure.com/103850
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-03 17:24:16 +00:00
Jon Jensen 162bc79787 pin xsslint
Change-Id: Id1aacd89d1eb1218e2b2803583614b62849732a0
Reviewed-on: https://gerrit.instructure.com/103849
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-03-02 23:03:05 +00:00
Clay Diffrient f8e66bd00a Put proper icons in new user tutorials
This upgrades inst-icons to 1.2.1

closes FALCOR-107

Test Plan:
  - Enable new user tutorials
  - Go to a course
  - The expand icon in the top right should be a |<-
  - When you open it, the collapse icon should be a ->|

Change-Id: Ice6faf1d0762e495d923fd8305ef56be2f268355
Reviewed-on: https://gerrit.instructure.com/102735
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2017-03-01 22:30:57 +00:00
Ryan Shaw 05f55c1c30 Deprecate `npm` client. Use `yarn` instead
Closes: CNVS-35152

This changes all our tooling that used `npm` to
Run scripts to use `yarn`. `npm` will still work
for now but if you have yarn installed, it will use
that.

Cheat Sheet:
old command      -> new command
npm install      -> yarn install (or just `yarn`)
npm run webpack  -> yarn run webpack
npm test         -> yarn test
See more at https://yarnpkg.com

Test plan:
* all Jenkins builds should pass
* without yarn installed:
* run script/nuke_node.sh
* it should work and warn you about how `npm` is deprecated
* now install yarn, e.g.: `brew install yarn`
* run script/nuke_node.sh again
* it should work and you should see silly yarn emoji
  in the output and it should be a lot faster

* the docker changes I made should work and docker should
  build correctly and use yarn.

Change-Id: I4aa31eeae3ecc504634a7c72a1ea0d3396f445e3
Reviewed-on: https://gerrit.instructure.com/102969
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-01 19:39:01 +00:00
Ryan Shaw 43dd721d3a get `gulp rev` to work with `yarn`
Fixes: CNVS-35153

Test plan:
rm -rf node_modules && yarn install && node_modules/.bin/gulp rev
It should work
rm -rf node_modules && npm install && node_modules/.bin/gulp rev
Should also work

Change-Id: I9ac28df95f821e74ee062eca012e247d3f1f01b1
Reviewed-on: https://gerrit.instructure.com/102967
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-23 16:54:55 +00:00
Jon Willesen 9289923ee6 add canvas_offline_course_viewer to package.json
fixes OFFW-104

test plan:
* npm install
* with no offline_web.yml config file, do an offline course export
* should generate a package with a working viewer

Change-Id: I3e100cd1ba722a564f764dd38cd4ca33295de22e
Reviewed-on: https://gerrit.instructure.com/102650
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Cameron Sutter <csutter@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
2017-02-18 00:08:01 +00:00
Ryan Shaw 1145e951c1 eliminate the need to run karma & webpack separately
TL;DR: running JS tests in canvas will be a lot faster & simpler

What you need to know as a developer writing JS in canvas:

Lets say you are working on the “dashboard_cards” feature, just run:
  `npm run jspec-watch spec/javascripts/jsx/dashboard_card`
While you write code and it will have a watcher that catches
any changes and re-runs just the dashboar_card specs if you save any
file that went into it. It should run & reload in less than a few
seconds. You can give it the path to a specific spec file or have it
run an entire directory.

Or, if you are working on something that might touch a lot of stuff, run:
  `npm run test-watch`
and while you are changing stuff, it will run *all* the QUnit specs on
any change. It should only take a couple seconds for webpack to process
the file change and to reload the specs in the browser.

Jenkins can now just run “npm test” for the webpack build. No need to
bundle install then run rake tasks just to run js tests.

This change also starts warning you when you have specs that take a
long time to run (e.g.: https://cl.ly/2i1O3O0J1504). It turns out we
have some *really* slow js specs (like selenium-level slow) so if you
notice a slow spec that you our your team wrote, please fix it.

Longer details:

To test our JS in webpack, we used to
1. run webpack with an env var set so it only does our ember stuff
2. run karma against ember
3. run webpack again against all the rest of the specs canvas
4 run karma again against all the specs in canvas
that took a long time. this change makes it so both the ember
specs and the specs in the rest of canvas run all in the same karma.
it also makes it so karma runs webpack itself. so you don’t need
to run `npm run webpack-test && karma start` to run tests, just
`npm run test` (which is just an alias to `karma start`). it also means
there is now just one watcher (karma) instead of one for both webpack
and karma.

Closes: CNVS-34977

Test plan:
* Jenkins builds should pass
* Try running different variations of the commands up there in the
  description. They should work and be fast-ish.

Change-Id: Ia97f9bfa3677763f218f5f02c9463344f180bc6c
Reviewed-on: https://gerrit.instructure.com/102169
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-17 21:52:05 +00:00
Ryan Shaw 14b9f2df14 ‘require’ axe from node_modules
Change-Id: I472dda47c01502785a4988aa8c6198e030832d36
Reviewed-on: https://gerrit.instructure.com/102168
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-17 19:06:50 +00:00
Ryan Shaw 01f027e2bc Revert "strip out react propTypes in prod webpack build"
this was doing something funky things in the production
webpack build eg: https://cl.ly/3q130H2z0c0u .
I am going to hold off on enabling this untill we have
a chance to really qa it well

This reverts commit 6e5aef277e.

Change-Id: I2f28b7ccc11208fb2fbc799c99aed2f1e69de241
Reviewed-on: https://gerrit.instructure.com/102569
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-17 18:39:03 +00:00
Ryan Shaw bfbaaeca68 update fontfaceobserver & react-modal NPM packages
closes: CNVS-34926

test plan:
* go to a page that has a react modal (like
  theme editor), make sure it works
* make sure the custom font that canvas uses
  loads correctly.

Change-Id: I9c37ddfc6b3338e2ebaacb85cb8cdb81c7f9e21c
Reviewed-on: https://gerrit.instructure.com/101681
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-14 23:25:54 +00:00
Ryan Shaw f2cd4f7c97 update some NPM packages
test plan:
* these are just spec things, if jenkins passes
  they should be fine

Change-Id: I1628ee92f9ccad372692df5b5c599e093c561ca0
Reviewed-on: https://gerrit.instructure.com/101682
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-02-13 15:53:27 +00:00
Ryan Shaw f88f6a80d5 remove 18nliner-handlebars from canvas’s package.json
it is actually loaded from gems/canvas_i18nliner/
which has it’s own package.json so we don’t
need it in canvas’s package.json too.

test plan:
* i18n part of jenkins build should work

Change-Id: I22581bd0f9e5e39d867a6c60cea897bfb893f2ee
Reviewed-on: https://gerrit.instructure.com/101723
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-13 15:34:37 +00:00
Ryan Shaw 32f20ed70d [webpack] add happypack to make build faster
closes: CNVS-31791

test plan:
* automated tests should pass on jenkins
* webpack build should be considerably faster

Change-Id: I3583c92e2bbff5fbbd441853e33057603564601d
Reviewed-on: https://gerrit.instructure.com/100903
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-11 23:36:02 +00:00
Ryan Shaw 84dc36d3e1 handle timezone data loading out-of-band from webpack
fixes:  CNVS-34796

emitting assets for each of these timezones adds a
non-trivial amount of time to the webpack build.
by making it so webpack doesn’t have to do anything
about them, it goes a lot faster since there is just
a lot less work to do.

this commit also uses npm to get `timezone` instead
of a git checkout

test plan:
in requireJS & webpack,
* load a few pages, make sure your timezone data loads
* automated specs should pass

Change-Id: Ice3b7b6d4c7ac53315d5cb238d4213afb9faddc5
Reviewed-on: https://gerrit.instructure.com/101116
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-02-10 23:42:48 +00:00
Ryan Shaw e7d9b1150d remove qunitDependencyLoader now that nothing needs it
closes: CNVS-34770

because the previous commit renamed
‘module’ to ‘qunit.module’ in all our specs,
we don’t need this loader anymore

in an effort to get rid of vendor code that is just
copy/pasted into our repo, this also has us use
npm to get qunit, sinon, and AXE.

test plan:
* because this only touches stuff for specs,
  if js specs pass in both webpack and requireJS,
  this should be good.

Change-Id: I1d1cbf187211ad1d04d775fe4469913b3942d74a
Reviewed-on: https://gerrit.instructure.com/101101
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-02-10 21:07:45 +00:00
Ryan Shaw 6e5aef277e strip out react propTypes in prod webpack build
closes: CNVS-34774

test plan:
* using webpack in prod mode
* look at the javascript sources for some components,
  there shouldn’t be anything in there about PropTypes
* the generated code should be smaller & run faster

Change-Id: I8dede0576835a280aec77dea0e128b1e87ea8c6b
Reviewed-on: https://gerrit.instructure.com/100644
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-02-08 00:12:47 +00:00
Jennifer Stern 8eda359850 Upgrade instructure-ui
Fixes: CNVS-34679, FALCOR-95

Test plan:
- Verify that student name has a focus 'halo' when high contrast mode is
  enabled (in student context tray)
- Verify that the radio inputs aren't squished in IE 11 on the New
enrollment UI form.

Change-Id: I77155c2cd3b8daf42456bbc21128bfb799092a0c
Reviewed-on: https://gerrit.instructure.com/101012
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Jennifer Stern <jstern@instructure.com>
2017-02-07 18:59:26 +00:00
Ryan Shaw 6bdc495373 parallelize the uglify step of webpack prod build
fixes:  CNVS-34725

test plan

* run `npm run webpack-production`
* it should go faster than it used to
* load a page using production webpack files
* it should work

Change-Id: I05d4e3a40f1cad16a1bd8f9e707cc2edea86f91c
Reviewed-on: https://gerrit.instructure.com/101008
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-06 16:10:37 +00:00
Ryan Shaw 3e83e882ef upgrade webpack to 2.2.1 final
closes: CNVS-34726

test plan:
* webpack build should pass

Change-Id: Ie789872dd16a7007239182181670644ed397591e
Reviewed-on: https://gerrit.instructure.com/101003
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-06 15:40:17 +00:00
Jennifer Stern ce82262cad Fix webpack build (update instructure-ui)
To fix this I released a version of instructure-ui (v0.18.2-bugfix.7)
that adds an index.js file to the lib/components directory.

So now if you require `instructure-ui` in webpack it will link to
`node_modules/instructure-ui/lib/components/index.js` and in requirejs
it will link to `node_modules/instructure-ui/dist/instructure-ui.js`.

Change-Id: Ica048ee488af4f55070260b475b759af0eaa4314
Reviewed-on: https://gerrit.instructure.com/100508
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Dan Sasaki
2017-01-26 17:27:19 +00:00
Cameron Matheson a4a9c3e339 Temporary HCM fix for student context cards (upgrade instructure-ui)
fixes FALCOR-56

Test plan:
  * view context cards for a student (they should work)
  * turn on high contrast mode
  * the tray should also be in high-contrast mode

Change-Id: I64287db9304fca20b9e87370a92727fe4ea2f7d9
Reviewed-on: https://gerrit.instructure.com/100059
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Dan Sasaki
2017-01-24 21:30:30 +00:00
Ryan Shaw e9c83d18e7 don’t try to load quiz web worker from a different origin
in webpack, it would try to load the web worker from the
cdn configured in canvas_cdn.yml. it is against browser
security rules to open a web worker on a different origin,
so in production/beta it would not load and the page to take a quiz
would not load at all. It worked in requireJS because
it didn’t actually know to load the worker from the con
and since it just loaded it from the same domain the page
was served from, it did not have that problem.

this fix just inlines the web worker into a blob and
loads it itself, so there is no cross-origin problems
and we don’t have to have a requireJS or webpack plugin
to load web workers. 

also, fix bug where webpack looked for compiled 
version of quiz_taking_police

fixes: CNVS-34349
fixes: CNVS-34386

test plan:

using the CDN setup for dev/testing

in both webpack and requireJS
go to take a quiz,
the stopwatch should tick every second

Change-Id: I31e6ea0cd22d8dff8c8cb46c68e78d3f5c1989c0
Reviewed-on: https://gerrit.instructure.com/99521
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-01-24 00:51:32 +00:00
Ryan Shaw bae0e670da update react-modal dep in package.json
closes: CNVS-33970

the old version of react-modal was using an older version of lodash.
it only needed the _.assign method but with the old version of lodash
it brought in a ton of extra JS. by using this newer version our bundle
size should be noticably smaller and the webpack build time should be
shorter.

test plan:
* go to a page that has a react-modal & make sure it works
e.g.: go to theme editor and open the modal to name the theme

Change-Id: I9b82c1abe2b10a1977bb171c43878ada470400d3
Reviewed-on: https://gerrit.instructure.com/98149
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2017-01-23 15:25:11 +00:00
Clay Diffrient 530fd0ce8e Update eslint/airbnb-eslint-config
This also ignores the doc/ directory and should fix errors
on Code Climate

Test Plan:
  - Things work

Change-Id: I5b970daf19a1cfbd4ff61bed07c4f85d6db31f8f
Reviewed-on: https://gerrit.instructure.com/99888
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-01-18 18:05:09 +00:00
Colleen Palmer 7b74a4cf92 bump Instructure-Icons version
closes: CNVS-34373

Test plan:
- highlight and inspect and icon in canavs that uses the icon font
- change the class to icon-chat, if a chat icon appears it means it's
pulling in the new icons

Change-Id: I6da9e4efa35c3c74c312ddd78546aabbb1a71fdb
Reviewed-on: https://gerrit.instructure.com/99693
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-01-16 22:12:08 +00:00
Edward Schiebel ce821321c9 Replace avatar image cropper with keyboard accessible one
Fixes: CNVS-28306

Test Plan:
- ensure Admin > <your account> > Settings > Enable Profiles
  and User Avatars are checked
- navigate to Account > Profile
- using keyboard:
  - TAB (displays "skip to main content")
  - ENTER (focuses on the main content of the profile page
  - TAB (focuses avatar image)
  - ENTER (displayes Select Profile Picture dialog)
  - TAB 4 times (focuses "choose a picture")
  - ENTER (displays system file open dialog)
  - Select a photo
  - The selected photo and crop-box are displayed and
    have focus
  - Use arrow keys to move the crop box around
  - Use shift-arrow keys to size the crop box
  - TAB twice to focus Save button
  - ENTER closes dialog
  - cropped image should be displayed on the profile page

change history
  - added js spec for the cropper
  - fix require_js config for react-crop

2016-12-13
  - changes needed after react-crop distribution changed
  - break CanvasCropper and CanvasCropperMaker into 2 files
    in response to code review
2016-12-16
  - update the react-crop version
  - set a min size on the cropper (so it can't go negative)
  - update css so image won't overflow its box
  - address eslint warnings
2016-12-21
  - fix merge conflict

note: the .rb file change supports the build. there is no need
      for a corresponding spec

Change-Id: I2b6dc165ed5dc2865f282c35018686dd820fea30
Reviewed-on: https://gerrit.instructure.com/97197
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2017-01-10 18:47:01 +00:00
Clay Diffrient 0ca6f62cb2 Add enzyme testing to Canvas
closes CNVS-33623

Test Plan:
  - Automated tests pass

Change-Id: I0e76082e8dfc2f695717c94819de3999dd23000a
Reviewed-on: https://gerrit.instructure.com/96510
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2017-01-04 20:21:36 +00:00
Ryan Shaw 3e3024b06e [eslint] add eslint-plugin-promise
closes: CNVS-34124

These are it’s default rules:
    "rules": {
        "promise/always-return": "error",
        "promise/no-return-wrap": "error",
        "promise/param-names": "error",
        "promise/catch-or-return": "error",
        "promise/no-native": "off",
        "promise/no-nesting": "warn",
        "promise/no-promise-in-callback": "warn",
        "promise/no-callback-in-promise": "warn",
        "promise/avoid-new": "warn"
    }

the only one I changed was set avoid-new to ignore
because I have noticed that there was a few times
where I really did need/want to make my own promise.
I am open to debate on what others think though

Test Plan:
* the eslint errors on your code that uses promises
  should have the warnings you expect

Change-Id: I46e5f2d1d2ded2dba1e5aeb2ebcf303bcd4c5981
Reviewed-on: https://gerrit.instructure.com/98201
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-01-04 18:21:04 +00:00
Pam Hiett 9329ed9fe7 replace background image icon for bookmarked banks button
Fixes: CNVS-33869

test plan:
- as an admin navigate our main account (not site admin)
- click the "question banks" link from the sub-nav
- the right side "See My Bookmarked Banks" button should
  now have our inst-icon vs the background image
  example: http://www.screencast.com/t/JWZtvXAc0Iu

- if you don't have a question bank... create one so the
  list item view shows the updated bookmark icon there
  as well

note:
- *** this commit also ups the inst-icons version being pulled
  into canvas so i have access to the new remove-bookmark
  icon ***

Change-Id: Icf521299a5bbd9256dabffde08cf5021a9fb4b38
Reviewed-on: https://gerrit.instructure.com/97600
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
Product-Review: Stephen Jensen <sejensen@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
2017-01-04 16:51:13 +00:00
Ryan Shaw e116bb0d90 Webpack: better handling of chunks and cdn stuff
fixes: CNVS-31779 [webpack] bundle file size
test plan:
* using webpack, look at the network panel in
  the chrome developer console.
* the total ammount of javascript loaded for any
  given page should be much less than before this commit
  and about on par with what requireJS loads for the same page.
* use chrome network panel to throttle to "Regular 3G"
* from both a clean cache and a primed cache:
* make sure that the total time to render the page
  is about on par with requireJS

first change: load webpack chunks from CDN

fixes: CNVS-32261

test plan:
* run `npm run webpack-production`
* check your page, it should load js files and chunks
  from the same hostname the page is served from.
* now set a host: in config/canvas_cdn.yml
  (for testing locally, I just set it to http://127.0.0.1:3000,
* restart rails and reload the page, now the scripts and
  chucks should come from that new hostname

second change:include fingerprints in webpack bundle and chunk filenames

closes: CNVS-28628

with this change we don't need to run `gulp rev`
after running webpack and we can load both the bundle
and chunk files safely from the cdn, since they will
have content-based fingerprints so we can tell
browsers to cache them forever. (we set those
http caching headers in lib/canvas/cdn/s3_uploader.rb:53)

test plan:
* for both dev and production
* run `npm run webpack` (or `npm run wepack-production`)
* with a cdn configured in canvas_cdn.yml, run:
  RAILS_ENV=<dev or prod> bundle exec rake canvas:cdn:upload_to_s3
* check to make sure that the page loads the webpack js,
  that there are no errors, and it all came from the cdn

third change: properly handle moment locale & timezone in webpack

test plan:
 (see application_helper_spec.rb)
 * set a non-default user timezone, context timezone
   and locale
* dates should show up in your timezone and and
  the date helper strings should be in your language

better handling of moment custom locales

closes: CNVS-33811

since we now have hatian and maori, we need to do this in
a way that is not just a one-off for maori

test plan:
* set your locale to maori
* in webpack & requireJS make sure dates show up right

Change-Id: I34dbff7d46a1047f9b459d5e1c0d141f435d42fb
Reviewed-on: https://gerrit.instructure.com/95737
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-01-03 22:50:31 +00:00
Ryan Shaw 36e88e2b99 update classnames dep in package.json
closes: CNVS-33969

because canvas was depending on an older version
than what inst-ui was looking for, we were loading
2 copies of classnames onto the page

test plan:
* using webpack, look at the “sources” panel in chrome dev tools,
* find instructure-ui, make sure it doesn’t load it’s own copy
  of classnames

Change-Id: I3850479bc07937ef0bbd9d027aa11a9a826023bc
Reviewed-on: https://gerrit.instructure.com/98150
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-12-21 18:59:32 +00:00
Ryan Shaw 75e5dbbfba update eslint deps in package.json
test plan:
* run node_modules/.bin/eslint app/jsx/*.jsx
* it should work and have the same errors as before

Change-Id: Id8dc82f975808c5a5ac1703f3e9e494e4b453d58
Reviewed-on: https://gerrit.instructure.com/98145
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-12-20 23:06:56 +00:00
Ryan Shaw 7e201d7a50 update build/tooling npm deps in package.json
test plan:
all the builds should pass

Change-Id: I4b35fa25741f0cc065a2580ebfae164037986ce3
Reviewed-on: https://gerrit.instructure.com/98148
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-12-20 20:24:33 +00:00
Clay Diffrient 77501e2688 [eslint] Improve setup for different JS levels
This makes it so eslint handles situations where we don't have
ES2015+ available, while still allowing us to have our own common
rules.

Change-Id: I86b49a32433970afbcc48ef0f6fcdd7301795b63
Reviewed-on: https://gerrit.instructure.com/97872
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-12-16 23:33:40 +00:00
Stephen Jensen 6df9485d51 Version bump for InstIcons in Canvas to 0.3.0
Closes: CNVS-33746

Test Plan:
 - Click around Canvas and ensure that icons are still
   showing properly

Change-Id: Ie7664f6b393b692d7b62b88c0a20b0277890f301
Reviewed-on: https://gerrit.instructure.com/97414
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
2016-12-13 23:11:07 +00:00
Brent Burgoyne c64dded173 add js helper to parse number string for locale
also includes a helper to validate number strings for current locale

closes CNVS-33191

test plan:
- NA (a future commit demonstrating the use of the helper with be
  qa-able)

Change-Id: I1722aad263e611d127317b2f1a3832537742c3fb
Reviewed-on: https://gerrit.instructure.com/96677
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2016-12-13 22:42:18 +00:00
Clay Diffrient c2d6bc3c80 Bump InstUI to version 0.18.2
closes CNVS-33640

Test Plan:
  - Automated tests pass
  - InstUI components currently in Canvas are okay

Change-Id: If36cf170d1b9e75d874c7f482656165e83fb3f85
Reviewed-on: https://gerrit.instructure.com/96610
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-12-12 22:00:40 +00:00
Felix Milea-Ciobanu 5fcdb6d1be add test-watch npm script
goes really well with the jspec script

test plan:
- builds pass

Change-Id: If596d5f1983957eb9862021b8abaaf8f80c747c1
Reviewed-on: https://gerrit.instructure.com/96454
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-12-05 17:59:52 +00:00
Felix Milea-Ciobanu 03e93802fb add npm script that can run specific js specs
example usage: `npm run jspec spec/javascripts/jsx/files`

refs CNVS-33223

test plan:
- current webpack test build should work exactly the same
- `npm run jspec` should build + run all specs
- `npm run jspec path/to/stuff` should build + run only specified
 specs
- should work with both directories and individual files
- `jspec-watch` should watch + build a path, but not run specs

Change-Id: I788dd38a6c69a4c36a1300fcecf43678bc7f5327
Reviewed-on: https://gerrit.instructure.com/94625
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-11-30 18:37:23 +00:00
Colleen Palmer e84bd4dd80 Revert and bring InstIcons into Canvas
closes: CNVS-32953

This commit re-introduces Instructure Icons into Canvas.
Due to the range in aesthetic impact of including both line
and solid icons, the change is expansive and will be refined
in subsequent commits. The purpose of this commit is to:

- Make InstIcons available in Canvas allowing the use of the
  react components

- Replace the current icon font with the new InstIcons font

- Allow for use of both 'Line' and 'Solid' icon variants

- Update the styleguide to reference the InstIcons github
  documentation for examples

- Remove font custom from Canvas

Icons changed to line versions in Canvas:
- icon-compose (view on Dashboard card)
- icon-info (view on global notification)

- Updated icons to be larger for better visibility
  (our old font was using a small font size)

- Updated font-size is now relative vs fixed, so better a11y

Test Plan:

- On compiling, icons in Canvas should now be changed to the
  corresponding Instructure Icons as can be seen here
  http://instructure.github.io/instructure-icons/

- The icon default displaying in Canvas should be solid icons.
  If the variant "icon-Line" is added to an icon's css class,
  it should display as line. For example, in the case of
  <i class="icon-edit"></i>, adding
  <i class="icon-edit icon-Line"></i> would result in a line
  version of the edit icon displaying

- As a developer, you should be able to use InstUI react icons

- The rake task `bundle exec rake icons:compile` should no
  longer exist

- The styleguide should no longer display example icons, but
  should now include a link to the Instructure Icons github
  documentation

Change-Id: I9780332de9fdf937b35caabadc2b2ee615892a43
Reviewed-on: https://gerrit.instructure.com/94175
Reviewed-by: Pam Hiett <phiett@instructure.com>
QA-Review: Dan Sasaki
Tested-by: Jenkins
Product-Review: Kyle Follett <kfollett@instructure.com>
2016-11-29 20:52:54 +00:00
Clay Diffrient 188b711641 spec: Clean up unnecessary ajax requests in tests
This commit also cleans things up a bit to make things more inline
with our current JS style preferences.

Test Plan:
  - Specs pass

Change-Id: Idf1af11b4283844017552df62963a7740bb7f609
Reviewed-on: https://gerrit.instructure.com/95637
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-11-21 15:30:15 +00:00
Clay Diffrient 56019ec813 Make dashcards reorder on drag and drop
NOTE: This commit does not make it so that the data
            persists after refreshes.

closes CNVS-32548

Test Plan:
  - Enable dashboard card reordering feature flag
  - Go to a dashboard with multiple dashcards
  - You should be able to move them around via drag
    and drop.

Change-Id: I66b91b30fd619516558841a6867ef857a33b890a
Reviewed-on: https://gerrit.instructure.com/92616
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-11-18 01:07:15 +00:00
Chris Hart 6ea6cf4d2e Make Lato the default Canvas font
Fixes: CNVS-30278

The product design team wants to standardize
on Lato across all Instructure products. See
JIRA for more information.

With this change, we no longer have to use
font-weight: 300 etc to make the right
weight of Helvetica show up. We can go back
to simply using bold and normal, etc.; so
those rules have been updated in this
commit.

Test plan:
to accurately test this you need to set up your
canvas to use a CDN. there is a dev CDN that ops
has set up for us. you put the settings in
config/canvas_cdn.yml. slack ryan if you need help
setting that up or need to know what the values
are to use.
you also need to edit your config/environments/development.rb
file so it look like this:

config.action_controller.perform_caching = true
ENV['USE_OPTIMIZED_JS'] = 'true'

and then when you make any changes you need to run:
bundle exec rake canvas:compile_assets
bundle exec rake canvas:cdn:upload_to_s3
touch tmp/restart.txt

for the changes to be seen

- This change applies only to new UI. Legacy
  should be unchanged.

- Clear cache and cookies first.

- Go to Canvas. On the first page load only
  you should see a slight shifting of the text
  as Canvas loads the Lato font and falls
  back on the Helvetica system font.

- From that point on, Lato should be
  cached in the browser and load instantly
  when you move between views:
  http://screencast.com/t/hZhUZOhH

- Canvas should still work in all supported
  languages and browsers.

Not yet converted:
- TinyMCE textarea fiekd
- Mobile login

Change-Id: I861e609c01824f60ac38d3fc15e5b960a06e44de
Reviewed-on: https://gerrit.instructure.com/85737
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2016-11-11 22:09:26 +00:00
Jim Simon ece3b72371 Update instructure-ui to 0.17.3
fixes: CNVS-33148

test plan: N/A

Change-Id: I48921605924b1d303b10f670784623605c29fb35
Reviewed-on: https://gerrit.instructure.com/94727
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Jennifer Stern <jstern@instructure.com>
2016-11-09 21:38:09 +00:00
Jeremy Neander d0aa529dc6 purge performance gradebook
This removes the ill-fated React Gradebook.

This commit is effectively a revert of
b9534edd64

closes CNVS-32394

test plan:
* ensure 'Gradebook Performance' is no longer available
* ensure other Gradebooks are still functional
    * Default Gradebook basic happy path
    * Individual Gradebook (SRGB) basic happy path

Change-Id: Ie71ab4dfb17f494c2a7c17a27cd551a84e7efb96
Reviewed-on: https://gerrit.instructure.com/94005
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-11-09 20:05:17 +00:00
Ryan Shaw 64218182cd don't pass frontend build files through babel
since we're on node 6.6 now, we don't need
babel for anything we were using it for in our
frontend build/webpack code that runs on node.
(except for es6 import/export)

Change-Id: I41352fdc8adb06fe1585565f63d808d249f92864
Reviewed-on: https://gerrit.instructure.com/91573
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-11-08 20:29:29 +00:00
Augusto Callejas 2a6e0c3433 Improve accessibility when assigning students
fixes OUT-389

1. Indicate to non-visual users which students are currently assigned to an
assignment when they navigate to the delete label of a button.
2. Customized the aria label associated with the Assign To auto-complete
search field to improve clarity and conciseness.
3. When navigating through assigned students, read the button label first
before reading the delete label.
4. Added an instructional element before reaching the Assign To field that
is spoken to screen reader users that are only using directional keys to
navigate with.

test plan:
 - enable a screen reader
 - open the new assignment page
 - using directional keys only, navigate to the "Assign To" label
 - press the down arrow key and confirm that the screen reader speaks
   "Use this list to remove...". You may need to press the down
   arrow key again to speak the complete message.
 - press the down arrow key and confirm that the first label is read
 - press the down arrow key and confirm that the delete label is read,
   which starts off with "Currently assigned to ... click to remove"
 - starting in the Moderated Grading section, using the tab key, tab
   to the Assign section
 - confirm that when focus is on the delete portion of the Everyone
   element, that the screen reader reads "Currently assigned to ..."
 - press the tab key to navigate to the auto-complete portion of the
   field
 - confirm that the screen reader speaks "Add students by searching ..."

Change-Id: I2be0fd4662bd0d196f27d1dbb59b09edb7be9e3a
Reviewed-on: https://gerrit.instructure.com/93517
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Tested-by: Jenkins
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-11-02 20:08:48 +00:00
Clay Diffrient 774ff31bb4 Add eslint to Canvas
Rollout plan for this:
  1. Add necessary files and plugins to Canvas (this commit)
     - This will do nothing for many people, but those with eslint
       plugins in their editors will now start seeing linting stuff
       show up properly
     - These users can gradually add/remove rules as they see fit or
       where it makes sense.  The default rule set is from Airbnb with
       a few minor modifications to make things less difficult with the
       current codebase.
  2. Turn on warnings in the CI system (this commit + 1-2 months)
     - This would only apply to the diffs of new code
     - This will allow additional feedback from developers that don't
       already lint locally.  Rules can be adjusted as seen fit.
  3. Turn on failures in the CI system (this commit + 3-4 months)
     - Again this will be only for changed code, but at this point will
       start failing builds that don't follow the standards.
     - Changes to the rules can still be made here, but should be less
       frequent than those made in the previous 2 steps.

closes CNVS-32987

Test Plan:
  - Running eslint locally works
  - Editors pick up linting errors when configured properly

Change-Id: I93b7da735b96b472857120418c3c271a9ed6d429
Reviewed-on: https://gerrit.instructure.com/93969
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-11-01 17:05:11 +00:00
Ryan Shaw 354325c8a1 use node_modules wherever possible
closes: CNVS-31787

the only things left in bower are things that
are just not avalable on npm because they are so old.
we'll have to continue using the bower versions of them,
but it's ok since they are mostly old ember stuff
that will be ripped out when we finish our react screenreader gradebook

also:
remove some ember stuff that wasn't being used anymore.
nothing was using this stuff

test plan:

this really does touch a lot of stuff. some things
to check out specifically in the prod/optimized requireJS build:
(load the page, click around to make sure things work)

the screenreader gradebook
client_apps:
  quiz statistics
  quiz event logging

creating a new student group

calendar, try all the views (month/agenda/etc)
gradebook 2

turn on the new course/user search feature for your account
and go to accounts/x and search for a user/course

the new react gradebook

use tinymce on a page, make sure that both the service
and local version of it work

Change-Id: I4322a154d289760ab51b92e34dd7fac808b41ba8
Reviewed-on: https://gerrit.instructure.com/93102
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-11-01 15:14:52 +00:00
Jeremy Neander 4a15ee57e2 upgrade instructure-ui to 0.17.1
closes CNVS-32917

Test Plan:
  - npm install should give version 0.17.1 of instructure-ui package

Change-Id: I737ba7938b7ad75d4731110b1bd599b45db12546
Reviewed-on: https://gerrit.instructure.com/93685
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2016-10-26 17:09:57 +00:00
Simon Williams b5d8758671 Revert "Bring InstIcons into Canvas"
This reverts commit ce771d353b.

fixes CNVS-32874

test plan:
- make sure that old icons are working appropriately, especially with
inst-ui components

Change-Id: If749cec08302b1bd252c0938ad9fd2329e1c1040
Reviewed-on: https://gerrit.instructure.com/93540
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Pierce Arner <pierce@instructure.com>
2016-10-25 18:10:03 +00:00
Landon Wilkins 903c9a0a66 stylelint, refs SD-1603
test plan:
* add an invalid hex code to a scss file
  e.g. _variables.scss:
  color: #YARRRRRRRR
* run stylelint with: `script/stylelint`
* verify the colored output only returns your introduced error

Change-Id: Ia4f2adef3635f34154d50d61249b952a380208bf
Reviewed-on: https://gerrit.instructure.com/92229
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-10-25 00:21:16 +00:00
Clay Diffrient cf3a6c2120 Bump instructure-ui to 0.17
closes CNVS-32778

Test Plan:
  - npm install should give version 0.17.0 of instructure-ui package

Change-Id: I4d88295e3d163f23ac5e8ef72156718a5047c2a3
Reviewed-on: https://gerrit.instructure.com/93209
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-10-24 21:05:00 +00:00
Matt Zabriskie 12a6065b29 Update instructure-ui package
fixes CNVS-32581, CNVS-32619, CNVS-32652

Test Plan:

- npm install should give version 0.16.0 of instructure-ui package

Change-Id: Iea942adf2da251ea06ad19844eee8df21b8fb95b
Reviewed-on: https://gerrit.instructure.com/92784
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
Product-Review: Stephen Jensen <sejensen@instructure.com>
Tested-by: Jenkins
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
2016-10-14 18:44:12 +00:00
Stephen Jensen ce771d353b Bring InstIcons into Canvas
closes: CNVS-29706

This initial commit introduces Instructure Icons into Canvas.
Due to the range in aesthetic impact of including both line
and solid icons, the change is expansive and will be refined
in subsequent commits. The purpose of this commit is to:

- Make InstIcons available in Canvas allowing the use of the
  react components

- Replace the current icon font with the new InstIcons font

- Allow for use of both 'Line' and 'Solid' icon variants

- Update the styleguide to reference the InstIcons github
  documentation for examples

- Remove font custom from Canvas

Test Plan:

- On compiling, icons in Canvas should now be changed to the
  corresponding Instructure Icons as can be seen here
  http://instructure.github.io/instructure-icons/

- The icon default displaying in Canvas should be solid icons.
  If the variant "icon-Line" is added to an icon's css class,
  it should display as line. For example, in the case of
  <i class="icon-edit"></i>, adding
  <i class="icon-edit icon-Line"></i> would result in a line
  version of the edit icon displaying

- As a developer, you should be able to use InstUI react icons

- The rake task `bundle exec rake icons:compile` should no
  longer exist

- The styleguide should no longer display example icons, but
  should now include a link to the Instructure Icons github
  documentation

Change-Id: Id5a2f7be33b8e5bed76867da067309d044b5be06
Reviewed-on: https://gerrit.instructure.com/91014
Tested-by: Jenkins
QA-Review: Pierce Arner <pierce@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
Product-Review: Kyle Follett <kfollett@instructure.com>
2016-10-11 21:43:15 +00:00
Michael Nomitch 55d22fb710 add description of percentiles graph for screenreaders
fixes CNVS-31803

test plan:
  - take a quiz with several students
    and get different scores
  - go to the quiz statistics page
  - with a screenreader go to the chart
    showing the breakdown of scores
    by percentile
  - you get a description of the bars
    in the screenreader (X students in
    percentile Y)

Change-Id: I100577687058d27a9921773e81edc64b3cf1cb87
Reviewed-on: https://gerrit.instructure.com/90642
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-10-06 16:19:22 +00:00
Neil Gupta 95718bd114 Upgrade InstUI to 0.14.4
fixes CNVS-31926

Also note: we no longer want to load all of InstUI at once, and instead
prefer to load components as we need them.

Test plan:
* automated tests pass

Change-Id: Ia3b73bd68c94901da64c432ab88f3b7a1634a77f
Reviewed-on: https://gerrit.instructure.com/90271
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Colleen Palmer <colleen@instructure.com>
2016-09-23 16:18:27 +00:00
Ryan Shaw 96d4ee9af5 polyfill Promise & a few other methods for ie11
closes: CNVS-31621

every other browser supports these features.
this will just make it so we can count on things
like Promise, Object.assign, [].includes etc  (see
FEATURES_TO_POLYFILL at the top of
script/make-ie11-shim.js for full list)

what do people think of this? what do you think of the
approach, I don't want to include a polyfill in the
common bundle and force every other browser to download
this stuff they aren't going to need. but I still want
it to be performant as possible for those using ie11

Is there anything else people think we should polyfill?
the one I thought of is window.fetch, what do others
think about that?

test plan:
* in ie11, load a page in canvas
* open the IE developer console
* type: Promise.resolve().then(function(){console.log('it works')})
* it should log 'it works' to the console
* (that already works in other browsers, but you can
  check to make sure that it still does there too)

Change-Id: Ie9c99a59631a13535903174a5e575427dbfeac4f
Reviewed-on: https://gerrit.instructure.com/89626
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-09-12 19:09:48 +00:00
Clay Diffrient f6d8d67f0a Make karma load source maps from non-karma generated sources
When using webpack, we pack up everything outside of karma and
assuming you've set webpack to generate source maps it doesn't actually
use them.  This makes it so that it does use them so output can
be much better.

Test Plan:
   - Have your environment set up to use webpack
   - Change webpack.test.config.babel.js:23 to be:
         testWebpackConfig.devtool = 'inline-source-map';
   - Comment out lines 64-68 of the same file
   - Run npm run webpack-test-watch to bundle the
     tests
   - Run the specs (doc/testing_javascript.md)
   - Make a test fail... you should see a mapping
     from bundled test file to the actual file.

Change-Id: I650fe995d6aa595d89da5ae614d5407a699e75ec
Reviewed-on: https://gerrit.instructure.com/89822
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-09-08 15:45:25 +00:00
Ryan Shaw f02b43f574 upgrade to node 6
closes: CNVS-29725

this gets everything working on node 6.

As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.

But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta

as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)

if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:

  # place this after nvm initialization!
  autoload -U add-zsh-hook
  load-nvmrc() {
    if [[ -f .nvmrc && -r .nvmrc ]]; then
      nvm use
    elif [[ $(nvm version) != $(nvm version default)  ]]; then
      echo "Reverting to nvm default version"
      nvm use default
    fi
  }
  add-zsh-hook chpwd load-nvmrc
  load-nvmrc

but however you do it, as long as you have node 6.2
installed it should work

test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work

Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 23:37:07 +00:00
Ryan Shaw a22aec3be0 update gglobby npm dep
refs: CNVS-29725

test plan:
* run `node script/xsslint.js` 
* it should work
(this is ran by jenkins so reall if it passes, it is good)

Change-Id: Ib9b68e486c32c91e3c430cea095a628daf51db2b
Reviewed-on: https://gerrit.instructure.com/87181
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 20:19:03 +00:00
Ryan Shaw e9951e5434 upgrade some npm deps to get ready for node 6
fixes: CNVS-30802

these are the npm deps I upgraded as part of my
node 6 commit that should work fine on both node
0.12 and node 6. I am making this change as a separate
commit so you can see exactly which ones only work
on node 6 (or 0.12, or vise-versa) by looking
at the package.json changes in the node 6 commit

test plan:
run npm install
it should work

Change-Id: I7fca4738ad3593caa7512ebb6be55866ea614af3
Reviewed-on: https://gerrit.instructure.com/87028
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ian Hoerner <ian@instructure.com>
2016-08-08 19:15:14 +00:00
Neil Gupta 78dd9dc3d3 Update InstUI
fixes: CNVS-30799

This updates us to the latest inst-ui, which addresses conflicts
instructure-ui.js had with requirejs.

TODO: once the next version of instructure-ui is released,
we should be able to delete public/javascripts/instructure-ui.js
and rename the public/javascripts/InstUI.js sym link to
instructure-ui.js (and update .xssignore and canvas.rake accordingly)

Change-Id: I3fd9f4bac0447c37754f9f85165ad05728672c1f
Reviewed-on: https://gerrit.instructure.com/87050
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2016-08-08 16:38:02 +00:00
Ryan Shaw cfab9316bc move inst-ui from 'dev-dependencies' to prod
fixes: CNVS-30799

...since it is not just needed for our build
tooling, it is actually needed in the actual app
because common.scss @import ../../../node_modules/instructure-ui/dist/instructure-ui
directly. so without having this in the prod
dependencies, it will blow up when someone
tries to preview in the theme editor and at deploy
time when we run brand_configs

test plan:

run these terminal commands:
* rm -rf node_modules
* npm install --production
* node_modules/.bin/brandable_css
those should work.

now open theme editor
make a change
hit preview
it should work

Change-Id: I87e9896e668d16b653e868bd202a807c204f2f95
Reviewed-on: https://gerrit.instructure.com/87027
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-08-05 23:46:53 +00:00
Ryan Shaw 52ebccdf1a move pinned versions of request and tough-cookie to prod dependencies
fixes: CNVS-30588 for reals this time

test plan:
npm install --production should work on node 0.12.x

(the "--production" part is important here, since
it worked before for devDependencies but we want
to specifically test if it works just installing
prod dependencies)

Change-Id: I27d90db87f3be2891a8e04eb413f1cd7f30dd52f
Reviewed-on: https://gerrit.instructure.com/86151
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-07-25 22:59:40 +00:00
Ryan Shaw 0e073abd4f pin exact versions of request and tough-cookie to work on node 0.12
fixes: CNVS-30588


test plan:
npm install should work on node 0.12.x

Change-Id: Ic77bc68c649e14faa7cf89d4378f2520c023374e
Reviewed-on: https://gerrit.instructure.com/86129
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-07-25 21:40:07 +00:00
Neil Gupta eb5f0f6bdc Add support for instructure-ui
Closes CNVS-30471

Test plan:
* Canvas loads

Change-Id: I2e6d76c5f9693acac5c7dbe4decbed2f4557874e
Reviewed-on: https://gerrit.instructure.com/85455
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2016-07-18 22:27:42 +00:00
Clay Diffrient c123a8f481 Add babel-register plugin
This prevents our gulpfile from printing out an error trying to
require babel-register before falling back to babel-core/register.
This is now possible because we are on Babel 6.

closes gh-867

Test Plan:
  - Run compile assets
  - At the end during the 'rev' step, you should not see:
    ```
       Failed to load external module babel-register
       Requiring external module babel-core/register
    ```
  - Instead you should just see:
    ```
       Requiring external module babel-register
    ```

Change-Id: I3168dbdfb733979e762537f40fdb96effbefa328
Reviewed-on: https://gerrit.instructure.com/85571
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-07-18 15:38:55 +00:00
Clay Diffrient ebf63c9a60 Bump Babel to version 6
closes CNVS-29019
closes gh-817

Test Plan:
 - bundle exec rake canvas:compile_assets should compile
   /app/jsx and /specs/javascripts/jsx properly
 - Automated tests should pass
 - Areas of Canvas that use JSX/ES6 should work properly such
   as Moderated Grading, Files, and the new Admin search page

Change-Id: Ic2aefbe98dd65a9b38407a68dc569e19a9e300e2
Reviewed-on: https://gerrit.instructure.com/78232
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-07-15 21:55:10 +00:00
Matthew Sessions 3642fa1942 JS code coverage
Fixes CNVS-30301

Test Plan:
 - Running the js tests locally should generate
   a folder called coverage-js with an index.html
   file that has the coverage information

Change-Id: Ib57b40c60791324d0a1eafab4c541957a2c2e7e7
Reviewed-on: https://gerrit.instructure.com/84839
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2016-07-12 16:06:31 +00:00
Ryan Shaw 92357a7a60 upgrade to karma 1.1.1
this was a blocker for upgrading to node 6 since
karma 0.x has a strict node version requirement
of <=4, so it would not work on node 6 (although, 
ironically, if you forced it it would still work)

closes: CNVS-30308

test plan:
* run `npm install && bundle exec rake js:test`
* it should work
* the jenkins builds should all work


Change-Id: Ifd9ae12347d7901cf2bafee110230699987b2511
Reviewed-on: https://gerrit.instructure.com/84590
Tested-by: Jenkins
Reviewed-by: Matthew Sessions <msessions@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-07-07 21:40:19 +00:00
Ryan Shaw ad7a8ba070 get our scss working on newest node-sass
closes: CNVS-29785

the newest versions of node-sass do not allow
@import inside an @if

also, this:
@if something { $foo: 'bar'}
@else { $foo: 'baz'}
// on this line foo is not supposed to exist,
//but it erroneously did in old node-sass and we relied on it

this blocks us from upgrading to node 6 because the
gcc on the jenkins and job boxes is to old to compile
node-sass 3.4 from source against the v8 in node 6. but
there are prebuilt binaries it can use for node-sass
3.7+, so it doesn't need to compile from source

test plan
* check out this commit
* compile assets
* it should work
* the css it outputs should be exactly the same as before

Change-Id: I797ce68ecc82566401076771784c8be590233e27
Reviewed-on: https://gerrit.instructure.com/81513
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-06-28 20:27:05 +00:00
Ryan Shaw b1cf0ca937 cleanup some js spec code
a couple things:
* our spec matcher was matching spec files in some of our
  bower components and so it tried running those
  tests, which obviously failed
* removed some cruft leftover from the switch from
  testem to karma a long time ago

Change-Id: I61dc400bbfae0a679c698a90c7bcddd4fcf9fecc
Reviewed-on: https://gerrit.instructure.com/77908
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-05-04 20:47:03 +00:00
Ryan Shaw 9dfe5bf055 fix bug caused by node-sass not allowing @import inside @if
fixes: CNVS-28888

by pinning node-sass to 3.4.2 in brandable_css
we avoid the bug introduced in 3.5.1 where
it won't allow us to @import inside an @if

test plan:
* run compile_assets
* css should look the same as before

Change-Id: I437afd60e4dde60e65d03de4deca5a67ef7e3897
Reviewed-on: https://gerrit.instructure.com/77639
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-04-21 21:29:03 +00:00
Ryan Shaw c3386397ef cleaner way to lookup brandable_css fingerprints for webpack
refs: CNVS-27874

TEST PLAN:
 1) run webpack build
 2) should be fast
 3) load the calendar page
 4) all the styles should look good

Change-Id: I28d9205fbf53616ed9264d8393dc617962e43c22
Reviewed-on: https://gerrit.instructure.com/74197
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-04-06 17:03:44 +00:00
Ryan Shaw ad34b40c32 make it so you can use es6 in the webpack config stuff
refs: CNVS-27679

if you name your config files *.config.babel.js
webpack knows to run them through babel. this change
makes it so use es6 stuff in the webpack.config files
(including everything in /frontend_build)

test plan:
run webpack
it should work

Change-Id: I6ceda3386227c30e106339f744f18dc61bbab54b
Reviewed-on: https://gerrit.instructure.com/73241
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-03-11 21:18:43 +00:00
Ethan Vizitei ff9633ffac add phantom js support as an avenue for js test runs
keep it commented for now to be optional

Change-Id: I2b64b11aac72b6da74401e9c8391a844a620c387
Reviewed-on: https://gerrit.instructure.com/72407
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-02 16:58:32 +00:00
Ethan Vizitei b271b5d694 build quiz log auditing w/ web pack
refs CNVS-25916

Use an AMD-rewritten version of old react-router
and expose some of reacts internals that
react-router depends on (named AMD across files
is something web pack does not support), and leave
the other version for the require-js build for now.

Also, add gulp rev as a web pack post build action.

TEST PLAN:
  1) regression check QLA and Quiz Stats
     to make sure reworking their dependencies didn't
     crash everything

Change-Id: Id2b448a334494ebd3d353678742bf07c1b7833eb
Reviewed-on: https://gerrit.instructure.com/69837
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:38 +00:00
Ethan Vizitei 81561784e0 web pack port of quiz statistics
refs CNVS-25916

remove dynamic requirements for env configs,
use separate jsx loader for client apps,
update client app plugin to use old react version,
rewrite selenium spec to be an integration test
rather than executing arbitrary javascript,
and MAJORLY refactor loading patterns of client apps
to avoid sharing code with differences delineated
by opaque require re-writes.

Also moved some code that was in "common" client
app but only used by one actual client app down
into the app that uses it (simplifies dependency
tracing).

TEST PLAN:
 1) make sure quiz statistics still works ok under
    require js build, no behavior should have changed
 2) also make sure quiz log auding works under require-js

Change-Id: I0e5ee3eda9da16e0ad48cf858761735c71df801c
Reviewed-on: https://gerrit.instructure.com/69804
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:19 +00:00
Ethan Vizitei 0a66b7f42a make web pack able to run ember quit
closes CNVS-25792

TEST PLAN: jenkins web pack should get better

Change-Id: Ie2187d069cfd6d055c425038dba24637bf0ded3f
Reviewed-on: https://gerrit.instructure.com/68724
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-11 17:07:10 +00:00
Ethan Vizitei 765507f63e several things to help webpack compile speed
closes CNVS-25714

TEST PLAN:
web pack should compile in like 60 seconds rather than 600

Change-Id: I74716d9cccfd0253693660c0b4ad4368e91b72e7
Reviewed-on: https://gerrit.instructure.com/68497
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-09 19:25:30 +00:00
Simon Williams a1e7f57c56 webpack tests
closes CNVS-24966

change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.

TEST PLAN:
js tests should pass in web pack _and_ requires

Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-24 18:40:58 +00:00