Commit Graph

668 Commits

Author SHA1 Message Date
Ryan Shaw 60e8c8bbdd Clean up yarn.lock
If you ran yarn on master it would create a dirty yarn.lock

Test plan:
* after this is applied, if you run `yarn` it should not make any
  Changes to yarn.lock

Change-Id: I0303e6e9ca0032771b95497df4b39a3e26e2eed3
Reviewed-on: https://gerrit.instructure.com/206700
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-26 16:31:11 +00:00
Ryan Shaw e91e2340fe upgrade React to 16.9.0
note: this will start logging a lot of deprecation warnings from
React about stuff like componentWillMount and componentWillReceiveProps.
Teams should update their code to not use those things so those
Deprecations go away

Test plan:
* automated builds should pass

Change-Id: I42a340dacdb43d410c7246945c025e0eb83220fa
Reviewed-on: https://gerrit.instructure.com/205772
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 23:40:32 +00:00
Ryan Shaw d2a9d5eba7 upgrade immer and immutability-helper npm deps
here are 2->3 changes from immutability-helper
Huge thanks to @jedmao for converting the library to typescript!
New: TypeScript definitions are now generated from TypeScript source. 
meaning they will always be 100% in sync w/ the source code.
New: exported Context class.
Deprecated: stop using const myUpdate = newContext().update and start 
using const myContext = new Context(); myContext.update(...).
Deprecated: stop using update.extend and start using import { extend } 
from 'immutability-helper' or const { extend } = new Context().


test plan:
* the only thing that uses immer is the assignments_2 teacher stuff,
  that should still work
* discussions, gradingPeriods, and the CreateOrUpdateUserModal use
  immutability-helper, those should still all work

Change-Id: If6b62788be5d3929b5a0ddd64e1b63aa09916b84
Reviewed-on: https://gerrit.instructure.com/205773
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:12:52 +00:00
Ed Schiebel 1b1631c694 Add @instructure/uid dependency to canvas
test plan:
  yarn test:karma builds w/o errors

Change-Id: I631dabdf9214e2d44bedaa4f4ff1451fcc0e76b0
Reviewed-on: https://gerrit.instructure.com/206016
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-08-21 16:08:30 +00:00
Ryan Shaw f4e36a93d6 upgrade some NPM dependencies
Change-Id: If2a90959713e292a46c9d5e9c75c89a37f7316b6
Reviewed-on: https://gerrit.instructure.com/205007
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 18:30:44 +00:00
Jon Willesen bd060bc291 start of direct share course selection tray
This includes some general utilities

Note: There is a bug in the instui Tray that mounts the contents of the
Tray twice, which results in multiple fetches for the managed courses.
We're going to ignore this for now since the right fix is to fix Tray
and not work around it.

flag=direct_share
refs ADMIN-2811

test plan:
- On the discussions index page, click on the kabob menu for a
  discussion and choose "Copy To...".
- A tray should open and load a list of the courses you are allowed to
  manage. There is no other functionality in the tray yet.

Change-Id: Ic0f5e841f61cd3cdaef7b681db2907089c561665
Reviewed-on: https://gerrit.instructure.com/204331
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-08-20 16:05:09 +00:00
Ryan Shaw c5f62b811b Upgrade @instructure/media-capture and media-player
Test plan:
* use the media capture stuff from the new RCE
* it should look the same but use instUI 6 components

Change-Id: If5e41b75652898c0d2a4d51eedb4fc437d68f7d2
Reviewed-on: https://gerrit.instructure.com/205695
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 14:43:06 +00:00
Ryan Shaw bf446dd05f Now that i18nliner can understand it, turn back on fragments
The previous commit makes it so i18nliner can understand <> instead of
<React.Fragment>, so this turns back on the eslint rule we had to turn
Off

Test plan:
* run bin/rake i18n:generate_js (or let the Jenkins builds run)
* it should pass

Change-Id: Ia3204cd6c3147eb52ca612adbb3b20b2df8c6921
Reviewed-on: https://gerrit.instructure.com/205378
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 14:06:41 +00:00
Ryan Shaw 1d199b5e2f upgrade eslint & don’t use unique one in canvas-rce
instead of having our own eslint in canvas-rce, and maintaining all
future rules like react hooks and stuff we can just use the same one
that the rest of the repo uses.

test plan:
* cd packages/canvas-rce
* `yarn lint` should run

Change-Id: Idbe8af533f7a19035d1998538d2d6fd1a711f164
Reviewed-on: https://gerrit.instructure.com/204998
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-08-15 17:17:30 +00:00
Cameron Matheson 40b5c13a29 minor apollo update: take 2
Test plan:
  specs pass

flag = none

Change-Id: I8e816e4ff46148b586037aa2b6eb36b9e50a958f
Reviewed-on: https://gerrit.instructure.com/205109
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-14 22:13:15 +00:00
Ryan Shaw ebaf3a0951 Revert "minor apollo update"
whoops, I didn't notice that this was dependent on something
that is not merged yet. I had some stuff that depended on this
so I too-eargly merged it. I'll revert it until we get the
validated apollo stuff figured out

This reverts commit 27b6085218.

Change-Id: Ib6439daa8f26663ecd473bb4bb71f8dda2231eec
Reviewed-on: https://gerrit.instructure.com/205000
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-14 13:43:55 +00:00
Cameron Matheson 27b6085218 minor apollo update
we need to get on an up to date version, but this at least fixes some
bugs i was running into while writing specs for GQL-60

Test plan:
  * pages using graphql still work (assignments2, gradebook, context
    cards)

flag = none

Change-Id: I4b384c3724fc843132c9db34f044cd88aba227bb
Reviewed-on: https://gerrit.instructure.com/204276
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-14 01:38:07 +00:00
Ed Schiebel 6ccad53796 return focus to the status bar buttons
when the kb shortcut dialog or the a11y checker tray close,
return focus to the button that opened it.

closes COREFE-108

test plan:
  - in rce, click on the kb short cutton in the status bar
  - close the kb shortcut dialog
  > expect focus to return to the button
  - repeat for the a11y checker
  - tab until the show-on-focus kb shortcut button above the RCE
    appears, click it, then close the dialog
  > expect focus to return to the button

Change-Id: I27ea79930e643d9908a784fbcb89900918d3be01
Reviewed-on: https://gerrit.instructure.com/204283
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-08-13 16:06:49 +00:00
Ryan Shaw 34f9a944f3 Don’t include regenerator-runtime on account settings
`axios-cache-adapter`’s “browser” field in package.json says to use
A “dist” file that is prebuilt with webpack to handle old browsers
(github.com/RasCarlito/axios-cache-adapter/blob/master/dist/cache.js)
That means it has a copy of `regenerator-runtime` in it for the async
functions it uses. That is wasteful and is bytes that our users 
shouldn’t need to download.

Test plan:
* the CSP stuff on the account settings page should work the same
* but the webpack js bundle should be smaller

Change-Id: I671f2eb60b57c43e002b9a62fd92feb5c96cd00b
Reviewed-on: https://gerrit.instructure.com/204252
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-09 16:57:43 +00:00
Ryan Shaw 644e5bb4f1 rename canvas-supported-browsers to browserslist-config-canvas-lms
this is to get it to work with how browserslist/autoprefixer/babel/
@instructure/ui-babel-preset expect things to work.

We had to change the name because 
https://github.com/browserslist/browserslist#shareable-configs
Says:
For security reasons, external configuration only supports packages that
have the browserslist-config- prefix. npm scoped packages are also 
supported, by naming or prefixing the module with 
@scope/browserslist-config, such as @scope/browserslist-config or 
@scope/browserslist-config-mycompany

And we have to add:
"browserslist": ["extends @instructure/browserslist-config-canvas-lms"],
to all of our package.jsons that use @instructure/ui-babel-preset 
because that by default will use 
"extends @instructure/browserslist-config-instructure—ui" which would
still do all the stuff for IE11

Test plan:
* run `yarn`
* all those errors about browserslist and postcss should not show uo

* look at the code in public/dist for canvas-planner,
* It should not include regenerator-runtime and you should see native
  `async` functions

Change-Id: Ic84c13ac59d58963c12b8365b3068b5da3ee618d
Reviewed-on: https://gerrit.instructure.com/204251
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-08 20:12:31 +00:00
Ryan Shaw d00f74a2d7 Drop IE 11 support
closes: CORE-3175

based on our browser support documentation
(https://community.canvaslms.com/docs/doc-10720) "On August 3, 2019,
Internet Explorer 11 will no longer be supported as a Canvas browser."

and since any code being merged to master now won't hit prod until after
august 3rd, we can safely drop IE11 support now

test plan:
* look at the code generated by webpack
* you should see things like "class" and arrow functions "() => {}"
* if you go to canvas in IE 11, it should not work
* if you go to canvas in the next oldest browsers we support (which
  would probably be Edge 42 or Safari 11) it should still work the same
  as it did before

Change-Id: Ifc7f64902a333fd0f662ff6a68eb8f4353f01130
Reviewed-on: https://gerrit.instructure.com/197827
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-07 14:40:40 +00:00
Ed Schiebel 7e41826748 fix <Select> deprecation in NewCourseModal
Replace Select with CanvasSelect
Replace legacy TextInput with the new TextInput

fixes ADMIN-2771

test plan:
  - go to account courses page, /accounts/self
  - click the "+Course" button
  > expect the 2 TextInputs to accept input
  > expect the subaccount and term selects to work as expected
  > expect some nice screenreader messages as you interact with the
    selects
  > expect the course to be created with the right data
    when clicking on the "Add Course" button
  - try it again, but do something to make it fail (I set a breakpoint
    at courses_controller.rb line 791 and set @course=nil)
  > expect to get an error flash message
  - click on the "details" button
  > expect the details popup to be above the Modal's overlay and you
    can dismiss it.

Change-Id: I8612b086a8812660c82c9d243746ed211deb5a59
Reviewed-on: https://gerrit.instructure.com/202575
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-08-06 17:23:46 +00:00
Ryan Shaw f0858936ab Backport instUI fix to allow themeable w/ `class`es
We made this change in @instructure/ui-themeable in g/203714
but that is for the current master on instUI 6, we need it now even
though we are still on instUI 5 so this will back port it in so we can
use it now.

Test plan:
* Things that use `themeable` should work both with and without the
  “Drop ie11” commit applied.

Specifically:
bin/rspec ./spec/selenium/dashboard/planner/student_planner_assignments_spec.rb:88
Should not fail with
TypeError: Class constructor Yr cannot be invoked without 'new'

Change-Id: I7ef8ef9eda1057badabbb08fcdd6875ad8064e89
Reviewed-on: https://gerrit.instructure.com/203950
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-06 16:07:55 +00:00
Ryan Shaw 10a4516082 Use jsdom 14 instead of 11 in jest tests
Test plan:
* `yarn jest` should pass

Change-Id: I157a55be009bae71e574ed0e9b9ff18f9e2c048b
Reviewed-on: https://gerrit.instructure.com/203860
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-05 20:36:16 +00:00
Ed Schiebel 28ea3000ef Fix Select deprecations with CanvaSelect
this commit add the new CanvasSelect which wraps the new controlled-only
INSTUI Select (single select only) to provide a nearly drop-in
replacement for the deprecated INSTUI Select used in canvas.

This new CanvasSelect is then used in people_search.js and
TimeZoneSelect/index.js to resolve the
deprectation warnings.

changes include an upgrade to ui-select 6.8

closes ADMIN-2775, COREFE-186 COREFE-184

test plan:
  - nav to a course's people page
  - click on the +People button
  > expect the Role and Section selects to work as expected
  - nav to the account's people page
  - click on the pencil icon to the right of a user
  > expect the Time Zone select to show a blank line, then 2 groups
    of time zones
  > expect the select to work as expected
  > expect screenreaders to tell you interesting things as you
    interact with the select

Change-Id: I5dcfb2c1c8ca64071ce9dbf0a194777f10c711cf
Reviewed-on: https://gerrit.instructure.com/202508
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-08-05 19:30:43 +00:00
Ryan Shaw 8ae3033745 Update testing-library to use packages w/ @scoped names
See: 
github.com/testing-library/dom-testing-library/releases/tag/v4.0.0
For the reason behind why the specs had to change to findAllByText

Test plan:
* js tests should pass

Change-Id: Idc5b217a0923cf7d702f94dfd4f3393beaa14a19
Reviewed-on: https://gerrit.instructure.com/202009
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-22 16:26:15 +00:00
Landon Gilbert-Bland ea769fb488 New mocking foundation for A2 student view tests
Utilizing https://www.apollographql.com/docs/graphql-tools/mocking/

Benefits of this new approach:
  - Query, propTypes, and mocked data all exist in the same location, so
    it becomes much easier to modify.
  - You can easily mock data nested deeply in data without needing to
    manually drill down into it.
  - The mocked data comes from a FRD graphql query, so you cannot
    accidently put invalid fields into the testing data (for example,
    null for a string that is marked as not null).
  - Can save complex overrides into reusable pieces (graded submission)

Fixes COMMS-2224

Test Plan:
  - Jenkins passes

Change-Id: Ib6c3c6f3b3c16b8829d89061b41d8a4d308eb0ed
Reviewed-on: https://gerrit.instructure.com/201591
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2019-07-20 23:53:11 +00:00
Ryan Shaw 772d1f6994 don’t count unread_count or dashcard indicators against newRelic load time
closes: CORE-3187

AKA:
Revert "Revert "don’t count unread_count or dashcard indicators 
against newRelic load time""

This reverts commit d754ff5ed1.

Test plan:
* the little badges that show unread discussion counts and stuff
  on each dashcard should work the same as before
* the badge on the global nav that shows how many unread inbox messages
  You have should work the same as before
  * if you have newRelic set up, neither should count against page load
  metrics

Change-Id: I3b869e7fb650f40f16f514db9d8b9f558443db5b
Reviewed-on: https://gerrit.instructure.com/201202
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-16 20:38:06 +00:00
gbeckmann d754ff5ed1 Revert "don’t count unread_count or dashcard indicators against newRelic load time"
This reverts commit aa977ecd2a.

Reverting based on belief that this is surfacing errors in the build:

"something went wrong updating unread count" TypeError: Failed to fetch

Change-Id: I842ad732d75c6ca83f31e140ddf5edb6f10e45fe
Reviewed-on: https://gerrit.instructure.com/201108
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-07-13 01:06:56 +00:00
Ryan Shaw aa977ecd2a don’t count unread_count or dashcard indicators against newRelic load time
closes: CORE-3084

Test plan:
* the little badges that show unread discussion counts and stuff
  on each dashcard should work the same as before
* the badge on the global nav that shows how many unread inbox messages
  You have should work the same as before
* if you have newRelic set up, neither should count against page load
  metrics

Change-Id: I03f81c30223355ce3e1a2632ba17bfd6f1ae658f
Reviewed-on: https://gerrit.instructure.com/197823
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-07-11 22:09:37 +00:00
Ed Schiebel 5e5120e566 Give RCEWrapper onFocus/onBlur handlers
closes ADMIN-2742

there are challanges
- RCEWrapper keeps track of whether it has focus. This is true if
  anything w/in its outermost div is the activeElement
- since the previously active element blurs
  before the new element becomes active. we need a timeout to wait and
  see where focus lands. this is true when:
  - focus moves to a tinymce popup, like a menu
  - focus moves to one of RCE's dialogs or trays
  - the user interacts with content in the CanvasContentTray. This
    is because a new instance of the CCT is created every time it
    renders as the user interacts with it. (An artifact of how it's
    wired into redux).

This also addresses a bug where the html-view textarea was the wrong
size when flipping between rich text and html views.

NOTE: if you close any of the Trays or Modals by typing "esc", it will
blur the RCE. This is a known bug that I'm hoping will be fixed
via INSTUi-2201. If not, then via another CORE ticket

test plan:
  - not necessary, but if you test in assignments2, you'll know it's
    working because the RCE will go away if it loses focus,
    so enable assignments2, create an assignment, then
    edit the assignment (you can't create an a2 assignment yet)
  - insert and edit an external link
  - insert and edit a course image
  - upload an image
  - insert and edit a course document
  - upload a document
  > in each case, expect focus to return to the RCE, and if applicable,
    the yellow indicator box is correctly positioned.
  - in any of the above cases, click on the yellow indicator while it's
    visible
  > expect focus to stay w/in the rce

  resizing:
  - click the "switch to html view" button
  > expect the textarea to fill the avaiable space
  - resize it and click the button to switch back
  > expect the rce to be the same (or really close) size

Change-Id: If85c5644558fbce27530e43bb71c2bdb7e91eb12
Reviewed-on: https://gerrit.instructure.com/199273
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-07-05 21:22:37 +00:00
Aaron Griffin 840cf27953 Support i18n numbers on quizzes edit page
Test Plan:
- Given a quiz in a locale with different number formatting
- Change the points of a question to '1234.5' in that locale
- See it accept and format points correctly on the question and the
  header

Closes QO-442

Change-Id: I75c353716718377bb26c1088a4db58aaa7c8f721
Reviewed-on: https://gerrit.instructure.com/198543
Tested-by: Jenkins
Reviewed-by: Jonathan Holt <jholt@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-06-27 18:05:20 +00:00
Jon Willesen debef8b978 add react-hooks linting and update react dep
Update the react dependency to 16.8 since we're starting to use react
hooks, which requires that version at minimum.

test plan:
- linting still works
- intentionally create a violation of rules-of-hooks. Linting should
  find and report the error.

Change-Id: I0baccd64397b31118b96eb390462acf56daeca96
Reviewed-on: https://gerrit.instructure.com/199053
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-06-26 16:24:49 +00:00
Clay Diffrient 71eb30a096 Update @instructure/canvas-rce-old to 4.1.4
closes CORE-3097

Test Plan:
  - Languages work properly on RCE

Change-Id: I35e0d913ddd229dc2bcd605c2c7ffc0ed2a65a80
Reviewed-on: https://gerrit.instructure.com/198643
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-06-21 20:42:02 +00:00
Clay Diffrient 23050ed475 Update to @instructure/canvas-rce-old@4.1.3
closes CORE-3097

Test Plan:
  - Automated tests pass

Change-Id: If618a2f1c01ab221b74991134b3d91150b557afc
Reviewed-on: https://gerrit.instructure.com/198528
Tested-by: Jenkins
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2019-06-20 22:25:51 +00:00
Cameron Matheson a6faeedf7f upgrade graphiql-explorer
Change-Id: Ie853ea9bbf0dbdbf58b0f0e572ff129ec6922577
Reviewed-on: https://gerrit.instructure.com/196594
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-06-05 20:06:06 +00:00
Ryan Shaw 145bef14d4 Fix docker build running out of js heap memory
Test plan:
* the docker image should pass
* if you want to test locally, run:
  `RAILS_ENV=production bundle exec rake canvas:compile_assets`
* that should work

Change-Id: I800a4ee035ec3f853c924a6f520ae061fccb4b56
Reviewed-on: https://gerrit.instructure.com/195856
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-05-30 19:10:38 +00:00
Ryan Shaw 95275abd5d Speed up $.support checks that were for old IE versions
closes: CORE-3020

Doing these feature detections takes my chrome browser on a fast
MacBookPro 21ms. See: https://cl.ly/868790d66a8f

I hate to actually make any changes here but these are all things
That no browser that we support doesn’t support. And getting a flat
21ms boost on every pageload I think might be worth it.

To see the actual changes, look at this commit on GitHub:
https://github.com/ryankshaw/jquery/commit/dadf794ebc4c4dcf94c344dab7d9

Change-Id: I836f0ac19ae234fc789423d833a20b760fd42dc7
Reviewed-on: https://gerrit.instructure.com/195704
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-05-30 17:01:20 +00:00
Ryan Shaw 3864abfe6d upgrade canvas-rce to instUI 6 and consume it as esModules
closes: CORE-2922 CORE-2951 CORE-2950 CORE-2952

Also, since we are using the new @instructure/ui-icons we can pull
In the latest icons that design wants us to use for the toolbar buttons

test plan:
* canvas-rce build should pass and canvas webpack should consume it
  as a “harmony export”
* check the “text color” button in the toolbar, it should
  Update it’s color to match the color you picked
* the bulleted list icons in the toolbar should use instUI icons
* run `yarn webpack:analyze`, the canvas-rce chunk should be a lot
  Smaller than it was. and everything from @instructure/ui-whatever
  Should be coming from the /es dir.

Change-Id: I13c670bdd174a9bc10aca4a7f9c5bc9208883ac9
Reviewed-on: https://gerrit.instructure.com/192569
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-05-16 20:49:42 +00:00
Ryan Shaw 4944bccb2d upgrade webpack to v4
Closes: CORE-1143

Test plan:
* load canvas in prod mode in a non-English language. Click around
  And make sure everything works
* in prod mode, do a test to compare load time to what’s on beta.
* page load time and js bundle size should be smaller
* click around in the quizzes client apps and the ember grade book
  And make sure those things work

Change-Id: I93c28c4a6d22db95cd1c7e59cd3f5221d46fe1ed
Reviewed-on: https://gerrit.instructure.com/143422
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-05-16 15:59:04 +00:00
Ryan Shaw 00c49d7833 add a “webpack:analyze” command to package.json
This is so other people can generate that webpack chunk webpage that
shows how big all the chunks are and what is in them

Test plan:
* either run script/nuke_node.sh or compile_assets or in some other way,
  make sure your public/javscripts/translations files are up to date
* then run `yarn webpack:analyze`
* it should work for a few minutes then open a page that shows cool
  webpack chunk stats in your browser

Change-Id: Ia070e373d81aaeec2131e8e299f82515cff57fa4
Reviewed-on: https://gerrit.instructure.com/193087
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-05-13 20:21:52 +00:00
Ryan Shaw 3bad0a160b Remove add-module-exports babel plugin & use esModules
Closes: CORE-2868 CORE-2869

This is needed because without
Doing that, our bundle sizes are going to blow up from the things we
Import from InstUI

Test plan:
* the result of a dynamic export will now give you a object grab bag
  That has a “default” property. Not just the thing of whatever the
  “default" export was.
* so to test this, go to some page that does a dynamic import (like
  the dashboard page) and make sure that still works\

* run a prod build
* make sure that translations still work as before

Change-Id: I3dd1b32216052afd5fbc5d6cec40ea18264f65e9
Reviewed-on: https://gerrit.instructure.com/191578
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-05-03 22:49:58 +00:00
Steven Burnett 95474fbf9b add arc media player to canvas
fixes CORE-2871

Test Plan:
- go to a2 student view
- have a video comment added to the submission
- view the comments tab
- notice the new video player

Change-Id: I58a947fb2b5b31dd7fcb1fc63ae582b7e1038201
Reviewed-on: https://gerrit.instructure.com/191671
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-05-02 17:14:40 +00:00
Ryan Shaw cd839b6f90 Revert "Upgrade node-sass since it has fixed bug we needed"
...Because it has NOT fixed the bug we needed it to

Closes: CORE-2817

This reverts commit e7c110f88a.

Test plan:
* open any page in canvas
* in the dev console, type $.flashError(“whatever”)
* the error message that appears should be styled correctly

Change-Id: I748b0f4607f671ba22ec0a38f9422e6179be24ab
Reviewed-on: https://gerrit.instructure.com/191538
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-30 21:33:20 +00:00
Jon Willesen 605fc86ec9 add apollo graphql query validation tools
These tools allow unit tests to validate that the graphql queries being
run using Apollo are valid according to the server's schema. This
includes validating the variables.

This commit includes a fix that the validator found with overrides where
a Section requires a name (String!), but a Group does not (String). To
fix the validation error, we have to have separate names for these
fields and handle the possibility that the group might have a null name.

closes ADMIN-2561

test plan:
- specs pass
- can still display the "Everyone" override (when there are no overrides)
- can still display the "Everyone Else" override

Change-Id: Ic19605e5ee12075e9abb5bb089e0285639957b69
Reviewed-on: https://gerrit.instructure.com/188602
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-04-23 19:51:10 +00:00
Ryan Shaw 25bd35cf79 Load Lato font from google
closes: CORE-2746

THis is an attempt to make loading our Lato font faster for our end
users. From talking to @pam, it is our understanding that at the time
we introduced this, google did not have all the extended latin 
characters, and that is why we served it ourselves.

But now google *does* include the extended latin characters so
it should be fine?

The good thing about loading it from google is that there is more of a
Likelihood that our users will already have this cached.

Also, to be honest, I still think we should just not download a webfont
and rely on system fonts that users already have. But this is my attempt
to try to see if we can make it faster before resorting that. Because I
know design really likes it :)


Test plan:
* the Lato font on pages should show up the same as it did before but
  page
* load speeds should be faster as reported by lighthouse or our real
  user monitoring

Change-Id: Ibcf75c74f569b6b457fe42d3be91cf6006e560fa
Reviewed-on: https://gerrit.instructure.com/188464
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-04-16 21:33:14 +00:00
Ryan Shaw e28bb762a9 Don’t load sanitize-html in the browser
This approach solves the same xss vulnerability, but by doing it a way
we can guarantee that what we are trying to .html() onto the page is
safe (and not just arbitrary user content) instead of having to load the
_huge_ sanitize-html npm package and all of it’s deps
(like postcss, source-map, htmlparser2, buffer, and a bunch of others)
On the frontend so we can use it to sanitize all the untrusted
data-mathml content.

closes: CORE-2748
refs COMMS-1846

Test Plan:
* Go to the calendar, click on a day to add an event, and click on the
  "More Options" button.

* Switch to the html editor, and add the following:

  <img class='equation_image'
  data-mathml='<img src=x onerror=prompt(document.cookie); />'>

* Save the event. Go back to the calendar and click on the newly saved
  event, and notice that you don't get XSS'd

* Create another event in the calendar, and this time add the
  following via the html editor:

  <img class="equation_image" title="(-\infty,\infty)"
  src="/equation_images/(-%255Cinfty%252C%255Cinfty)"
  alt="Infinities: (-\infty,\infty)"
  data-equation-content="(-\infty,\infty)" />

* Save the event, and load it in the calendar. Notice that it still
  properly displays this mathml image properly.

* Test the same calendar event with a screen reader, and notice that
  it is still accessible

Change-Id: I5fc1e17ecfc8576dfeaffacff8efcb08873bdd5e
Reviewed-on: https://gerrit.instructure.com/188609
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-12 20:30:55 +00:00
Ryan Shaw 2b8e4c1c2e don’t include really old timezone data in JS bundle
closes: CORE-2770

we don’t need timezone data from before canvas was created (pre 2011)
or, realistically, 15 years from now. by using this
moment-timezone-data-webpack-plugin we can strip them out of our webpack
bundle and our common vendor JS file will be smaller.

and smaller js bundles = faster page loads

test plan:
* try to think of a compelling reason why we would need to properly
  handle timezone weirdness that is either older than 2011 or more than
  15 years from now
* if you can think of something, then we can’t do this
* run the prod webpack build, the vendor file should be smaller

Change-Id: I1823fb48cc14bc0687f5222d7f4344118825698e
Reviewed-on: https://gerrit.instructure.com/188810
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-04-11 21:32:03 +00:00
Ryan Shaw 72b517b117 add @babel/plugin-transform-react-inline-elements
closes: CORE-2749

Now that we use babel-transform-runtime, we can also do this to improve
performance over the existing React.createElement calls by inlining the
result of what it would have returned.

see https://github.com/facebook/react/issues/3228 for why this improves
runtime perf

so for an example, say you have:
const foo = <div className="bar" style={{color: 'red'}}>The Text</div>

normally babel would transform that to:
var foo = React.createElement("div", {
  className: "bar",
  style: {
    color: 'red'
  }
}, "The Text");


but this will transform it to:
var foo = _jsx("div", {
  className: "bar",
  style: {
    color: 'red'
  }
}, void 0, "The Text");

That React.createElement is a lot more complex and slower at runtime,
This should make things faster at runtime


TEST PLAN:

* bundle sizes should stay the same but js runtime for react “render”ing
  Should be faster in production mode

Change-Id: I075d249b9effd0af1b16b9e35c1ddd27696c6955
Reviewed-on: https://gerrit.instructure.com/188865
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-11 21:01:51 +00:00
Clay Diffrient d237c8634d Bump wsrun to the latest version
Test Plan:
  - All workspaces run their tests on jenkins

Change-Id: I66fa941a11cdd6306a27b5a374af88755d593472
Reviewed-on: https://gerrit.instructure.com/188718
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-04-09 14:33:53 +00:00
Jon Willesen e01c5ddf6c A2: search and sort on teacher view students tab
closes ADMIN-2510

test plan:
- on the students tab of teacher view:
- type in the search field, at least 3 characters
  - the search should happen after a short delay and display results
- the name, score, and submission date columns are sortable in ascending
  and descending order
  - sorting causes another load
- enter less than 3 characters in the search field
  - after a short delay, a message should be displayed about needing
    3 characters
- clearing the search field should go back to original search of all
  students

Change-Id: Ibaaeff175089003a4a5fcbb27db32c9510330e25
Reviewed-on: https://gerrit.instructure.com/186995
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-04-05 20:01:08 +00:00
Ryan Shaw ec693f6edb upgrade tinymce-a11y-cheker to work with tinyMCE 5
Closes: CORE-2727 CORE-2728 CORE-2729

This version works with both 5.x and 4.x of tinymce, so it will be fine
To use for both the old code and the new code

Test plan:
* smoke test to make sure that the a11y checker works just like it used
  to
* in my following commit that upgrades to tinymce 5, you should not see
  Errors about the a11y_checker plugin not working with tinymce 5

Change-Id: I220e79a5c5e04fc589d906adde83ab4c7ebb5794
Reviewed-on: https://gerrit.instructure.com/188187
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-04-04 18:19:29 +00:00
Ryan Shaw 4f97c6df56 remove all the legacy RCE code
closes: CORE-2588 CORE-2591

This completely removes the legacy RCE codepath. So you will need to
Have an https://github.com/instructure/canvas-rce-api running to use
sidebar in any Rich Content Editors.

Test plan:
* smoke test to make sure that the editor and sidebar work as it did
  When you had the RCS feature flag on.
* there should not be any more settings or feature flags around turning
  on the RCS service

Change-Id: I1c3e7f5a45eed5e010d8e425ae561e45f739fd3a
Reviewed-on: https://gerrit.instructure.com/186525
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-04-04 18:19:12 +00:00
Ryan Shaw ed46527652 Upgrade to babel 7 & allow any js file to be themeable
closes: CORE-2699 CORE-2700 UIDEV-99

This commit gets canvas-lms itself upgraded to babel 7. To do that we
also had to upgrade jest to v24. We had already got canvas-rce and
canvas-planner on jest24/babel7 but now this gets everything to babel 7.
so you will see a lot of things removed from yarn.lock since we don’t
don’t have to have different versions of everything for babel and jest

The other major thing this does is make it so any JS file in canvas
can become an @instructure/ui-themeable themeable component. This means
you no longer should have to put your css in app/stylesheets for any new
react components that you are writing.

Test plan:
1. Make sure that the perf of `yarn build:js` is on-par with what it was
   before. We pass everything through the themeable babel transform now
   so there is a chance it is slower. If it is majorly slower, we’ll have
   to figure something out.
2. run a production weback build. The common (or any bundle for that
   matter should get output exactly the same as it did before)

things to manually qa check:
* in a NODE_ENV=production enviornment, go to
  /accounts/site_admin/developer_keys
* click the "+ Developer Key" button, it should open the modal.
  (there are selenium tests that do this, but it was one thing that had
  to be fixed to get jenkins to pass)

* on a course that is set up as a master course, click on the thing that
  opens the blueprint courses tray.
* verify that when you click "Associations" and "Sync History" links in
  that tray, that they dynamically load the webpack chunk for the
  modal contents for that thing and then the modal is shown
  (again, there are selenium specs that test that exact thing but it
  is always good to manually test it too)

Change-Id: I802584228962b54480a500f8fe422f45c2dcac4c
Reviewed-on: https://gerrit.instructure.com/183965
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-02 14:59:20 +00:00
Jeremy Neander acbf5f6b56 spec: [ci-coverage] increase limits for jest coverage
Change-Id: I52bfa14af7caa1c71449546c50b07d13d036b47a
Reviewed-on: https://gerrit.instructure.com/187716
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2019-03-30 21:09:32 +00:00
Clay Diffrient b709adbec9 Bump @instructure/canvas-rce-old to 4.1.2
closes CORE-2712

Test Plan:
  - Automated tests pass

Change-Id: I7ea688ed7fba1212f74676a0f52784e32b80baae
Reviewed-on: https://gerrit.instructure.com/187345
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-28 18:40:43 +00:00
Ryan Shaw 8f26727921 relax node version req so it works w/ docker
Test plan:
* if you rebuild your docker image it shouldn’t complain about
  A node version that is not compatible with this module

Change-Id: Ieef58139be7a913a9aa3b5156937e01752dd1537
Reviewed-on: https://gerrit.instructure.com/186683
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-25 15:19:31 +00:00
Clay Diffrient 2561dd8a2f Switch to using @instructure/canvas-rce-old
closes CORE-2587

Test Plan:
  - Automated tests pass
  - RCE instances work

Change-Id: Ia128443f5929898937848587a83a853e36b5562d
Reviewed-on: https://gerrit.instructure.com/186624
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-22 23:11:36 +00:00
Clay Diffrient ade362e515 Bump to Node 10
closes CORE-2329

There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.

Test Plan:
  - check to make sure that the assignments 2 availability dates
    component produces markup exactly as it did before
  - Automated tests pass
  - Build canvas locally, everything passes.
  - Build canvas with docker, everything passes.

Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-22 17:29:36 +00:00
Steven Burnett 004ac8108c add media player to submission comments
fixes COMMS-1867

Test Plan:
- In old assignments/submission works flow
  add a couple comments that are either video
  only or audio only
- in A2 as a student visit the comments tab
- notice the videos show up in the new player
  and work as expected

Change-Id: Ibbb87dd6e264fe49431045e3365771b21111134c
Reviewed-on: https://gerrit.instructure.com/185633
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-03-22 16:57:45 +00:00
Ryan Shaw 1f02d86f68 Upgrade canvas-planner & rce to not use ui-presets
This gets canvas planner and canvas-rce on babel 7, which is a 
prerequisite to canvas doing the same. Also, by not depending on the
Kitchen sink of ui-presets, it cleans a ton of unused stuff from our
node_modules/yarn.lock. It was originally 2 different commits but
in order to get the yarn.lock right, we have to do them all as one.

This also made it so we needed to have less “resolutions” in our
package.json since the newer versions of those things work fine with
the newer version of babel

So there are 2 test plan areas:

1. Canvas-planner
Closes:  CORE-2575

Test plan:
* smoke test to make sure everything in canvas-planner still works/looks
  like it used to in the canvas ui
* make sure the translation task (yarn check-transifex) still works

canvas-rce: upgrade to babel 7 & @instructure/ui-babel-preset

2. canvas-rce
Closes: CORE-2576

Test plan:
* smoke test the RCE editor
  * theming should still work/look exactly as before
* make sure all the various build tasks (eg yarn test, test:coverage,
  debug, lint, extract, etc) all still work as before

Change-Id: Id896687e3905f4df4627b181cad3f67ffe4417a5
Reviewed-on: https://gerrit.instructure.com/183877
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-18 20:48:42 +00:00
Jon Willesen 60df2bed3a fix jest tests timing out in jenkins
Change-Id: I594d05c5375b20d9eff78487c1a84023ad65e438
Reviewed-on: https://gerrit.instructure.com/184792
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-12 14:48:51 +00:00
Jeremy Neander 47d2b83f9f update qs dependency
test plan:
 * Verify Jenkins passes?

Change-Id: If472d2f898e4241d0d10dfd7f1ca5094ecf9d811
Reviewed-on: https://gerrit.instructure.com/184039
Tested-by: Jenkins
Reviewed-by: KC Naegle <knaegle@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2019-03-06 19:07:48 +00:00
Ryan Shaw e7c110f88a Upgrade node-sass since it has fixed bug we needed
Since node-sass has fixed the bug that was causing this issue, we can
let it upgrade like normal and don’t need to pin it to a specific
version.

refs: SIS-3125, COMMS-1328
Also see: g/157921


Test plan:

QA:
* go to courses/x/assignments
* add a new assignment group
* the green little notification that appears should be styled correctly,
  Exactly as before

DEV:
* ensure that the output from this code in g_instructure.scss:
  …
  li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
    …

doesn’t erroneously get output as:
  ...
}

Change-Id: I0bd7a42ee4026faea7327270df7413036f77c809
Reviewed-on: https://gerrit.instructure.com/183688
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
2019-03-05 22:44:07 +00:00
Brent Burgoyne 97e4ed3ac0 make inspect-process an optional dependency
Change-Id: If62f0601df401e2407a0a606a75c230d1225b205
Reviewed-on: https://gerrit.instructure.com/183822
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-03-05 16:57:27 +00:00
Ed Schiebel 984088748f Update assignment as it's edited
closes ADMIN-2343

test plan:
  - load an assignment in the A2 teacher view, add #edit to the url and
    refresh the page
  - change each field on the page (modules, group, name, points,
    description, submission type, attempts allowed. others are not
    wired up yet since the UI for these either isn't built yet, or has
    changed recently)
  > expect the Cancel/Save/Publish foot er to appear. buttons on the
    right
  > on clicking cancel, expect the changed value(s) to revert and the footer to disappear
  > on clicking save, expect the footer to disappear
  > on clicking publish, if previously unpublished expect footer to
    disappear and the toggle to flip to published
  - flip the publish toggle
  > expect the footer _not_ to appear
  - flip to rtl
  > expect the footer buttons to be on the left, even in Edge
  - enter an invalid value for Points
  > expect an error message, and for the field to remain in edit mode
  - delete the assignment's name and TAB
  > expect an error message that the name is required

Disabling the Save and Publish buttons when there are invalid fields on
the page is left to ADMIN-2443

Change-Id: I016af6dc6e0e18d9aed1c364a328f9107a4d2762
Reviewed-on: https://gerrit.instructure.com/180831
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-02-26 18:35:10 +00:00
Brent Burgoyne d1be7c5d27 make test:jest:debug open dev tools automatically
Change-Id: Ie98f6055f848a4605b4f3276a403f05d345ae2a7
Reviewed-on: https://gerrit.instructure.com/182603
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-02-25 17:57:42 +00:00
Brent Burgoyne 96315b8626 support testing coffeescript with jest
Change-Id: I540ad44c033e489ff49c251256263d547ca258cd
Reviewed-on: https://gerrit.instructure.com/182600
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-02-25 17:57:15 +00:00
Ed Schiebel 0f6321312c Add graphiql-explorer to canvas' graphiql instance
The graphiql-explorer makes it easy to explore the schema and build
queries simply by checking the boxes next to fields from the schema

test plan:
  - /graphiql still works as expected, but includes the explorer panel
  - canvas features that leverage graphql still work as expected
    (since the version of the graphql js client was updated)

Change-Id: Ief625c6fb59e4e32e23a177f3b566aae271ab108
Reviewed-on: https://gerrit.instructure.com/181586
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-02-15 16:42:12 +00:00
Ed Schiebel 0a3cc60ca7 upgrade instUI to 5.41.1
test plan:
  - tests pass and everything still works

Change-Id: I73540f1b5e4647c19f3446ce558bce7e4dfde684
Reviewed-on: https://gerrit.instructure.com/180736
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-02-09 15:52:58 +00:00
Steven Burnett 37cc468cb9 dynamic import comments
refs COMMS-1844

Test Plan:
- Click on comments on an A2 student view
- notice there is a loading indicator then
  the comments load
Change-Id: I43ed778b826153b5cb4e58b9365a0016dec10897
Reviewed-on: https://gerrit.instructure.com/180618
Tested-by: Jenkins
Reviewed-by: Aaron Hsu <ahsu@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-02-06 20:36:20 +00:00
Ed Schiebel 3b006a6fc1 Make A2 header content editable
waiting on an instui release. without it
  1. the Points edit has the wrong font size
  2. you cannot delete a module

closes ADMIN-2303

test plan:
  - create an assignment, open it, click the assignments 2 button,
    then add #edit to the url and refresh (this forces the assignment
     into edit mode)
  > expect the assignment type to be "Assignment" and to be editable
    - on selecting any value other than "Assignment", expect to be
      sent to the corresponding page in canvas after confirmation
  > expect the correct module(s) to be selected, and to be editable
    - expect to be able to select > 1 module
    - when all modules are deleted, expect th "No Module Assigned"
      placeholder
  > expect the correct assignment group to be selected, and to be
    editable
  > expect the assignment name to be correct and editable
  - edit and delete the name
  > expect a "name is required" message
  > expect the points to be correct and editable
    - entering anything that's not a number should result in an
      error message

Change-Id: Ief36b01d7f5380f16d3e76b7afeb7d7d8e38b3bc
Reviewed-on: https://gerrit.instructure.com/176293
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-02-05 15:47:27 +00:00
Ed Schiebel 9bb68cb4a7 Add override details to teacher view
closes ADMIN-1510

This change includes some code to flip some of the elements into edit
mode, but that's not part of this ticket (though if you want to see
it, add #edit to the URL)

test plan:
  - have an assignment with some submission types, specified allowed
    filename extensions, due, lock, unlock dates
  - load /courses/:course_id/assignments/:assignmen_id?assignments_2=true
  - click the ">" to expand the override summary to see the details
  > expect the data to match your assignment

notes:
  - "score to keep" and submission requirements are hard-coded for now
    until we get the data
  - the attempts input only appears when attempts allowed is limited
    (e.g. non null)
  - Submission Requirement only appears when there are > 1
    submission types
  - the UI mostly matches the mockup. Mary's design is changing, so
    it may not be 100% exact.

Change-Id: Ia385ec7880e3d834658d412a4c7ac5afc9091fac
Reviewed-on: https://gerrit.instructure.com/175098
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
2019-02-01 19:22:57 +00:00
Jon Willesen d82b5fafe6 A2: implement delete button
closes ADMIN-2233

test plan:
- click the delete button which will open a confirmation dialog that
  roughly matches the design
- a11y for the dialog should make sense
- the close button should dismiss the dialog with no effect
- the cancel button should dismiss the dialog with no effect
- the delete button should start a delete operation
- when the delete operation completes, you should be redirected to the
  assignment index screen with a message indicating the assignment has
  been deleted
- if your user does not have permission to delete the assignment, or
  some other error occurs, then the in-development error screen should
  be shown

Change-Id: I0c3304360d3c389296bd0910d02d8215bdb0ac9e
Reviewed-on: https://gerrit.instructure.com/177754
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-01-30 22:23:46 +00:00
Landon Gilbert-Bland 466afa70be Fix XSS in calander
Fixes COMMS-1846

Test Plan:
  * Go to the calendar, click on a day to add an event, and click on the
    "More Options" button.

  * Switch to the html editor, and add the following:

    <img class='equation_image'
    data-mathml='<img src=x onerror=prompt(document.cookie); />'>

  * Save the event. Go back to the calendar and click on the newly saved
    event, and notice that you don't get XSS'd

  * Create another event in the calendar, and this time add the
    following via the html editor:

    <img class="equation_image" title="(-\infty,\infty)"
    src="/equation_images/(-%255Cinfty%252C%255Cinfty)"
    alt="Infinities: (-\infty,\infty)"
    data-equation-content="(-\infty,\infty)" />

  * Save the event, and load it in the calendar. Notice that it still
    properly displays this mathml image properly.

  * Test the same calendar event with a screen reader, and notice that
    it is still accessible

Change-Id: If0f1ac8ad93f04ececb7aa2f7ef221204b1ce14f
Reviewed-on: https://gerrit.instructure.com/179783
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-01-30 16:39:43 +00:00
Clay Diffrient 8fcb27bc5d Add sub-account settings for CSP
closes CORE-2253

Test Plan:
  - Enable CSP settings
  - Go to a sub-account's settings page
  - You should see a security tab
  - Go to the security tab
  - CSP information should be displayed including a toggle
    between Off, Inherited, and On.
  - Behavior should match the description shown on the page.

Change-Id: If2a485cc3712f6af8d266401da67d4deaa845696
Reviewed-on: https://gerrit.instructure.com/177971
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-01-23 14:43:41 +00:00
Clay Diffrient 3938ab7550 Add CSP whitelist to the security settings
closes CORE-2109

Test Plan:
  - Enable the Content Security Policy feature flag
  - Go to account settings, security tab
  - Use the Add Domain form to add a domain
  - It should appear on the whitelist
  - Flip the CSP switch to enabled

Change-Id: Iaea578c52e9b8bb6541a4e13edc6a1702e907cdf
Reviewed-on: https://gerrit.instructure.com/174980
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2019-01-18 23:10:26 +00:00
Clay Diffrient 66517541a5 Bump a11y checker to 1.11.0
closes CORE-2323
refs CORE-2115
refs CORE-2097

Test Plan:
  - Add something to an RCE instance that has a11y errors
  - Run the a11y checker
  - You should see errors show up.
  - Click the (?) hint button
  - The tooltip should contain a link for most rules
    that is descriptive (e.g, learn more about xyz)
  - The link should also be underlined

Change-Id: I1930f855d05ffa71f7e27c2943503371e6224175
Reviewed-on: https://gerrit.instructure.com/173487
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-01-15 21:05:07 +00:00
Clay Diffrient 6bccbbbc53 Update and remove duplicate version of lint-staged
Test Plan:
  - Automated tests pass

Change-Id: I905418abde9ce75b3d7f1b9e878faeaf7e288b9e
Reviewed-on: https://gerrit.instructure.com/177176
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-01-08 20:20:30 +00:00
Jeremy Neander 7144c8dce1 spec: add fetch polyfill for jsdom
Because JSDOM has … needs.

Change-Id: I3b929d96dc208c6b32802bbfa806cc22adff7fdf
Reviewed-on: https://gerrit.instructure.com/177129
Tested-by: Jenkins
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
2019-01-08 17:16:31 +00:00
Landon Gilbert-Bland a6a40b99bc Display multiple modules in A2 student view
This also adds support for apollo-link-state. We are using this to move
data from the `ENV` into our apollo query results, to keep a single
source of truth and easier unit tests.

If there are more then two modules that an assignment belongs to
(which is abnormal) we are only rendering the first two modules with an
additional link to the modules page, indicating that there are more
modules this assignment belongs to.

Fixes COMMS-1800

Test Plan:
  - Create an assignment, and add it to four modules
  - Navigate to the assignment as a student
  - Notice that 2 of the four modules are displayed in the header

Change-Id: I9b797486ba56c8b827e5f76114c5a08d2f969f41
Reviewed-on: https://gerrit.instructure.com/174837
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-12-12 19:29:22 +00:00
Clay Diffrient 439af4080f Update redux-logger to 3.0.6
test plan:
      - automated tests pass

Change-Id: Iaf8b223e7c60a43f5b4e10561d5d66643a312992
Reviewed-on: https://gerrit.instructure.com/173817
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-12-05 18:29:35 +00:00
Clay Diffrient 41e58c5712 Update redux-thunk to 2.3.0
test plan:
      - automated tests pass

Change-Id: I3417cc46a9581dd4fe72fc96f8c8e995b90303fd
Reviewed-on: https://gerrit.instructure.com/173816
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-12-05 18:29:23 +00:00
Clay Diffrient 5a789aff54 Update redux-actions to 2.6.4
test plan:
      - automated tests pass

Change-Id: I82969f661e78370c8a2f9035c2bca7d2397fb377
Reviewed-on: https://gerrit.instructure.com/173815
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-12-05 18:29:11 +00:00
Clay Diffrient 4edcef8795 Update react-redux to 5.1.1
test plan:
      - automated tests pass

Change-Id: I6c1034ec8f443d10d39b5b551c1b7207e5191411
Reviewed-on: https://gerrit.instructure.com/173814
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-12-05 18:28:59 +00:00
Clay Diffrient 7d02e89263 Update redux to 4.0.1
test plan:
  - automated tests pass

Change-Id: I00260366f32e0407eaf4277b5b2d26d9896915ac
Reviewed-on: https://gerrit.instructure.com/173813
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-12-05 18:28:44 +00:00
Clay Diffrient 1a4d8f39a9 Extract jest-moxios-utils to its own package
closes CORE-2217

Test Plan:
  - Automated tests pass

Change-Id: Icba5c61344e22e8a8e4929b9133c9a2b89a80ef9
Reviewed-on: https://gerrit.instructure.com/174135
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-12-04 22:38:28 +00:00
Cameron Matheson 1506e683c7 use apollo client instead of apollo boost
This prepares us for using apollo's instrospection fragment matcher
(which isn't supported with -boost).

Test plan:
  pages that use graphql still work

refs GQL-17

Change-Id: Ib6af304855e6c0e23b598344ac1d30f4d4aa03a5
Reviewed-on: https://gerrit.instructure.com/172936
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-12-03 06:43:30 +00:00
Brent Burgoyne b9174e5f76 fix pre-commit hook with unfixable eslint error
test plan:
- have a local yarn install
- add an unfixable lint error (unused var) to a file in the prettier
  whitelist
- try to commit the file
- it should not try to run in docker after the lint error

Change-Id: If1fcfc6693be26c6f6fdddb8cfa4c54a73512ebe
Reviewed-on: https://gerrit.instructure.com/173469
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2018-11-27 23:28:12 +00:00
Clay Diffrient 93a6d18046 Add precommit hook for auto fixing files
This only affects javascript files and only affects things
from the prettier whitelist

This will run slowly if you don't have node_modules installed
locally (e.g., in Docker), but it will gladly attempt to
run things in Docker for you.

This adds a new githook_installer image that will install
the githook whenever a docker-compose up happens in the
repo.  It will also install the hook whenever a `yarn`
occurs locally (as a postinstall hook).

This commit should also not fail things.  For example
having unused variables is an ESLint error, but it isn't
autofixable.  It will log the error, but will otherwise
continue.  However, it will make this pretty with prettier
as well as fix any other autofixable ESLint errors.

closes CORE-2118

Test Plan:
  - Run `yarn`
  - Add some semicolons to something from the whitelist
  - git add that file
  - git commit and it will strip semicolons
  - In a dockerized Canvas:
     - docker-compose up
     - Add semicolons to a file
     - git add that file
     - git commit, it will take forever (~60s)
     - It should have stripped out semicolons

Change-Id: Id9198aa008808e898f29acb9ed64dd14ff843222
Reviewed-on: https://gerrit.instructure.com/171510
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-11-27 21:07:31 +00:00
Steven Burnett ce931bd2b8 get basic assignment data for students
fixes COMMS-1764

Test Plan:
- Visit an individual assignment page as a student
- notice your data is no longer mocked and shows correctly

Change-Id: I7810db47fa81c6120285359d754e1d9465ad3fe5
Reviewed-on: https://gerrit.instructure.com/173177
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-11-26 22:28:39 +00:00
Clay Diffrient 36ff81bcd8 Remove npm-run-all because it is unused
Test Plan:
  - Automated tests pass

Change-Id: Iefc64451fc20680afd9a77c594eba5df677cf66e
Reviewed-on: https://gerrit.instructure.com/173299
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-26 22:26:33 +00:00
Gary Mei 58321400d2 bump npm-run-all version
Change-Id: Ieae7ac480124e52050c79ca83c99a7fe698c48d5
Reviewed-on: https://gerrit.instructure.com/173262
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Gary Mei <gmei@instructure.com>
2018-11-26 19:03:17 +00:00
Landon Gilbert-Bland f019c9a045 upgrade instUI to 5.33.0
Refs COMMS-1522

Test Plan:
  * Jenkins passes

Change-Id: I6fd52c80375d10b6cbb69c1146004a9daaf5442c
Reviewed-on: https://gerrit.instructure.com/172594
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-11-16 22:25:34 +00:00
Jon Willesen 1898f2aa06 A2: teacher toolbox and code reorg
This is the first stab at implementing the teacher toolbox.

It also moves code toward the desired organization and frameworks.

closes ADMIN-1507

test plan:
- assignments 2 teacher view shows data on the right side of the header
  -> "X" is used as a placeholder value for values we don't have yet
- "X to grade" goes to the speedgrader for the assignment
- clicking on "Published" toggle shows a placeholder alert for the
  action
- clicking on "X unsubmitted" shows a placeholder alert for the action

Change-Id: I45f51789e2c3722f14482ab57d8d12244cff31b4
Reviewed-on: https://gerrit.instructure.com/170766
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-11-12 22:09:31 +00:00
Clay Diffrient 02fde29575 Fix up xsslint to work
This also moves us temporarily to a git branch version of xsslint until the
official package gets a new release with the appropriate fixes in place.

closes CORE-2125

Test Plan:
  - Automated tests pass
  - xsslint output shows that it linted many files

Change-Id: Id87e872dd2b7a08f11c0ddfaebdfc3f44e86c724
Reviewed-on: https://gerrit.instructure.com/171702
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-12 16:42:28 +00:00
Clay Diffrient 292b50a49b Update a11y checker to 1.9.2
closes CORE-1972

Test Plan:
  - Open the a11y checker in IE 11
  - It should open and work

Change-Id: Iacfef1e90e255ddf795bb84de430af4f4c39624d
Reviewed-on: https://gerrit.instructure.com/171292
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-07 22:46:32 +00:00
Clay Diffrient 58ab36e5d8 ESLint standardization
This commit introduces a better more reasonable ESLint configuration.
It removes all concerns with styling in favor of using prettier to handle
those things.

closes CORE-2096

Test Plan:
  - ESLint works

Change-Id: I50b90b7191b576bce4817d885d14f18c4c72d208
Reviewed-on: https://gerrit.instructure.com/170874
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-06 17:46:21 +00:00
Derek Bender df371fb19c turn off webpack progress for less noisy builds
This patchset also enables linting of webpack development to ensure es6
compatability. Before this patchset, gulp was invoked with an ampersand
to make it a background process. However since it only takes a few
seconds to run, it's success messages would be interlaced with webpack's
output. This reads rather odd in our logs. Since gulp is a low-churn
tool in canvas, let's mute stdout but still display stderr if an error
should appear.

Change-Id: I48846758e839480c9bc5779bfe64201e90713e2b
Reviewed-on: https://gerrit.instructure.com/170833
Tested-by: Jenkins
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2018-11-05 16:33:29 +00:00
Jeremy Neander be2db93ffe track anonymous grading in the audit trail ui
closes GRADE-1668

test plan:
 A. Setup
    1. Create an assignment
       * With moderated grading
       * With anonymous grading
       * Worth 10 points
       * Three graders (A, B, and C)
       * Teachers as final grader (not admin)
       * Assigned to only one or two students
          * just for less work in QA

    2. As each student, submit to the assignment

    3. As Grader A:
       a. Assign provisional grades
       b. Maybe leave a submission comment or two

    4. As the teacher, disable anonymous grading
       * The related event will have a warning badge

    5. As Grader B:
       a. Assign provisional grades
       b. Maybe leave a submission comment or two
       * The related events will have warning badges

    6. As the teacher, re-enable anonymous grading

    7. As Grader C:
       a. Assign provisional grades
       b. Maybe leave a submission comment or two

    8. As the final grader:
       a. Visit the moderation page
       b. Select provisional grades
       c. Post grades
       d. Display grades to students

 B. Verify
    1. Log in as a user with "view audit trail" permission (admin)
    2. Open the assignment in SpeedGrader
    3. Open the assessment audit trail

    4. For Grader A
       a. Expand the user event group for Grader A
       b. Verify there is no non-anonymous warning icon to the side of
          the user name
       c. Verify there are no non-anonymous warning badges to the side
          of the user's grading actions

    5. For Grader B
       a. Expand the user event group for Grader B
       b. Verify there is a non-anonymous warning icon to the side of
          the user name
       c. Verify the non-anonymous warning icon triggers a sensible
          tooltip
       d. Verify there are some non-anonymous warning badges to the side
          of the user's grading actions
       e. Verify the badged icons trigger sensible tooltips

    6. For Grader C
       a. Expand the user event group for Grader C
       b. Verify there is no non-anonymous warning icon to the side of
          the user name
       c. Verify there are no non-anonymous warning badges to the side
          of the user's grading actions

    7. For the teacher
       a. Expand the user event group for the teacher
       b. Verify there is a non-anonymous warning icon to the side
          of the user name
       c. Verify there is a non-anonymous warning badge to the side
          side of the user's action disabling anonymous grading
       d. Verify there are no non-anonymous warning badges to the side
          of the user's moderation actions (after enabling anonymous)

Change-Id: I2e675b84dc3e6b59e3111ed39b7a814f38f19f5c
Reviewed-on: https://gerrit.instructure.com/170684
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-11-05 16:19:55 +00:00
Brent Burgoyne 23bd3885ff don't pin yarn to a specific version
at this point the lock file should be stable enough to relax the
exact version requirement.

Change-Id: If26e59e6fdf938458507e8a1d16def5bda0971b7
Reviewed-on: https://gerrit.instructure.com/170635
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-11-01 16:55:58 +00:00
Clay Diffrient 6764aa5cd2 Bump react to 16.6
closes CORE-2037

Change-Id: I1c00623f789a3a5e377fb0529144a6ebd84a1546
Reviewed-on: https://gerrit.instructure.com/169535
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-10-29 15:39:21 +00:00
Cody Cutrer a92b014b7f bump bigeasy/timezone to 1.0.18 (2018e)
fixes CORE-1985

Change-Id: Ia9d5eddf1462de2226e43012f4756fc1f9b93c25
Reviewed-on: https://gerrit.instructure.com/168277
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2018-10-15 20:38:42 +00:00
Derek Bender 0104c229b3 revert uglifyjs webpack upgrade
Change-Id: I3186254e5916fb335e9b6854f4adfe53f222abad
Reviewed-on: https://gerrit.instructure.com/167985
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Product-Review: Derek Bender <djbender@instructure.com>
2018-10-11 23:27:57 +00:00
Ryan Shaw ebac5a3ad8 the regular “update all the npm things” commit
this updates all the stuff we get from npm that we _can_ upgrade to
the newest versions available.

test plan:
* all the builds should pass

Change-Id: Icf1cc3cd02d66e6e1f999ea5f5fc3b5b28775881
Reviewed-on: https://gerrit.instructure.com/167282
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-10-09 22:04:49 +00:00
Jon Willesen 3fddcf98e2 add enzyme snapshot serializer to jest
converts all the existing
`expect(component.debug()).toMatchSnapshot()`
to:
`expect(component).toMatchSnapshot()`
which creates more detailed and more diff-able snapshots

test plan:
- specs pass -- this only affects js test code

Change-Id: Ib6dbcc1e3f87e61a251e4635dc68353aca57aeac
Reviewed-on: https://gerrit.instructure.com/167651
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-10-09 21:16:59 +00:00
Dan Minkevitch 3787616c28 Upgrade Yarn version to 1.10.1
if you are having problems after this commit you need
to either: `brew upgrade yarn` or` apt-get install yarn`
or rebuild your docker container or do whatever else you
use to manage software versions

Change-Id: I5c163baa8c4c814eeabca9a46501d508736a4ca1
Reviewed-on: https://gerrit.instructure.com/167252
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2018-10-08 17:14:57 +00:00
Aaron Kc Hsu 075f242a44 Replace flash with arc html5 media recorder
fixes COMMS-1462 COMMS-1420 COMMS-1418 COMMS-1417

Test Plan
* Navigate to /accounts/1/settings and notice that there is
a new Arc in RCE feature flag
* Setup notorious using the gerrit project and README
* Navigate to /plugins/kaltura and make sure local
notorious and also js_uploader html5 is turned on
* Now go to discussions/assignments show and speedgrader
/courses/1/gradebook/speed_grader
* Make sure turning off and on the feature flag fits the
way we need this to work

Change-Id: I883b0bb33e9f4bff134b22b4a192884c9aa9db29
Reviewed-on: https://gerrit.instructure.com/162819
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-10-02 02:58:15 +00:00
Ryan Shaw d4334bec3b [spec] ensure MutationObserver exists to fix flaky jest test
see: 
http://jenkins.instructure.com/job/canvas__linters-and-js/50286/testReport/junit/(root)/KeyboardShortcutModal%20appears%20when%20shift%20+%20_%20is%20pressed/KeyboardShortcutModal_appears_when_shift_____is_pressed/
for a bad example

Change-Id: I09e303fdad1d9d63f1bbf61ea01be9dff165d1d8
Reviewed-on: https://gerrit.instructure.com/166029
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-27 16:16:03 +00:00
Ryan Shaw 351ebd6652 upgrade react from 15.x to 16.x
closes: CORE-1874

test plan:
Now that the automated selenium & javascript specs pass for this the
last thing we need to do is to go manually click around and see if
anything breaks.

The best thing to do would be to open your browser console and look
for errors. Deprecation warnings or propType errors  or react warnings
are fine but if any actual errors get thrown that is something we want
to look into.

specific things to look at:
* all the gradezilla/gradebook/grading stuff (specifically things that
  have instUI <NumberInput>s and <Select>s)
  * look at the submission cell editor
  * the gb headers (especially make sure keyboard navigation works how
  it should)
  * moderated grading
  * grading perid edit page / enrollment terms
  * speedgrader
  * grading standards
  * gradebook history
* theme editor
* new discussions/announcements
* the new permissions page
* the dasboard
  * student planner
  * dashcards
* global nav trays
  * help menu
* assignment edit page
* account user/course search

Change-Id: I6a1fe7df9379d9c601eda932bd8cef9c06d10cd2
Reviewed-on: https://gerrit.instructure.com/163913
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-09-26 19:04:47 +00:00
Ryan Shaw 46a98181fb dowgrade format-message so canvas-planner works
if we allow format-message to upgrade, then `yarn extract` inside
canvas-planner will break.


test plan:
* cd packages/canvas-planner
* yarn extract
* it should work

Change-Id: Icb10b2ec8d63d4afd618aa0f21b918dab14e37fe
Reviewed-on: https://gerrit.instructure.com/165325
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
2018-09-20 23:57:16 +00:00
Clay Diffrient 873c7e76bb Bump tinymce-a11y-checker to 1.9.1
closes CORE-1838 CORE-1888

Test Plan:
  - Smoke test the a11y checker
  - Check out the changelog at https://github.com/instructure/tinymce-a11y-checker/releases/tag/v1.8.0
    and make sure those things work inside Canvas

Change-Id: I13507afaae53e0eeefbeb11a1972112373539dc1
Reviewed-on: https://gerrit.instructure.com/164357
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
2018-09-19 20:46:13 +00:00
Ryan Shaw 5590efa875 update react-redux so it can be used w/ react 16
we need all these:

v4.4.9
Update hoist-non-react-statics to 2.x
v4.4.8
Fix deprecation warnings with React 15.5.0
v4.4.7
Allow React 16 as peerDependency

test plan:
* pages that use redux should work the same as before and automated
  tests should pass

Change-Id: Id06bf4eaaa6f884996690889b442ad98584c78b0
Reviewed-on: https://gerrit.instructure.com/164990
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-19 14:14:18 +00:00
Ryan Shaw e73289e507 Yarn.lock: update all our npm dependencies
closes:  CORE-1909 

This is the result of running:
`yarn upgrade-and-dedupe`
and then fixing any specs/changes that needed to happen as a result of
the new versions

Test plan:
* automated tests should pass

Change-Id: I79ec63d8eb9d7bce4d48af0cff7cee369be58884
Reviewed-on: https://gerrit.instructure.com/164790
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-18 23:08:30 +00:00
Ryan Shaw aca3e04e7a Disable happypack for concurrent karma runs
If we are splitting up our specs and running different groups across
different cores, we don’t need to also use happypack to distribute
that work to multiple cores. In fact, if we do, it’ll be slower because
of cpu thrashing

Change-Id: If000c59d73d46961bffebacab9f7b0291a01bda6
Reviewed-on: https://gerrit.instructure.com/164889
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-18 22:35:43 +00:00
Ryan Shaw 23287c6969 react 16: get test-utils from react-dom/test-utils
closes: CORE-1890

from the react-addons-test-utils readme:

This package is deprecated as of version 15.5.0:

TestUtils have been moved to react-dom/test-utils

Change-Id: Ica0bb0c798aa80288d37b1810dc78eedad100d18
Reviewed-on: https://gerrit.instructure.com/164127
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-18 14:41:50 +00:00
Ryan Shaw 666b82253c make filePreview work w/ react 16
closes: CORE-1889

aka: combine into one es6 class so it can use React.PureComponent

this is because react 16 doesn’t have pureRenderMixin

test plan:
* the file preview page should work exactly as it did before

Change-Id: I64aa30653a82afb3e237a25d337137ed7c234858
Reviewed-on: https://gerrit.instructure.com/163914
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-17 20:25:55 +00:00
Ryan Shaw 8e57d0bcb2 replace react-addons-transition-group
closes: CORE-1875

from the react-addons-css-transition-group readme:

The code in this package has moved. We recommend you to use
CSSTransitionGroup from react-transition-group instead.

In particular, its version 1.x is a drop-in replacement for the last
released version of react-addons-css-transition-group.

Run npm install --save react-transition-group@1.x, and replace the
imports in your code:

test plan:
* the theme cards should have the exact same css transition effects
  as before

Change-Id: I33eb34c941bb0999cc600a3abe793e0603183b35
Reviewed-on: https://gerrit.instructure.com/163912
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-17 18:45:07 +00:00
Ryan Shaw 32667d33e2 upgrade react from 0.14.9 to 15.x
closes: CORE-1857 CORE-294
also closes: CORE-1856 CORE-294 CORE-1841 CORE-71 CORE-302 CORE-301
also closes: CORE-300 CORE-299 CNVS-34315 CORE-298 CORE-243 CORE-297
also closes: CORE-296 CORE-295

test plan:
now that the automated selenium & javascript specs pass for this the
last thing we need to do is to go manually click around and see if
anything breaks.

the best thing to do would be to open your browser console and look
for errors. deprecation warnings or propType errors  or react warnings
are fine but if any actual errors get thrown that is something we want
to look into.

specific things to look at:
* account user/course search
* all the gradezilla/gradebook/grading stuff (specifically things that
  have instUI <NumberInput>s)
  * look at the submission cell editor
  * the gb headers
  * moderated grading
* the stuff for adding external apps
* theme editor
* new discussions/announcements
* the new permissions page
* the dasboard
  * student planner
  * dashcards
* global nav trays
  * help menu

Change-Id: I0d71ffda08e306927616d3e976b09cd1775fba10
Reviewed-on: https://gerrit.instructure.com/163518
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-17 15:42:14 +00:00
Ryan Shaw 3a7d2e2713 upgrade react-token-input so it supports react 16
closes: CORE-1885

Test plan:
* make sure the token input that appears when you edit assignment
  due date Overrides on the assignment overrides page still works
  Like it did before. Here’s it’s original test plan:
new due dates selection UI
  - on assignments, quizzes & discussions pages
  - with DA on and off
  - assign various due dates/(un)lock dates
    to source sections, individuals, and everybody

  - these should create overrides that properly take
    students/sections and dates
  - validations should work for all dates as normal
    and not let empty overrides get created (with no
    students or sections)
  - the names of overrides should properly update as
    students change
  - as more overrides get created, saving assignments
    should not slow down significantly
  - the student/section selector should be intuitive


* the “new grading period set” form should work as it did before.
  Here’s it’s original test plan:

A new button "+ Add Grading Period Set" is on the
Grading Period Sets page. This allows a new set to
be named and associated with as many terms as needed.

To begin, visit the Grading page for an account
(e.g. /accounts/1/grading_standards) and click "+ Set of
Grading Period" and within this form ensure the following:

1. Given no name in the "Set name" field, when clicking
   the "Create" button a flash message is displayed and the
   set is not saved
2. Given no enrollment terms in the "Attach terms", when
   clicking the "Create" button a flash message is displayed
   and the set is not saved
3. Given a name and at least one attached enrollment term,
   when clicking the "Create" button an AJAX call successfully
   persists to the database and the new set is displayed on
   the page along with a successful flash message
4. When the form is open, the "+ Set of Grading Periods"
   button is disabled
5. When the form is in the process of creating a new set,
   the "Create" and "Cancel" button is disabled
6. Clicking close at any other time closes the form and
   re-enables the "+ Set of Grading Periods" button and
   all data in the form is cleared

Change-Id: Ibb0290202b5dcf00ec42a4bb6d1c3d2e3d7a3b2b
Reviewed-on: https://gerrit.instructure.com/164492
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-14 19:27:28 +00:00
Ryan Shaw 1348da53b9 Update `react-crop` dependency
closes: CORE-1886 CORE-1887

I forked react-crop, added it to the @instructure GitHub/npm group
converted all the React.createClass code to es6 classes and set it up
To use modern react/babel/webpack


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 (displays 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-Id: I68647b3375c480b77d422e115d3ea8c92dd5b79f
Reviewed-on: https://gerrit.instructure.com/164443
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-14 17:08:42 +00:00
Ryan Shaw ec49145559 Upgrade react-modal so it works with react 16
I know I said that the way forward was to just not use react-modal
and use instUI modal instead but there are a bunch of things that _are_
Using it and I don’t want changing all those to be blockers for react16
if this will work.


I still want us to get rid of react-modal, just don’t want it to be a 
blocker for react 16


Test plan:
Things that use react-modal should still work the same as before. Check:
* the color picker used on the calendar sidebar
* the external apps stuff that has modals
* the file preview modal in files
* the “find appointment” modal in scheduler

Change-Id: I606eda110782cd3300fcbb2f8052681fa5048050
Reviewed-on: https://gerrit.instructure.com/164232
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-13 17:51:34 +00:00
Ryan Shaw d44185e430 react 16: use createReactClass for things that can’t be es6 classes
these components can’t be converted to the react es6 class syntax
because they use Mixins which aren’t supported by es6 classes.

Change-Id: I8541b08518cd335c7a711bab117efcda65ac6b2c
Reviewed-on: https://gerrit.instructure.com/164135
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-12 16:03:38 +00:00
Ryan Shaw 1441758ddd Upgrade react-dnd so it works w/ react 16
Closes: CORE-1871

The react-dnd commit that first added react 16 to its peerDeps
(https://github.com/react-dnd/react-dnd/commit/c6123fad317)
First appeared in v2.5.2 so we need at least that version
If we are going to use react 16

Test plan:
* dashboard card and discussion reordering should still work like they
  always have

Change-Id: I74b47949f3d0f7084c350d24a8de41139f535732
Reviewed-on: https://gerrit.instructure.com/164071
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-12 04:11:54 +00:00
Ryan Shaw a49723beab remove react-select-box, nothing uses it
from grepping around, it appears nothing uses this.

This will will make it easier to upgrade to react 16 since there is one
Less thing to keep track of

Test plan:
* can anybody else think of a place where this is used
* if not, removing this doesn’t change anything since nothing uses it

Change-Id: I1ebe3147bdef39342a0deb11ab145fb0740e4c28
Reviewed-on: https://gerrit.instructure.com/164051
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-11 22:15:43 +00:00
Ryan Shaw 4fcfeb828f put accidentally deleted comments back in package.json
Change-Id: I6b00f817afbf46c6cfa48ed0f389aede78c9c3f3
Reviewed-on: https://gerrit.instructure.com/163733
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-10 14:18:10 +00:00
Ryan Shaw e1454a761c add jest-canvas-mock to silence a bunch of warnings
without this we get a bunch of warnings from our jest tests like:
Error: Not implemented: HTMLCanvasElement.prototype.getContext …

test plan:
you shouldn’t see those ^ messages in the jest logs

Change-Id: Ib257d4a6b40f4b4118f273729080e722afa3432a
Reviewed-on: https://gerrit.instructure.com/163515
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-09-07 15:18:15 +00:00
Ryan Shaw d5681a84e8 get back on the release version of instUI (5.25.0)
this sets us back up to track the latest actual
release instead of the “rc” version

test plan:
* automated tests should pass

Change-Id: I9e668828acc99bcb49c7071ca0ccb898c55f0d99
Reviewed-on: https://gerrit.instructure.com/162867
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-31 19:43:51 +00:00
Ed Schiebel c5c50c760c Pass correct locale to Planner
Sometimes ENV.LOCALE and ENV.MOMENT_LOCALE are different
(zh-Hans v zh-cn or mi v mi-nz). We were passing the former to planner,
but moment needs the full locale, including language and region
identifiers, and formatMessage copes with the full locale just fine,
so we really need to pass in the latter or moment eventually
blows up.

So mi-nz month names would successfully parse, had to both bump our
version of moment and tweak the canvas customized mi-nz locale data.

to test, you'll have to run yarn to update moment, then build with
RAILS_LOAD_ALL_LOCALES=1 yarn build

Note on the changes to timezoneSpec.js:
- some of the specs were parsing dates like "Mon, Aug 3", which are
  being interpreted in the current year, when Aut 3 is not a Monday.
  Resolved this by using MockDate to pretend today is 2/1/2015
- moment does not always interpret the Chinese characters for evening as
  implying PM.  I'm assuming canvas will never need that particular
  construct and commented out the failing string.
- there's one date-time that's getting the date totally wrong.
- Fixed grammatically incorrect instances of
  '8月 3, 2015' to ''8月 3日, 2015'
- fix cases where the year is coming after the month and day, which
  would never really happen

fixes ADMIN-1331

test plan:
  - have a student in course so planner is enabled.
  - go to /profile/settings and Edit
  - change the Language to Reo Māori (Aotearoa) and "Update Settings"
  - go to the planner dashboard
  - click on + to create a new todo
  > expect you can create a todo.

If you want, you can repeat with any of the languages listed in the
ticket just to prove ^that wasn't a fluke.

Change-Id: I9ba069ef61529088ab92271d7857998df6bbc409
Reviewed-on: https://gerrit.instructure.com/161206
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-08-27 20:51:33 +00:00
Ryan Shaw 354bf2df06 upgrade enzyme to 3.x
Closes: CORE-1758

After this commit, if you or your team have any specs that import
from old-enzyme-2.x-you-need-to-upgrade-this-spec-to-enzyme-3.x-by-importing-just-enzyme
That means you need to upgrade those spec files to use the new enzyme
by changing that to `import {mount, shallow, whatever} from ‘enzyme’`.
Refer to http://airbnb.io/enzyme/docs/guides/migration-from-2-to-3.html
for details

Test plan:
* all linters-and-js-specs should pass
* since this only effects js specs, that is all that really matters. 
  no app code to QA

Change-Id: I46c5d815e9d95683832d70b64e31526b943d07e5
Reviewed-on: https://gerrit.instructure.com/135136
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-23 14:44:23 +00:00
Ryan Shaw 925c22a7fc Move the pretranslated babel stuff into own pkg
closes: CORE-1725

This is so we don’t have to pull in all of the deps of quiz-presets
just to do the pretranslated stuff for canvas-rce. because without
this, it was going to be a pain to deal with the version of
`@instructure/ui-presets` that `quiz-presets` wanted if we wanted to
always be on the latest instUI rc.

It also makes it so we have to yarn install less stuff into node_modules

Test plan:
* before checking this out, go to packages/canvas-rce and run
  `yarn build:all`
* run `find -s lib -type f -exec md5sum {} \; | md5sum`
* check this out, run `yarn` then run `yarn build:all` again
* run `find -s lib -type f -exec md5sum {} \; | md5sum` again
* the 2 checksums should match, meaning they produced exactly the
  same code


Change-Id: Ife3116b43cae51bcd92c725ab68c6d1fd621dce5
Reviewed-on: https://gerrit.instructure.com/160832
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-17 20:34:19 +00:00
Ryan Shaw ced4d9b501 Upgrade instUI to 5.24.0 & ally-checker to 1.7.0
Closes: CORE-1697

Test plan:
* do a basic regression test of things that use instUI components.
  Specifically: the new developer keys page and the gradebook grade
  details tray since those had the most specs that needed to be fixed
* do a basic regression test of the a11y checker to make sure the
  instUI components work the same as before

Change-Id: Ie88c4fc1b01eadeecceb7536944da986e37bf3dd
Reviewed-on: https://gerrit.instructure.com/156473
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-08-17 20:33:49 +00:00
Ryan Shaw e8a88cceea A script to just update instUI
Closes: CORE-1709

This is what our Jenkins job to pull in every instui RC commit will use

Test plan:
* run `yarn upgrade-instructure-ui`
* it should make a commit that has new entries in yarn.lock for all the
  instUI packages that uses the latest rc version on the npm registry
* it should not affect anything else besides yarn.lock

Change-Id: I78cce6e801015819c4e4b27e26ede352deceebb9
Reviewed-on: https://gerrit.instructure.com/160435
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-15 20:21:10 +00:00
Ryan Shaw fd33fdf2b5 Upgrade yarn from 1.7.0 to 1.9.4
if you are having problems after this commit you need to either:
`brew upgrade yarn` Or `apt-get install yarn` or rebuild your docker
container or do whatever else you use to manage software versions

Change-Id: Ie338a24544bd4677f68222b69cfa178c0ef21ca9
Reviewed-on: https://gerrit.instructure.com/160616
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-14 16:11:54 +00:00
Ryan Shaw 6f910dbc43 treat anything in gems/plugins/* as a workspace
Fixes: https://github.com/instructure/canvas-lms/issues/1323

This lets open source users continue putting their own plugins with npm 
deps In gems/plugins. They will still have to have a forked version
Of yarn.lock though since that will be different for them than a
“Default” install.

Also, this means that everyone will see a bunch of warnings like this
Every time they yarn install:
Warning: gems/plugins/academic_benchmark is a dir… no package.json
Warning: gems/plugins/account_reports is a dir.. has no package.json
Warning: gems/plugins/canvas_geoip is a …, but has no package.json
Warning: gems/plugins/demo_site is a directory, but has no package.json
Warning: gems/plugins/instructure_misc_plugin is … has no package.json
Warning: gems/plugins/moodle_importer is a d.., but has no package.json
Warning: gems/plugins/qti_exporter is a dir…, but has no package.json
Warning: gems/plugins/respondus_soap_endpoint is … no package.json
Warning: gems/plugins/simply_versioned is a …, but has no package.json


Test plan:
* yarn install should work

Change-Id: Ie65c8faf8b1022210cfb7eda8c25107facfe83b5
Reviewed-on: https://gerrit.instructure.com/158043
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-07-20 21:20:56 +00:00
Ryan Shaw e09c9f9afa Downgrade node-sass to fix styling of flashMessage
Fixes: SIS-3125, COMMS-1328

In g_instructure.scss, we have some scss that looks like:

#flash_message_holder, #flash_message_buffer {
  …
  li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
    …

In recent versions of node-sass that gets output as:
#flash_message_holder li, 
#flash_message_buffer li {
  ...
}

Instead of how it should be:
#flash_message_holder li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error), 
#flash_message_buffer li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
  ...
}

Change-Id: I6aad4a6793228c97114220f5f2b2ec85ac9ae61d
Reviewed-on: https://gerrit.instructure.com/157921
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-19 19:46:03 +00:00
Clay Diffrient 2dc1d7fa86 Add a way to generate better js coverage
This should pick up coverage from both karma and jest
in Canvas proper.  It should also pick up coverage from anything under
packages/*

closes CORE-1265

Test Plan:
  - Run `COVERAGE=true yarn test`
     - Coverage reports (coverage-final.json) should generate in all
       packages such as (canvas-planner) as well as in coverage-karma
       and coverage-jest
  - Run `yarn run test:coverage`
     - coverage-js folder should be generated.  Opening index.html
       should show the full coverage report
  - Remove coverage-{js, karma, jest} and
    packages/canvas-planner/coverage as well as .nyc_output to get back
    to a clean state
  - Run `RUN_TESTS_FIRST=true yarn run test:coverage`
     - All tests should run and generate the appropriate report just
       like the last time in coverage-js

Change-Id: I50744b8977e0683e079af5bdd2865dbcd6ad9066
Reviewed-on: https://gerrit.instructure.com/146098
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-07-17 14:19:03 +00:00
Ryan Shaw 4e012e178e Upgrade tinymce to 4.8.0
Fixes: CORE-1518

Test plan:
when using newest version of Microsoft Edge:
In the RCE, add a table.
After adding the table, attempt to edit the table.
You should be able to edit tables using the RCE when using MS Edge

Change-Id: Ibbc38ac11c6fbb808a31e16a84fe24a87a979e5b
Reviewed-on: https://gerrit.instructure.com/157456
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-17 02:04:59 +00:00
Ryan Shaw f9d51ffc39 Remove html-react-parser dependency
‘html-react-parser’ causes yarn all kinds of fuss when it tries to 
update stuff because it says it wants at least react 15. This approach 
does the same thing we were using it for but without that package.json
dependency. This fixes some problematic stuff in our yarn.lock


Test plan:
* the permissions page should have the same perf as it did before
  (Or slightly better)

Change-Id: Id7ce3e1b5e51c077b9d51ffa15ac94ee158f3ee5
Reviewed-on: https://gerrit.instructure.com/156895
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-16 19:04:47 +00:00
Ryan Shaw 6774f9f22c Upgrade tinymce to latest (4.7.13)
closes: CORE-1620

while I was upgrading all the package.json dependencies I noticed that
that the version of tinyMCE we are using is out-of-date

test plan:
* automated tests that deal with tinyMCE should pass
* smoke test the editor to make sure it looks/works the same as before

Change-Id: Ia7913f195d0a61aee2ac770ebcbf303ffad794fa
Reviewed-on: https://gerrit.instructure.com/156310
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-10 19:06:58 +00:00
Ryan Shaw 3fdd3938d2 [yarn.lock] update :allthethings
closes: CORE-1621

This is just the regular commit to update all the npm dependencies.
It is the result of running `yarn upgraded-and-dedupe`

Test plan:
* automated tests should pass
* in the review of this, look closely at yarn.lock and see if there is
  anything that you think might cause problems (eg: a duplicated lib
  or something else funky like that)

Change-Id: I6fdd04f5aa7294464015293fbb3bc0d4a61eeb73
Reviewed-on: https://gerrit.instructure.com/155302
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-07-06 20:45:35 +00:00
Ryan Shaw 55726526a2 Fix <Pagination> perf for accounts w/ many users
This commit fixes it for master. g/155833 is the one that we will need
to warmfix/hotfix

Closes: CORE-1576

Test plan:
* using production assets (so you are getting the minimized/optimized
  Version of react w/o propType checking)
* in an account with tons of users or courses
* go to /accounts/x and /accounts/x/users
* type some stuff in the search box
* it should not be unbearably janky

Change-Id: I6a5e9be770a9bf9d49cf7f1d5d11df935a5fc24f
Reviewed-on: https://gerrit.instructure.com/155847
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-05 17:20:54 +00:00
Ryan Shaw 8bfa6c58ff Upgrade axios from 0.16 to 0.18
This is so all of our pages that use axios can share the same one

Test plan:

* the selenium tests, which test pages using axios, should pass.

Change-Id: I24d15fb7fa282891b80fadb91d06d9dfa019b5d1
Reviewed-on: https://gerrit.instructure.com/155300
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-26 22:46:24 +00:00
Ryan Shaw 485e14c5d9 tinymce-a11y-checker: upgrade to 1.6.0 w/ instUI5
Closes: CORE-1436

this commit upgrades us to the latest tinymce-a11y-verision, which uses
all instUI 5 components. So that means that we are no longer using
Instui 4 anywhere in canvas’s yarn.lock. yay!

Test plan:
* check to make sure the a11y checker works the same as before
* specifically run in prod mode in Spanish or some other language and
  with a custom theme applied and:
  * make sure that the stuff in the A11y checker is translated correctly
  * make sure the buttons and stuff in the a11y checker are themed
    correctly (the same as they used to be)

Change-Id: I22c6d49a682b395a75b8323727890596d568afa0
Reviewed-on: https://gerrit.instructure.com/154547
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-26 22:43:23 +00:00
Ryan Shaw 57943ae226 fix the `yarn upgrade-and-dedupe` command
Change-Id: Iea9b5ad18493dba2c25e695889d06a98bc26c368
Reviewed-on: https://gerrit.instructure.com/155301
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-06-26 20:26:04 +00:00
Ryan Shaw 5ddaf88785 instUI upgrade: upgrade ui-core in package.json
Closes: CORE-1494 CORE-1493 CORE-1492 CORE-1437

most things have already been upgraded to instUI 5
by pulling them in from their respective split-out
@instructure/ui-* repos. The last remaining things
are things like <Select> and <AutoComplete>
where if you pull them from their
new package you'll get a new component with a new
API.

They are still avaiable at ui-core but will
log deprecation warnings. So we should hopefully
be able to merge this without much trobule and
get the teams that own each page that uses something
from ui-core still to upgrade their stuff so the
deprecation warnings go away before instUI 6

Test plan:
* after you check this out, search the repo for 'ui-core'
* you'll find some pages that have:
  import Select from '@instructure/ui-core/lib/components/Select'
  eg: the CoursesToolbar, the NewCourseModal and usersToolbar in the
      user/course search stuff.
* make sure those selects work the same as they did before
* you will see deprecation warnings telling you not to get Select from
  ui-core and that you should get it from ui-menu in the browser console

Change-Id: I7b8a68584ef738caf4e4daca346c5f503afeebfd
Reviewed-on: https://gerrit.instructure.com/151789
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-06-21 17:40:21 +00:00
Clay Diffrient 9f545a5c66 Add release tracking and source map uploading to sentry
This makes it so our sentry instance can be much more detailed
in the data that it collects

Change-Id: If44ea7bc54646988d681e6ad775951eb0e35436a
Reviewed-on: https://gerrit.instructure.com/154010
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-06-15 19:40:36 +00:00
Jeremy Neander 1479a5c937 spec: increase the timeout of canvas-rce specs
Also:
 * update mocha-jsdom to eliminate a spec issue
 * fix some specs

test plan:
 * Verify Jenkins passes

Change-Id: Ib486336306719b5ca4160e15843a0aac084c5c92
Reviewed-on: https://gerrit.instructure.com/153972
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-15 17:11:19 +00:00
Clay Diffrient babb0706ca Add raven to grab errors from test runs
closes CORE-1532

Test Plan:
  - Run tests with SENTRY_URL environment variable set
  - It should attempt to send data to sentry
  - Build works otherwise

Change-Id: Ib802851a7b3ac8626033436f60399f134a8425b3
Reviewed-on: https://gerrit.instructure.com/153878
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-14 20:43:00 +00:00
Jeremy Neander 7efc1a5a38 spec: revert yarn workspace commit
test plan:
 * Verify Jenkins passes

Reverts //gerrit.instructure.com/153283

Change-Id: Id148bc7197c85ea15dcc7f2c9035a0fd8cde4803
Reviewed-on: https://gerrit.instructure.com/153800
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-06-14 03:09:58 +00:00
Ryan Shaw 346458c2c9 return the right exit code in yarn workspace-run
... & fix failing package specs
closes:  CORE-1523


Test plan:
* run `yarn workspace-run test`
* it should actually run all the specs for each
  workspace (package/gem/plugin/client-app)
* if there is a failing spec it should actually
  exit with a non-zero exit code and fail the build

Change-Id: Ie09d0a3dfa343013bf7ee09e11132ef529f1b932
Reviewed-on: https://gerrit.instructure.com/153283
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-13 22:58:29 +00:00
Landon Gilbert-Bland a9dde08b7e Fix performance of new permissions page
There are several "improvements" here that make things more performant:

  * No longer using instui buttons. They have proven to be much slower
    then raw html buttons
  * No longer using instui flexbox/flexitem. Doing this in the CSS also
    proved to be much faster
  * Caching icons in LocalStorage so that we don't have to render the
    same svg 400 times
  * Not rendering the MenuItems for buttons for every button in the
    table. Only creating and rendering this component when the button is
    clicked. Note that in the trays we are still creating all the
    MenuItems on every button, otherwise there is problems with focus
    being able to escape the tray, and the performance penaltites are
    not as bad there cause there are significantly fewer buttons

Fixes COMMS-1160

Test Plan:
  * Make sure everything still works (permission button, permission
    tray, role tray, etc). Pay special attention to focus management, as
    there was a lot of hacked together stuff to get focus working
    properly when you changed a setting on any of the buttons (in the
    tray and on the table).
  * Spot check voiceover, it should be better in the tray now. Make sure
    you have the "group items within" and "speak column and row numbers"
    selected in the voiceover utility > web options.
  * Make sure performance is acceptable in the following situations.
    Note that performance will be slightly better when this is run in
    react production mode:
      - Initial Page Load
      - Searching roles
      - Searching Permissions
      - Add tray
      - Permissions Tray
      - Role tray
      - Switching between account and course tabs

Change-Id: Ic488d51ebdc031c2498d234f5d014d6368f1f84b
Reviewed-on: https://gerrit.instructure.com/153197
Tested-by: Jenkins
QA-Review: Sara Chadwick <schadwick@instructure.com>
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-06-13 16:25:14 +00:00
Michael Brewer-Davis b1e8404fce fix expand/contract all buttons in new sLMGB
closes OUT-2232

Test plan:
- enable non-scoring rubrics
- load student LMGB with multiple outcome groups,
  outcomes, and outcome results
- verify that expanding and contracting the groups
  and outcomes works as expected
- verify that after contracting a group and then
  re-expanding, the outcomes within the group
  are contracted
- verify that the expand all and contract all buttons
  at the top of the page are enabled and disabled
  at the appropriate times
  - expand all: should be enabled when any element
    is contracted
  - contract all: should be enabled when any element
    is expanded
- verify that the expand all/contract all buttons
  work as expected

Change-Id: Ifbe02e900459faed8d411afb2bb9410a885a2237
Reviewed-on: https://gerrit.instructure.com/152103
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-06-06 20:07:47 +00:00
Ryan Shaw e415eaa961 Use yarn workspaces
Run `script/nuke_node.sh` to clean everything up
Run `yarn install` it should install everything for everything
Run `yarn build` and `yarn test` they should work exactly as before

Change-Id: I11a27ff2d705c6cbb3b3f9029dd8b32138706146
Reviewed-on: https://gerrit.instructure.com/151356
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-04 20:02:02 +00:00
Steven Burnett e8e65cb54b fix minor issues with imports
Test Plan:
- tests pass and permissions still load

Change-Id: If459e7f1c54cb64d740366e2a8af9d5bac02b88f
Reviewed-on: https://gerrit.instructure.com/152206
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-06-01 17:49:26 +00:00
Ryan Shaw 0bd21c9ef9 Make all instUI 5 packages available
in the commits that follow, we start using these new packages so this 
commit has just been split out into its own so we don’t need to worry 
about commit order in the others. It does no harm to make them available
now, before they are used.

Change-Id: I553ce5ca1a81bddd17a5de428a04d424375f62e2
Reviewed-on: https://gerrit.instructure.com/151766
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-30 20:35:08 +00:00
Ryan Shaw 060e9b14c5 Put parse-link-header back in package.json
…since we use it in our code

It used to be there, but somehow someone deleted it on accident

Change-Id: Id516fdb8507887ffed9450869654fc42a4afc415
Reviewed-on: https://gerrit.instructure.com/151898
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-30 19:57:52 +00:00
Ryan Shaw 63990e024c Use ui-icons instead of inst-icons for icon font
closes: CORE-1434

Test plan:
* all the icons should look the same as they did before
* make sure that icons that should flip for RTL (like the icons on 
  The course/user search pagination arrows, the icon to open the
  Submission details tray in new gradebook, the “>” icons to expand
  a submenu for the menus in new gradebook, etc)

Change-Id: I490d2dcd91b1b7ca2a116a1416718cd797f74901
Reviewed-on: https://gerrit.instructure.com/149482
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-29 20:57:04 +00:00
Brent Burgoyne 85d103df1b fix unnecessary pagination display on user search
if it ever gets in a state where the last page is unknown, then
the state we would never changed back in future searches with
a known last page, causing pagingation to show on single page results.

closes CORE-1461

test plan:
- code review of passing tests should be sufficient

Change-Id: I2067417cca71dbe2e690f60e0205ca4bd0121edf
Reviewed-on: https://gerrit.instructure.com/151752
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-29 20:36:19 +00:00
Ryan Shaw 900b40c78d upgrade instUI to 5.10.0 and dedupe
Test plan:
* see https://instructure.design/#CHANGELOG for what changed.
  nothing looks important to us

Change-Id: Ib3477fa160e6f7a6b8039b1c719bbbf2cee11e8e
Reviewed-on: https://gerrit.instructure.com/151522
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-25 20:07:14 +00:00
Augusto Callejas c4c9e764df Configurable proficiency ratings page
closes OUT-1856, OUT-1858, OUT-2239, OUT-2148

This adds configurable proficiency ratings on the account rubrics page.
Persisting these changes will occur in a future patchset (2252).
Validating order will be in a separate patchset (2240).

test plan:
  - with the "non-scoring rubrics" feature flag off, the account rubrics
    page should appear without the proficiency ratings tab
  - with the "non-scoring rubrics" feature flag on, the accounts rubrics
    page should appear with the proficiency tab, if visiting with an
    account with "manage_outcomes" permission (e.g. account admin)
  - create an account role that has "Create and edit assessing rubrics"
    permission enabled but "Manage learning outcomes" disabled by going
    to the account page, click on the "Permissions" link in the left menu,
    then select the "Account Roles" tab to then be able create the role
    and enable the permission above.
  - create an account user by going to the account page and then click
    on the "People" link in the left menu to then be able to
    click on "+ New User". you'll use the email address entered in
    the next step.
  - make that user an account admin by going to the account page,
    click on the "Settings" link in the left menu, then select the
    "Admins" tab, then click on "+ Account Admins". select the new
    role from the drop down menu and enter the email address you used
    in the preivous step
  - confirm with the feature flag enabled, that visiting the account
    rubrics page does not appear with the proficiency tab, if visiting
    with an account without "manage_outcomes" permission (e.g. masquerade
    as the user created above)
  - on the proficiency tab, test error handling:
    * description is required
    * points is required, should be a valid number
    * when saving changes, all fields with errors should be labelled
      with an error text, with the first field receiving focus

Change-Id: Ic52ef9fe9c58cfb215216b3a505ef1fb4b851c68
Reviewed-on: https://gerrit.instructure.com/150841
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-24 22:11:09 +00:00
Ryan Shaw efb76cf2fb Upgrade yarn from 1.6.0 to 1.7.0
if you are having problems after this commit you need to either:
“brew upgrade yarn”
Or
“apt-get install yarn” 
Or 
Rebuild your docker container
Or do whatever else you use to manage software version

Change-Id: I8428112b4a44c28edd2608124bff9e01a8e960d9
Reviewed-on: https://gerrit.instructure.com/151423
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-24 21:37:04 +00:00
Michael Brewer-Davis 7e70b17d1a new student learning mastery gradebook
closes OUT-1851

Test plan:
With non-scoring rubrics disabled, verify that student learning
mastery gradebook loads normally and is unchanged.

With non-scoring rubrics enabled, verify that new student
learning mastery gradebook loads and matches mockups

Change-Id: If805bc50115a0c8cd0f4b516f6541ab900991eae
Reviewed-on: https://gerrit.instructure.com/150423
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-24 21:23:07 +00:00
Marc Phillips 489b5d6ecf Add require_scopes field to DevKey Management
Can now set whether a developer key require scopes or not.
Legacy behavior of scopes is to allow dev keys to have
access to all endpoints, this allows for the continuing
behavior.

Fixes: PLAT-3345

Test Plan:
 - Go to a create/upate a key
 - Notice the require scopes checkbox
 - Click the require scopes checkbox so that it is
   toggled off
 - Scopes ui should be removed and saving the key
   persists the state
 - attempt to access an endpoint using the changed
   endpoint that had scopes, it should be able to act
   like a legacy key
 - go back to the key management modal and flip the
   require scopes back to on.
 - attempt to access an endpoint that does not have a
   scope for the dev key, should fail
 - for a legacy key, the scopes ui should be off when
   first editing.

Change-Id: I0a53ff8a44b80081b518d780a8288f4cc4c36027
Reviewed-on: https://gerrit.instructure.com/150216
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
2018-05-23 22:23:17 +00:00
Ryan Shaw 4fb263498c upgrade InstUI from 5.8.1 to 5.9.0
Closes:  CORE-1451

Test plan:
* look at https://instructure.design/#CHANGELOG to see if anything
  Looks interesting.
  (I couldn’t see anything that should affect us)

Change-Id: I1cee6c0db65c64fb5f827efbce8d32c03fe1b5a6
Reviewed-on: https://gerrit.instructure.com/151206
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-23 20:49:45 +00:00
Clay Diffrient 0c56a80cc5 Give more memory to karma when it's running
This should make it so our post-merge build starts working again
and reporting new coverage information.

closes CORE-1435

Test Plan:
  - Run `COVERAGE=true yarn run test:karma`
  - It should not fail because of memory issues

Change-Id: I6e103352fa25e130d0ba8072a77c9d81ac11bb85
Reviewed-on: https://gerrit.instructure.com/150666
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-05-23 16:43:37 +00:00
Ryan Shaw 5441e760e9 @inst/ui-icons -> inst-icons in course user search
This introduces @instructure/ui-icons and converts just the account
Course user search stuff to use them instead of the old
‘instructure-icons’ package

Note here is the magic regex I used:
Find: (instructure-icons/lib/)(Line|Solid)(/Icon.*)(Line|Solid)
Replace: @instructure/ui-icons/lib/$2$3

test plan:
* the icons in the course/user search stuff should look/behave (as in,
  Have same tooltips/screnreader labels/etc) the same as before.

Change-Id: I22573aaaad239a9ceef4b5c1c0a610c3e5b7b586
Reviewed-on: https://gerrit.instructure.com/149287
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-17 20:06:33 +00:00
Ryan Shaw a16325e791 Upgrade instUI from 5.7.0 to 5.8.1
Closes: CORE-1417

Even though the PSA that instUI put out about needing to update asap
doesn’t affect us because we already always set the `dir` attribute
on the <html> tag, this upgrades us to that new version so there is
no confusion

Test plan:
* automated builds should pass
* nothing should actually change since there is nothing significant
  In this upgrade other than the new thing that adds the dir=“ltr” 
  attribute for you if you haven’t already

Change-Id: Id7a471265c49c595c7a71a54258218d4062be7b6
Reviewed-on: https://gerrit.instructure.com/150156
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-14 19:14:17 +00:00
wdransfield 3f2326b682 Developer key scopes UI (functioning skeleton)
Closes PLAT-3314

Test Plan
- Enable new developer key FFs
- Navigate to the developer keys page of an account
- Verify all scope groups are rendered in the new
  scopes list component.
- Verify the filter allows filtering by scope
  group name.
- Verify the "Read Only GET" checkbox causes
  all scopes that use GET to be checked.
- Go crazy testing checkboxes and make sure they all work
  logically (i.e. selecting the group level checkbox
  checks all scopes in the group).
- Verify that each group shows a list of methods for
  all selected scopes.
- Verify you can still create developer keys in root accounts
  and site admin.

Change-Id: I5df402ca06740e8a1ff37c21b63d2d6d58720182
Reviewed-on: https://gerrit.instructure.com/149242
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-05-14 16:00:00 +00:00
Ryan Shaw 895cf6dba6 Make it so permissions opts-in to use prettier now
if you set your editor to eslint --fix on save, which is already safe 
be doing, it will also pass anything in this whitelist of dirs to
Opt-in to be prettier formatted too. So you don’t have to wait until
we prettier all the things later and can have consistency among your 
now

Test plan:
* gergich should complain if something in app/jsx/permissions is not
  Prettier formatted

Change-Id: I438d11f25b10ed58e53656e110aa0d1e7fed5660
Reviewed-on: https://gerrit.instructure.com/149583
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-09 15:08:32 +00:00
Ryan Shaw 3948fa015e Upgrade InstUI to 5.7.0 from 5.4.1-dev.1
Closes: CORE-1378

(Relevant) Change log / things to test:
Bug Fixes
ui-forms: Preserve FileDrop event during onDrop (e45b70d)
ui-i18n: Fix moment version dependency (b6289c2)
ui-overlays: Fix a11y issues in Tooltip and Popover (352b8ca)
Features
ui-forms,DateInput: Add support for disabled days (c1067ad)
ui-icons,IconX: Updated IconX to be a little smaller (1bdcd86)
ui-layout,View: Add style prop white list (incl backgroundImage) (d8a35ab)
ui-overlays,Tray: Replace timeout with requestAnimationFrame (ddd9096)

Change-Id: I4cc63f322e53bc2bb744d2a11bbdcfab9fbe88dc
Reviewed-on: https://gerrit.instructure.com/149270
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-08 14:39:13 +00:00
Jeremy Neander 0db6896f79 maintain precision of grades in grade input
fixes GRADE-1098

test plan:
 1. Create an Assignment
    a. with Display Grade as Percentage
    b. worth 9.5 points
 2. Open New Gradebook
 3. Grade a student on this assignment twice
    a. once with 55 (interpreted as percentage)
    b. again with 55% (explicit percentage)
 4. Verify grade is 55%
 5. Verify score is 5.225

Change-Id: Ie48ec7d5b787e864bfd3379e8dc6a4dbebebc2e5
Reviewed-on: https://gerrit.instructure.com/148848
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2018-05-03 18:36:03 +00:00
Jeremy Stanley b4e52fff98 switch to uglifyjs-webpack-plugin
Closes: CORE-1361

Dev test plan: it should be possible to build production assets
without consuming 50GB of memory

QA test plan:
* run RAILS_ENV=production bundle exec rake canvas:compile_assets
* run app in prod mode eg: RAILS_ENV=production bundle exec rails s
  (Or however you do it with pow or whatever)
* look at the devtools and make sure you are seeing minified code and it
  no errors or 404s

Change-Id: I247080851c9df0c74b6c59432bc7086ea625df4b
Reviewed-on: https://gerrit.instructure.com/146336
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-02 21:36:55 +00:00
Ryan Shaw 8f05a581c1 Fix so we don’t include 2 copies of all InstUI stuff
If we are going to use a dev build of instUI we have to do this
To make sure everything still shares the same version.

We need to be very careful with our updates to yarn.lock that there
is only ever 1 entry per inst-ui package in the same major version
range. Otherwise our client code will get super bloated and things
will start breaking in subtle unexpected ways (from having 2 copies
of same lib on the page)


Change-Id: Iab90131bae9e10a954ca2d5aef049a90eefb9a39
Reviewed-on: https://gerrit.instructure.com/148809
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-01 19:59:23 +00:00
Ed Schiebel 77935f7a54 Add DateTimeInput to planner
The user can now enter a due date and time.

refs ADMIN-297

test plan:
  - load the planner
  - create a new to do
  > expect the time to default to 11:59pm
  - save
  > expect the due time of 11:59 to be shown in the planner
  - edit the item, change the time, save
  > expect the new time to show up in the planner
  - edit the item, delete the date, tab out of the date text box
  > expect a "you must provide a date and time" error message
  > expect the Save button to be disabled
  - pick a date
  > expect the error message to go away
  - save
  > expect the to do to be in the planner at the given date and time

Change-Id: I6759cca675b59acfc200574a1e313f75e1cfda2e
Reviewed-on: https://gerrit.instructure.com/145147
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-05-01 16:29:51 +00:00
Brent Burgoyne f91658d4bf move canvas-rce to canvas-lms/packages/canvas-rce
closes CORE-994
refs RECNVS-398
refs CORE-1224
closes CORE-1237

test plan:
- yarn install
- smoke test rce
- tests pass

Change-Id: Ieaff024fa89879fac3e7edf99381f46de921cce2
Reviewed-on: https://gerrit.instructure.com/145671
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-01 13:46:18 +00:00
Ryan Shaw 8db2c527b1 Get slickGrid to work in RTL
Closes: CORE-1226

This gets both the old gradebook and the new gradezilla gradebook to
work in RTL.

Test plan:
* in both old gradebook and new gradezilla gradebook:
* go to the gradebook in normal LTR interface
* everything should work exactly as before
* turn on the RTL feature flag either in your user settings or by
  turning int on in accounts/x/settings and then setting your lang
  to arabic

Specific things to test:
* try it on both the old gradebook and the new gradezilla gradebook
* try it on a really large gradebook with tons of rows and columns
* try a really small gradebook with less columns than there is screen
  width
* try it in different browsers. Since each browser has different
  scrollLeft handling in RTL, I normalized it. but verify that it
  works in each
* try resizing and reordering columns
* borders and other styles should be flipped to the opposite side in RTL
* make sure keyboard shortcuts (like the left, right, top, down arrow
  keys) work and move you in the right direction in both LTR and RTL
  (Eg: if you are on “assignment 2”, right arrow goes to “assignment 3”
  In LTR but in RTL it goes back to “assignment 1”)
* try to think of other places that might have used the .r<column index>
  or .l<column index> classnames to make sure the use the new, RTL-aware
  ‘.b’ and ‘.f’ (those stand for “back” and “front”) classnames

This change started from this pull request:
https://github.com/mleibman/SlickGrid/pull/666
but there was a lot that still needed to be done there and we needed
change things to handle our frozen columns.

Some interesting trivia:
* in RTL, different browsers have different ways of handling scrollLeft.
  they all show the element scrolled all the way to the right by default
  (So you see the first columns) but chrome tells you scrollLeft is some
  large number to reflect how far from the left you’d have to scroll to
  get there if you scrolled all the way to the right like it should.
  Safari says scrollLeft is 0 by default and then as you scroll left to
  to see the rest of the columns, it counts down and shows
  a negative number. And IE does something else.
  So you have to do some trickery to normalize them all to be a
  consistent value, and that is why this pulled in that NPM module

Change-Id: Id00025db0918cbc2d354e96af88023e70e041e58
Reviewed-on: https://gerrit.instructure.com/144672
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-04-30 21:20:54 +00:00
Ed Schiebel 3662e42ec6 Keep to do in a course with other course items
fixes ADMIN-917

test plan:
  - have a student with a course assignment on some date
  - have the student add a to do to the course on the same date
  > expect the planner to show the assignment and the todo in the same
  > grouping

Change-Id: Ice5b796935bfe3f69d05db509696fb2ce7b38cf3
Reviewed-on: https://gerrit.instructure.com/147161
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Christi Wruck
2018-04-25 14:55:21 +00:00
Mysti Sadler 77171b991e Use "build" script for packages pre-install
refs ADMIN-761

When we added canvas-planner to the packages
directory, we set up a prebuild script to
build everything we needed for Canvas that
would run during yarn install.  This causes
canvas-planner to have to do a lot that it
doesn't need to do when we just want the npm
packages to be installed (for the sync-
translations build or for other purposes)
so we're setting a specific build step
instead

Test Plan
- Specs pass

Change-Id: I72a0dc52cd9be1255985d69921d9910ba12e9ffe
Reviewed-on: https://gerrit.instructure.com/147565
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2018-04-20 18:02:34 +00:00
Ryan Shaw 524a8865f4 Get i18n-js and i18nliner from npm, not vendor
closes:  CORE-1201

test plan:
* the qunit & selenium tests that we have around this should still pass
  (except for that one that had to be changed because the spec was 
  actually expecting the wrong thing and the old code was erroneous)
  
* load the app in fully production build and make sure translations 
  still work

Change-Id: Id06c38f60c1670fb93e85d5479ec747035c1158b
Reviewed-on: https://gerrit.instructure.com/143456
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-04-19 21:34:33 +00:00
Derek Bender 11b30e7fea upgrade yarn to 1.6.0
Change-Id: Icc59c9c43fea079196d9a0dc29b23ac0f1da74c7
Reviewed-on: https://gerrit.instructure.com/147047
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2018-04-19 20:31:06 +00:00
Ryan Shaw 3ffc72eda6 Ensure code sent to browsers is es5
…so it works in safari10 & IE11

Closes: CORE-1280

test plan:
* run yarn
* go into a file in node_modules that is used in a webpack bundle 
  (Eg: node_modules/react-dom/index.js) and change a `var` to a `const` 
  or a `let` and a `function` to an arrow () => function.
* run `yarn webpack-production`
* it should fail with errors

Change-Id: Ic1589d3c1cc266eb5be22cb4716465818d0e98b6
Reviewed-on: https://gerrit.instructure.com/146496
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-04-19 16:11:15 +00:00
Clay Diffrient 3640b3b0cd Bump canvas-rce to v3.1.0-hotfix.0
closes CORE-1288

Test Plan:
  - Add an image to a page using the RCS
  - Select that image in the RCE
  - Select another image from the RCS
  - The image should be replaced with the new one

Change-Id: I83af646010d0cc3579d6d58c4da8081084f6a9af
Reviewed-on: https://gerrit.instructure.com/147106
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-18 23:00:52 +00:00
Clay Diffrient 9b74f11a59 Update Add People modal to Inst-UI 5.0
closes CORE-1125

Test Plan:
  - Go to the account level courses page
  - Go to the + for adding people to one of the courses
  - Activate your screen reader
  - You should not be able to escape out of the modal
    that is now open.

Change-Id: I023928990504acb4d02a912381b1fe96733932e6
Reviewed-on: https://gerrit.instructure.com/145765
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-05 22:09:28 +00:00
Clay Diffrient 8ddff7aef4 Use new inst-ui menu for more options
closes CORE-1122

Test Plan:
  - Go to the account level user page
  - Using a screenreader go to the "More People Options"
    button at the top.
  - Open the menu
  - VO should trap you inside that menu

Change-Id: Ic6626882625a4d034d09c96d8556c2e3c9922e9a
Reviewed-on: https://gerrit.instructure.com/145743
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-05 22:09:22 +00:00
Clay Diffrient c55ff773d7 Make screenreaders alert when search results are loaded
closes CORE-1116
closes CORE-1117

Test Plan:
  - Enable a screenreader
  - Go to the new account level user/course search
  - Search for something
  - The screenreader should indicate to you when results have finished loading
  - This should work for Users and Courses

Change-Id: I4e81a86fb9e9340d3acbdab3e8f28fcbfb42d2cd
Reviewed-on: https://gerrit.instructure.com/145634
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-05 22:09:17 +00:00
Cameron Matheson fa70851608 upgrade to apollo 2.1
closes RECNVS-377

Test plan:
  make sure student context cards work

Change-Id: Ib306e0be5d51f68afad0ff112bf745d9e0ad1d5b
Reviewed-on: https://gerrit.instructure.com/145501
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-03 22:05:07 +00:00
Clay Diffrient 0a7c024852 Bump canvas-rce to 3.1.0
closes CORE-1012
closes CORE-1074
closes CORE-722

Test Plan:
  * Changes from 3.0.3
    - Smoke test of RCE, potential UI issues
      (This was adding support for tinymce@4.7.x)
  * Changes from 3.1.0
     - Upload an image
     - Notice that the image thumbnail loads without
       needing a page refresh

Change-Id: I0a0320b487c93b49346c1d2d730c375738b1fa2b
Reviewed-on: https://gerrit.instructure.com/143497
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-03-30 20:46:29 +00:00
Ryan Shaw 33a5bd5a0a Upgrade instUI from 4.7.3 to 4.8.0
Fixes: CORE-1105 CORE-1106 CORE-1174

Test plan (for CORE-1105 CORE-1106):
* using the keyboard, go to /accounts/x/users
* you should be able to hit “enter” to click on the “Act As” or 
  “Send Message” icon links

Test plan (for CORE-1174):
* set your feature flags so you use the RTL layout
* the navigation tray, RCE a11y checker, etc should pop in from
  the opposite side of the page than the did in normal LTR layout

Change-Id: I25d664bfd94970f4bbb37ba8ebe5c72cc9e5b3ff
Reviewed-on: https://gerrit.instructure.com/144969
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-27 20:03:14 +00:00
Ryan Shaw d8014ed53c make feature flags for Right To Left layout
Closes: CORE-1154

There are 2 feature flags here. One a specific user (internal
employees, sales people, contractors, etc) can turn on to see where we
are and what would still need to be done. And the other is for an
account to be able to turn on to let the users in their account that
have their language set to an RTL language (eg: Arabic, Farsi or Hebrew)
see the interface in RTL

This commit is part of a chain of commits. you'll need to apply the ones
that follow-on after this to see most of the actual Right To Left
features, this commit is mainly just to create the feature flag.

Test plan:
* go to your user settings page
* you should see a feature option for Force RTL Layout”
* it should show that it is “in development”
* it should should be hidden: eg: only appears for site admins and not
  For normal users
* turn it on

(if you have this checked out along with the others that follow beind
  this commit)
* navigate around canvas, most things on most pages should be RTL
* you should be able to get an idea of how much more work and what
  Kind of changes we’d still need to make to get it 100%

* now turn off that user feature flag, and go to your account's settings
* turn on the "allow users from RTL languages to see RTL layout"
  account-level feature flag.
* nothing should change for you, it should be LTR like normal
* set your language to either Arabic, Farsi or Hebrew
* now the interface should all be in right to left.
  (again, you'll need to have the follow-on commits to this to see all
  of the RTL changes)

* without either of the feature flags turned on, absolutely nothing
  should be different at all anywhere in the interface.

Change-Id: Ia78d86fa46d2d289b1913c5d1340546d7f6c3a1f
Reviewed-on: https://gerrit.instructure.com/143891
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-03-21 21:09:38 +00:00
Clay Diffrient 71c7ff7160 Handle dependent variables in the theme editor
After the theme editor refactor dependant variables were not
working.  This fixes it.  This also makes it so that
override files are handled properly.

closes CORE-1085

Test Plan:
  - Go to the theme editor with a new theme
  - Change the "Primary Brand Color"
  - "Primary Button" should change as well
  - Preview the changes
  - Change should be reflected after the preview loads
  - Repeat that again, the same behavior should occur.
  - Change the "Primary Button" color and preview
  - The two items should now be "unlinked" and they change
    independent of one another
  - Upload a js override
  - Preview changes
  - Upload a css override
  - Preview changes
  - Both the js and the css fields should be populated

Change-Id: I61572a3c5bdf4f63c82078dff492dc504d0af7bf
Reviewed-on: https://gerrit.instructure.com/142395
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-03-20 20:07:30 +00:00
Ryan Shaw d65246ba97 Convert last remaining code from instUI 3 to 4
updates all the instui components used for these alerts to 4.x
Closes: CORE-762 CORE-732

Change-Id: Ia5af600b5747bfbeca4015d30d2be900700a90ae
Reviewed-on: https://gerrit.instructure.com/143337
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-12 23:20:07 +00:00
Ryan Shaw ad45370766 Upgrade tinymce-a11y-checker to 1.4.0
test plan:
* in canvas, go to a page with a text editor (like a wiki page) and
  click the "a11y checker" button in the editor toolbar
* the widgets that appear in the trays on the right of the page should
  work. look at the trays, the buttons, the text inputs, etc.

Change-Id: I43476620c5a1d8cf666e20b9495dd499791a4ee4
Reviewed-on: https://gerrit.instructure.com/143347
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-12 23:19:47 +00:00
Ryan Shaw f4f60700b8 Upgrade mediaelement to latest master of our fork
Fixes: CORE-1091
show controls when they receive focus (#39)

if controls are visibly hidden, they should still be tabbable for
accessibility, and when they get keyboard-focused, they should become
visible again.
See: https://github.com/instructure/mediaelement/commit/0402b2b76

Change-Id: Ic655d43a64d111662f8d7368f21032664a8aee74
Reviewed-on: https://gerrit.instructure.com/142693
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-12 16:18:05 +00:00
Ryan Shaw 06d3ceb331 git rid of our vendor’ed fork of mediaelement
refs: CORE-24

test plan:
* this net result of this change should mean that we are using the exact
  same code as we were using before, just pulled from github directly
  in our package.json instead of vendored into our repo.
* testing the follow-on commits should show this worked correctly

Change-Id: Ie6d022d5fe8ed1a607f66f9d426c47ec7e8f5b14
Reviewed-on: https://gerrit.instructure.com/142381
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-12 16:17:43 +00:00
Ryan Shaw ec0ed12ffb Use node 8.10.0 instead of 8.9.4
Test plan:
* automated builds should pass
* docker stuff should work

Change-Id: I120e5689b6b219dc295517e92047cdf3f8b5d61e
Reviewed-on: https://gerrit.instructure.com/143022
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-09 18:56:22 +00:00
Clay Diffrient 497fe4d5ea Update to yarn 1.5.1
closes GH-1250

Test Plan:
  - Everything builds

Change-Id: Id51b8997f5ae1b53c24c2b4b616c6956833ed2b5
Reviewed-on: https://gerrit.instructure.com/142553
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
2018-03-08 19:53:13 +00:00
Ryan Shaw ff665bf9ab script to upgrade without adding dupes to yarn.lock
because yarn is silly and frequently adds duplicate entries for things
into yarn.lock when it could satisfy everything the app needs with one
version; when you make any changes to package.json, run this script:
`yarn upgrade-and-dedupe` 
to make sure that yarn.lock doesn't add needless duplicates of things.

if yarn ever fixes this issue:
https://github.com/yarnpkg/yarn/issues/579
then this can go away.


test plan:
1. check this out
2. run `yarn upgrade-and-dedupe`
3. push the change that commit makes
4. it should pass jenkins and not introduce any errors

Change-Id: I8c268cc4c7c6ac4474221ce65129a6ef8b261813
Reviewed-on: https://gerrit.instructure.com/142447
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-06 20:07:57 +00:00
Ryan Shaw 63a0ccf95d [npm dependencies] update all our npm dependencies
This is just the regular “update all the things” commit.
For things in package.json that we just want the latest version of,
I changed them to a simple major with a carat. (Eg: “8^” or “4^”),
that way you can see easier which things are specifically locked down
To a specific version (or range of versions) for a reason.

Test plan:
* automated specs & build tasks should work

Change-Id: Id7a3f853bd0f7537cc0f08d7dba8d6726b836c44
Reviewed-on: https://gerrit.instructure.com/141653
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-02-23 21:32:43 +00:00
Clay Diffrient 928f334cfb Convert theme editor sidebar to use instui
closes CORE-1017

Test Plan:
  - Enable Theme Editor Refactor feature flag
  - The sidebar tabs (Edit/Upload) should use InstUI
  - On the Edit tab, the accordions should use InstUI
  - When the feature flag is off the jQuery UI stuff
    should be used.

Change-Id: Ic8bfac91d644fc75618f1f0898afbcfcf411c3fd
Reviewed-on: https://gerrit.instructure.com/140561
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-02-22 20:31:59 +00:00
Ryan Shaw 465b36270c [instui 3->4] upgrade navigation_header
Closes: CORE-750

This replaces all the code for the global nav tray
That pops out when you select “courses” “groups” “Help” or your avatar.
It replaces react-tray with InstUI tray and uses instUI components
wherever possible. that means that we need much less custom one-off
css for these things and can just use the instui defaults most of the
time.

Test plan:
* do a regression test on each of the  global nav trays that pops out
  when you select “courses” “groups” “Help” or your avatar

Change-Id: Ib32c6cc9e091ec5cbdbc19ced9fbbd5e2e4bae8f
Reviewed-on: https://gerrit.instructure.com/135354
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-02-21 20:10:41 +00:00
Ed Schiebel ec05f824fc Put finishing touches on planner under canvas
- update README with new instructions
- update how canvas runs sub-package tests
- remove planner's test server

closes ADMIN-742

test plan:
  - when jenkins runs, check to see that planner's tests run too

Change-Id: I2493b65f580c76b28f225f1330e99e1ceb1378b4
Reviewed-on: https://gerrit.instructure.com/139882
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-02-21 17:49:03 +00:00
Chris Hart 72c07fe5d5 Upgrade Canvas to INSTUI 4.7.2
Fixes: UIDEV-170

Updates the parts of Canvas that were using
4.7.1 to the 4.7.2 patch release to add a bugfix
for List/ListItem where two badly-scoped CSS selectors were
selecting every element on the Canvas dashboard.

Test plan:
- Confirm ToDo List on Canvas dashboard is working
  as it should
- Confirm the selectors shown in the screenshot in the
  JIRA ticket are now only targeting first and last
  items in the List component (see ToDo List in sidebar):

  https://www.screencast.com/t/cq4W4MGcemn

Change-Id: I16c4bad0ef2bac76d0e9a4d34d6ce9869ab0587c
Reviewed-on: https://gerrit.instructure.com/141100
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
2018-02-15 20:37:02 +00:00
Ryan Shaw 637b8b756d [eslint] have --fix add copyright header for you
Test plan:
* Run eslint —fix against a file that doesn’t have a copyright header
  (Eg: eslint --fix app/coffeescripts/AssignmentDetailsDialog.js )
* it should add the copyright header for you
* run eslint on a file that already has a proper copyright header
* it should not duplicate it

Change-Id: I0bc05b6cc267fb74909f7a0fe0e93ecda1e2136e
Reviewed-on: https://gerrit.instructure.com/140757
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-15 20:01:41 +00:00
Brent Burgoyne 78c60b331f upgrade canvas-rce to 3.0.2
upgrades instructure-ui and fixes a microsoft edge but when inserting
equations.

closes CORE-906

test plan:
- smoke test rce sidebar for inst-ui upgrade
- open an editor in edge
- insert an equation using the equation editor
- it should show the equation, not an X with the alt text

Change-Id: Ieb44771ddbba911598d75b20367b246e6f83fc20
Reviewed-on: https://gerrit.instructure.com/140895
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-02-15 17:54:38 +00:00
Ryan Shaw 97510022cd don’t cp all of canvas-planner’s node_modules dir
this is to prevent canvas from copying everything in canvas-planner’s
node_modules dir into /node_modules/canvas-planner/node_modules

this will mimic the exact same behavior that pushing it to the npm
repository and pulling it from there in canvas’s package.json

test plan:
* do `ls node_modules/canvas-planner/node_modules/jest*`
* you should get: ls: node_modules/canvas-planner/\
  node_modules/jest*: No such file or directory

Change-Id: Ie428b3d0a5d6cc1d9bec89ae00adb3d451dfc916
Reviewed-on: https://gerrit.instructure.com/139907
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-05 22:13:31 +00:00
Brent Burgoyne e5e10b7824 upgrade a11y checker to 1.3.3
fixes untranspiled es6 that was breaking the prod build

closes CORE-972

Change-Id: Ic1068ed2eda81f0167563fb37c8d57473da30338
Reviewed-on: https://gerrit.instructure.com/139858
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-02-05 18:10:22 +00:00
Ed Schiebel 40b876493e Move planner under canvas-lms
closes: CORE-949

this also upgrades us to use what was on canvas-planner master
as of 1pm on 2/1/2018 (specifically 9569cc1)

test plan:
* canvas planner should work
* all automated builds should pass

Change-Id: Iecce81d640c8aacb79189e2b26946613a03d25f2
Reviewed-on: https://gerrit.instructure.com/135947
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-02 23:58:48 +00:00
Ryan Shaw 08b922ca3e Upgrade instUI from 4.7.0 to 4.7.1
closes: CORE-948

Change Log

4.7.1 (2018-01-25)
Bug Fixes
ui-menu: Pass href prop down to ElementType (e876404)

Test plan:
* menus should still work the same as they did before

Change-Id: Ic5817dda6d2fda3adea9905cebcd87bfa356a697
Reviewed-on: https://gerrit.instructure.com/139742
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-02 21:22:18 +00:00
Ryan Shaw 8d2d33489e Restore ThemeEditor to how it was before InstUI conversion
Fixes: CORE-856

This is to fix the bug that was found on beta, once we figure out a way
around that we can revert this revert and move forward

this is the result of `git revert 2fce80fe6d 96bfe1f8c2 72ca2dcacb

Test Plan:
  - Go to the theme editor for a theme
  - Make changes to the theme (including stuff inside each of the
    different hidden areas) on the Edit tab
  - Preview changes, after change those fields should reflect the
    new changes
  - Enable global css/js on the account
  - Do the same test as done previously, modifying fields, etc.
  - Switch to the Upload tab and preview changes, changes should
    still apply
  - Upload CSS/JS and preview, changes should apply
  - Upload different CSS/JS, switch to the Edit tab
  - Preview and notice that changes still apply

Revert "Convert Theme Editor Accordion to use Inst UI"
This reverts commit 2fce80fe6d.

Revert "Convert ThemeEditorAccordion to ES class"
This reverts commit 96bfe1f8c2.

Revert "Convert theme editor sidebar to use InstUI"
This reverts commit 72ca2dcacb.

Change-Id: I0ac36b144c325eaa5ae7d8c4ba86b7807aa3431b
Reviewed-on: https://gerrit.instructure.com/139594
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2018-01-31 01:25:26 +00:00
Clay Diffrient 464f295a9c Bump tiny-mce-a11y checker to 1.3.2
closes CORE-907

Test Plan:
  - Load up an RCE with a color contrast issue
  - Use the a11y checker to fix that issue
  - Save the RCE entry and reload
  - The change in color should have persisted

Change-Id: Ia699175ec462f9d54c34a4adaad21135a529e8ac
Reviewed-on: https://gerrit.instructure.com/139542
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-01-30 22:42:26 +00:00
Cody Cutrer c715f6fcf7 bump timezone.js
closes CORE-577

test plan:
 * smoke test some datetime pickers, and maybe try a language or two

Change-Id: I808d64c20e89ed287a38fda5f00d61a8f422bae7
Reviewed-on: https://gerrit.instructure.com/139326
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2018-01-30 20:29:56 +00:00
Clay Diffrient 145763fce5 Revert "Bump tiny-mce-a11y checker to 1.3.2"
This reverts commit 49f73619a8.

Change-Id: I92dacba9822065836fb444cc08d4956e5431e5c2
Reviewed-on: https://gerrit.instructure.com/139541
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2018-01-30 19:38:50 +00:00
Clay Diffrient 49f73619a8 Bump tiny-mce-a11y checker to 1.3.2
refs CORE-907

Test Plan:
  - Load up an RCE with a color contrast issue
  - Use the a11y checker to fix that issue
  - Save the RCE entry and reload
  - The change in color should have persisted

Change-Id: Ieabd5f50d437ce5d2bfd82841fa071dcc260e652
2018-01-30 12:21:38 -07:00
Jeremy Neander 249ac38f88 Revert "Temporarily stop running karma tests concurrently"
This reverts commit 518436d223.

Change-Id: I34726aa49a84b2794fcfa4cd020415303db27b9d
Reviewed-on: https://gerrit.instructure.com/138309
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-29 19:04:15 +00:00
Jeremy Neander 410e0d8e87 hash webpack module ids
This also removes md5 asset chunk hashing.

test plan:
* task force consensus

Change-Id: Id67efa204bef719fdb10b3a6d429915744ff2044
Reviewed-on: https://gerrit.instructure.com/139415
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-29 18:44:57 +00:00
Jeremy Neander e118ce3972 use md5 to hash webpack bundles
test plan:
* all eyes of the hot potato approve

Change-Id: Idaa349b2a5b526b46bfe72df2673093fb6ff88b3
Reviewed-on: https://gerrit.instructure.com/139120
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
2018-01-25 20:47:55 +00:00
Jeremy Stanley 4ab2e3f9eb Revert "roll back webpack to 3.8.1"
didn't solve the problem on beta

This reverts commit beec413391.

Change-Id: I5d88ee0fea47eccde45847b51c6fa43d2aacc28f
Reviewed-on: https://gerrit.instructure.com/139152
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-01-25 20:22:38 +00:00
Venk Natarajan 363544197b Bump Instui to 4.7.0
This should fix the combobox in the "edit announcement" view.

Fixes COMMS-725

Test Plan:
* Use Safari and voiceover turned out.  Use the proper safari
  commands to move into the combobox.  (Get a cheatsheet from
  Nathan if needed, don't try just "tab" and "enter", etc.)
* Verify that the section names are read as you navigate up
  and down the menu.
* Here's the changelog for the instui upgrade:
  https://gerrit.instructure.com/#/c/138876/11/CHANGELOG.md
* Find a couple instances of each component mentioned in that
  changelog and make sure they didn't break.

Change-Id: Ic648fa4c50d14947a3ed5ee65a5d158152405856
Reviewed-on: https://gerrit.instructure.com/139101
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-01-25 19:41:39 +00:00
Jeremy Stanley beec413391 roll back webpack to 3.8.1
test plan: public/dist/webpack-production/webpack-manifest.json
 should not reuse chunk ids for files such as zh-tw.bundle-xxxxx.js
 that have changed since the previous release

hopefully fixes ADMIN-706

Change-Id: I8cee724422788c86627092eb0dfd7826496c3175
Reviewed-on: https://gerrit.instructure.com/139116
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-01-25 19:07:39 +00:00
Ed Schiebel 1c1666191d Bump canvas-planner to v1.0.16
The big change to planner in this version is instui 4.6.0

closes ADMIN-680
refs ADMIN-679

test plan:
  - student_planner_spec.rb selenium tests pass
  - planner seems to work OK

Change-Id: Ia5fc7ad265e3110e7d53100f05446929e34e05b7
Reviewed-on: https://gerrit.instructure.com/137588
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-01-17 20:24:12 +00:00
Ryan Shaw 518436d223 Temporarily stop running karma tests concurrently
…until the gradebook team can figure out how to
fix the intermittent failure in the screenreader gradebook tests

Change-Id: Idb2c2e766855fcba747e075fdc53b21c1feaf0ea
Reviewed-on: https://gerrit.instructure.com/138142
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-17 02:43:10 +00:00
Ryan Shaw d8259be7cc speed up JS tests by running them concurrently
closes: CORE-865

In order to get accurate coverage reports (ie: so the coverage numbers 
don’t only reflect a fraction of the total tests), when the COVERAGE 
environment variable is set, it does not split them out into groups to
run concurrently. That way our linters-and-js-master build (which sets
that environment variable) will run the same as it always has and our 
patch-set builds (which run the linters-and-js) will be faster.

Test plan:
* run ‘yarn test’
* it should be a lot faster than it used to be

* look at the linters-and-js build in jenkins for this commit
* it should have test reports for all both groups (coffee, js)
  Of karma tests as well as for the jest tests.

* look at the coverage report after this gets merged. It should be
  the same as it was before

Change-Id: I35147cc84df4afae92c1a73c201667d4d44b5518
Reviewed-on: https://gerrit.instructure.com/136373
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-16 19:32:28 +00:00
Jeremy Neander aad75edec7 update parse-decimal-number to 1.0.0
A hack can be removed for parsing numbers now that 1.0.0
incorporates the needed behavior.

test plan:
* verify Jenkins passes

Change-Id: Ifaea8fd348f4f804e9a6042fb392c699badeea6e
Reviewed-on: https://gerrit.instructure.com/138046
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-01-16 17:39:59 +00:00
Landon Gilbert-Bland 5829f0850a Fix calendar event cutoff for specific time ranges
The actual fix was applied to the fullcalendar package we are using.
This just bumps our local version to apply the fix in canvas-lms. The
fix in fullcalendar can be seen here:
https://github.com/instructure/fullcalendar/pull/1/files

fixes COMMS-268

Test Plan:
  - Navigate to the calendar
  - Create a new 50 minute even (ie, from 8:00 to 8:50) with a title
  - Switch the calendar to week view
  - Notice that the bottom half of the title is not cut off

Change-Id: I084e085d7a97039df7729870271a8691e010e4ba
Reviewed-on: https://gerrit.instructure.com/137608
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-01-15 17:10:29 +00:00
Ryan Shaw a33231cf0a let jest know about some of our aliases
…and prevent a giant error from being logged from ui-themable


test plan:
* the “Add Ability To Add External RSS Feeds…” commit that is based
  on top of this should pass jest
* you should not see an errors like this when jest runs:
console.error node_modules/@instructure/ui-themeable/lib/registry.js:342
      TypeError: Cannot read property 'porcelain' of undefined


Change-Id: I8a9583a3d16394a919a223cedfd577aef7f70ec1
Reviewed-on: https://gerrit.instructure.com/137778
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
2018-01-12 19:16:18 +00:00
Clay Diffrient 14ce1d7a80 Bump tinymce-a11y-checker to 1.3.0
closes CORE-826

Test Plan:
  - Load up an RCE instance in Canvas
  - Use the a11y checker to ensure that the following
    new features work:
      - Elements with only links don't trigger the a11y checker
        (commit: 8f88c941776583ec65dc97862fc0b30db175760e)
      - Captions with only whitespace on tables trigger it
        (commit: f22604c438e31508ca2e8f72317bbe1e07417e60)
      - Modifying a header that is in the wrong order becomes a <p>
        (commit: 5c78821102054fd060a1cf2ced76bbfd45ccb561)
      - The show learn link shouldn't show on headers too long errors
        (commit: 3df571c00fbffe2c2c49b00ab89227dc0c6fb2f5)

Change-Id: I39894cc8f8b9c3d9cbf7695be93335d84da11cfa
Reviewed-on: https://gerrit.instructure.com/137397
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-01-11 20:17:40 +00:00
Steven Burnett 4bcdea0497 Revert "Enforce prettier formatting with eslint"
This reverts commit 7d9ef5c77e.

Change-Id: Ibb49916220b035205609d38a7e1c6dcfee9d04a6
Reviewed-on: https://gerrit.instructure.com/137551
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-01-11 00:10:42 +00:00
Ryan Shaw 7d9ef5c77e Enforce prettier formatting with eslint
This makes prettier errors eslint warnings. So when you 
`eslint --fix some/file.js` it will format it with prettier

to try this out, apply this commit and run eslint against your files.
this change will make it so it runs it through prettier and forces
your code to look like prettier would output. But it doesn’t force
Prettier formatting to pass eslint since they are just warnings so if
you really want to format your code differently than prettier you can.

Change-Id: I4f1cdf4962173002a7dc22138be06cc66b842190
Reviewed-on: https://gerrit.instructure.com/131773
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-10 18:09:10 +00:00
Clay Diffrient 2fce80fe6d Convert Theme Editor Accordion to use Inst UI
closes CORE-691

Test Plan:
  - Edit tab works as expected
  - You can move between "accordion" pieces in an
    accessible manner
  - Testing this also proves g/135762 is good as well
Change-Id: Iee447bc97ad5392e74b033b072179f20984e3f6e
Reviewed-on: https://gerrit.instructure.com/135893
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2018-01-08 21:39:24 +00:00
Ryan Shaw 87e15a6089 upgrade instructure-ui to 4.6.0
Closes: CORE-821

Test plan:
* the spacing between the course links in the global tray that is based 
  on this commit should be even

Change-Id: Id93d2cfef065a7bec776843ad3a65adac9e3a032
Reviewed-on: https://gerrit.instructure.com/136879
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-04 18:10:29 +00:00
Ryan Shaw c1c93e1e14 Use node 8.9.4
If you are getting errors about “The engine "node" is incompatible with 
this module. Expected version ">=8.9.4”.” after applying this change,
It means you need upgrade your node to 8.9.4. to do so:

if you use nvm: `nvm install` inside the canvas dir
If you use brew: `brew upgrade node`
If you use apt-get: see https://github.com/nodesource/distributions
If you use docker: rebuild your docker container

Closes: CORE-704

Test plan:
* js tests should pass
* webpack and brandable_css should generate the exact same
  CSS and JS output as before.
* all of our build tooling, including docker stuff, should continue
  to work and use Node 8. 

If you know of something else that needs to be updated to use node 8 
everywhere, let me know

Change-Id: Ic019710c219d8b8c627ce03e0dffde731cfa2856
Reviewed-on: https://gerrit.instructure.com/136802
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-03 20:41:37 +00:00
Brent Burgoyne fa9e6fbc3a upgrade d3 to latest 3.x version
the previous version caused an error when building native
dependencies during the yarn install when using node 8.

refs CORE-704

test plan:
- ensure d3 charts in gradezilla/OutcomeColumnView render correctly
- ensure d3 charts in gradebook/OutcomeColumnView render correctly
- ensure d3 charts in grade_summary/OutcomeLineGraphView render
  correctly
- ensure d3 charts in client_apps/canvas_quizzes render correctly
- yarn install runs without errors using latest node 8 lts

Change-Id: Ib2f8d4acab6060795b50e545eb64f324587b6300
Reviewed-on: https://gerrit.instructure.com/134476
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-01-03 20:40:37 +00:00
Ryan Shaw e500f77ef0 Update yarn/npm dependencies
this will make it so we can use karma with the latest node. once the 
commit to upgrade d3 is merged, that was the only other thing we needed
to do to have everything working on node 8.


Change-Id: I820b27ee3da38818b69554c6e409a2177370ca34
Reviewed-on: https://gerrit.instructure.com/136752
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-01-03 16:56:54 +00:00
Clay Diffrient 1c3b09f3a9 Bump canvas-rce to 2.6.3
closes CORE-809

Test Plan:
  - Add an equation to an RCE instance
  - There should not be a border around it

Change-Id: I9ee6ba8937035c925857825b9afe94e37c8e0f52
Reviewed-on: https://gerrit.instructure.com/136637
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-12-29 21:07:15 +00:00
Ryan Shaw f2240b0985 move jest config to it’s own file
Change-Id: I0071e39fdde33a7c14e7360e31751e5329be5fff
Reviewed-on: https://gerrit.instructure.com/136372
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-12-28 21:02:03 +00:00
Clay Diffrient 6b77eaebfd Add @instructure/ui-themes and @instructure/ui-themeable
Change-Id: I3b1ae6e375eb683407de7a2db68ca6db42723474
Reviewed-on: https://gerrit.instructure.com/136333
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
2017-12-21 16:56:39 +00:00
Ed Schiebel 11950bbeb2 Bump planner to v1.0.14
closes ADMIN-623

test plan
  - planner's selenium specs pass
  - planner seems to work like you'd expect
  - the changes in ADMIN-622, g/136011 are evident

Change-Id: I46fca8359f85dbc8ab3b0ed72769e33b9d5b1402
Reviewed-on: https://gerrit.instructure.com/136021
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-20 18:50:44 +00:00
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