Commit Graph

537 Commits

Author SHA1 Message Date
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
Steven Burnett 1f7bf02c4d add canvas media package
fixes COMMS-2290
flag Assignments 2

Test Plan:
- create a media upload assignment
- in a2 as a sutdent go submit an assignment
- notice a video upload button
- click button
- notice the modal is shown and you can drag and drop video files
  or record yourself
- close modal
- notice no console errors or crashes

Change-Id: I9a6184efb99aa05d0d634d2744cca00abf5ae26e
Reviewed-on: https://gerrit.instructure.com/204375
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
2019-08-13 20:17:06 +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 f847258802 canvas-planner: upgrade to instUI 6
Change-Id: I60ae49a1a913d0aaffa3891077b051bdbea6fb6b
Reviewed-on: https://gerrit.instructure.com/204307
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-08 23:10:29 +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 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
Ed Schiebel 62ebbad0ae Upgrade instui to 6.8.1 for canvas-rce
closes COREFE-193

test plan:
  - the RCE still works and the tests pass
  - in particular, be sure trays and dialogs open (this was
    broken by instui 6.8.0)

Change-Id: Ic4bc52686adbe1ae182f706e2146d7cae57ffb98
Reviewed-on: https://gerrit.instructure.com/203461
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-05 19:30:20 +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
Clay Diffrient 63be4cd220 Update canvas-rce InstUI to 6.7
Change-Id: I7b49f95daa7b2ee74ccc11cdf99d8c663bf6995c
Reviewed-on: https://gerrit.instructure.com/201497
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-07-19 15:25:44 +00:00
Ryan Shaw 98d92f1871 Upgrade more NPM things
Test plan:
* automated tests should pass

Change-Id: Iedbf82c5addaa0842b1bb83f9baa71dbcf6e3d55
Reviewed-on: https://gerrit.instructure.com/201476
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-07-18 22:58:11 +00:00
Ryan Shaw ebf684c78a Upgrade all the NPM things
Test plan:
* automated tests should pass

Change-Id: Idb126e0a80bceb948862d4d0a504af2340520aaf
Reviewed-on: https://gerrit.instructure.com/201213
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-17 16:00:20 +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
Ryan Norton 860330679f update media-capture version to 5.53.2
Change-Id: Ic0de0de029931c450ec69f0de8b29a0ada2f24a4
Reviewed-on: https://gerrit.instructure.com/200182
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
2019-07-05 15:55: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
Ryan Shaw ece2a5cc71 Don’t use special eslint for canvas-planner
…instead, just use the default config for the rest of the repo

Test plan:
* cd packages/canvas-planner
* yarn eslint src/components/BadgeList/index.js
* you should not see an error about not being able to find flowtype

Change-Id: I48c4ab3ac20a60352c20c489addb4d4b4a32e83a
Reviewed-on: https://gerrit.instructure.com/199060
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-06-25 22:22:12 +00:00
Clay Diffrient 3664d5ddea Update yarn.lock to have 6.4 version of pagination
Test Plan:
  - Automated tests pass

Change-Id: I0776d792e5c8befbc60e1b99f112fc90dab5e463
Reviewed-on: https://gerrit.instructure.com/199008
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-25 20:33:49 +00:00
Ryan Shaw c0f8191be8 Upgrade the instUI used by new canvas-rce to 6.4.0
Closes: CORE-3076

Test plan:
* verify that the “View with the focused prop” mentioned in the jira
  ticket is in this release

Change-Id: Ic0d1763d408341ac395f9b23c61b381c6ae59cda
Reviewed-on: https://gerrit.instructure.com/198067
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-06-21 23:14:36 +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
Mysti Lilla 6dc10e6aa5 Clean duplicate in yarn.lock
Change-Id: Ic9d137ae766faa72b84d1b0eeda26c12b60ff163
Reviewed-on: https://gerrit.instructure.com/198492
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2019-06-20 22:15:49 +00:00
Jon Willesen ad896b2d71 rce: hook up the a11y checker button
This requires an update to the tinymce-a11y-checker package for it to
actually work.

closes CORE-2638

test plan:
- click the a11y checker button in the rce status bar
- the a11y checker tray should open up and run

Change-Id: Ic5afc94e14869e58976e67ba71023ccbc4347f5e
Reviewed-on: https://gerrit.instructure.com/197336
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-06-19 20:15:23 +00:00
Clay Diffrient f8711628fc UploadImage: Unsplash Panel
refs CORE-2626

Test Plan:
  - Start RCE API using the proper ENV variables, I can provide
    those upon request
  - Go to the Upload Image dialog
  - Click the Unsplash Panel
  - Type in a search phrase
  - You should be able to do a search and get results back
  - NOTE: At this point, you can't select an image and have
    it be inserted into the RCE

Change-Id: I06832be6ef1c2e299c531c68a8d34782c3cebee0
Reviewed-on: https://gerrit.instructure.com/195273
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-06-18 17:37:20 +00:00
Ed Schiebel a690a93c6d Make RCE StatusBar behave like a toolbar
closes CORE-2903

test plan:
  - load a page with the rce
  - TAB into the RCE and into the StatusBar
  > expect right/left arrows to move focus from one button to
    the next.
  > expect focus to cycle back to the other
    end when you go too far
  - tab out of the status bar
  - click one of the buttons to give it focus
  - use the arrow keys again
  > expect focus to move right|left from the starting point
  - give he drag handle focus
  > expect up/down arrows to resize the RCE w/o scrolling the page
  - fire up a screenreader
  > expect the button area of the status bar to be announced as a
    toolbar

Change-Id: I00e5a761ebc25ae784267c57bb5a653b68ccacba
Reviewed-on: https://gerrit.instructure.com/197059
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>
2019-06-17 22:12:57 +00:00
Jon Willesen 4e9c702d45 rce: add the resize handle to the status bar
One technical issue was the rce's iframe would swallow mouse events if
the mouse was dragged fast enough to wind up over the iframe before it
was resized. The solution was to temporarily add a div that covers the
window so that iframes won't take over mouse events.

closes CORE-2882

test plan:
- Find the new drag handle in the lower right corner and drag it around.
  The editor should resize vertically.
- Quickly drag into the RCE window. The resize should continue to work
  and not get stuck.

Change-Id: Id915f013737d98f0bf5e2b54a7e856a060d0c7e3
Reviewed-on: https://gerrit.instructure.com/194118
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-06-06 14:54:36 +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 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
Brent Burgoyne 401b732170 upgrade tinymce-a11y-checker to v2.1.0
fixes CORE-2505
fixes CORE-1747
fixes CORE-2847

test plan:
- create a new quiz
- enter an image without alt text in the rce
- run the checker, it should find the issue
- go to questions and add one
- enter an image without alt text in the rce
- run the checker, it should find the issue in the correct editor
- add an additional error to the editor
- run the checker, fix the error and click "Apply"
- focus should move to the close icon
- add an image by clicking on a thumbnail in the images sidebar
- run the checker, it should have an alt text filename error for the
  image

Change-Id: I3c81251c0fa11fa0637d59b01ef2b40e670eae01
Reviewed-on: https://gerrit.instructure.com/195733
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2019-05-30 15:31:54 +00:00
Ryan Shaw 86fdc49c1c make k5uploader work without jQuery
Change-Id: I28a525a9383cb47df10938dd007d6fbe3de221c7
Reviewed-on: https://gerrit.instructure.com/195077
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-05-23 23:54:02 +00:00
Steven Burnett cd3e069919 print canvas-rce errors in linter-js
Change-Id: I95410a3d5fc02fe0d0ad1e16180110d6a7dd32cc
Reviewed-on: https://gerrit.instructure.com/194947
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-05-23 19:41:26 +00:00
Ryan Shaw 6bb548e84c the usual ‘update all the npm things’ commit
test plan:
* automated tests should pass

Change-Id: Iee1572fb9721ac625cf90a2a209675bdd4df12cc
Reviewed-on: https://gerrit.instructure.com/194672
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-05-22 22:50:04 +00:00
Jon Willesen fe5f4b86cd rce: add path and word count to new status bar
This also replaces our old react-tinymce package with the official
@tinymce/tinymce-react package.

closes CORE-2836

test plan:
- typing in the rce should update the word count in the status bar
- the html path of the current cursor position should also be shown in
  the status bar
- generally test all the rce things because of the package replacement

Change-Id: Ibe2b182ff55ba2dc77988dcd4c1865a28667db95
Reviewed-on: https://gerrit.instructure.com/193154
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-05-17 13:27:35 +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
Ed Schiebel b9a70dbc11 skin rce using themeable
closes CORE-2630

test plan:
  - does the rce look like the mockup with the default theme?
  - does the rce look like the current custom canvas theme?
  - does the rce look right in high contrast?
  - do all the toolbar buttons work?
  - does kb nav among the toolbar buttons work?
     1. tab between toolbar button groups
     2. arrow between buttons in a group

you may ask "Why am I testing that buttons work?" Because simple changes
like adding a background to a button breaks kb nav.

Change-Id: Ie36335b36ac3a27a0d49314310fe7e338bef411f
Reviewed-on: https://gerrit.instructure.com/192410
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Laura Leavitt <lleavitt@instructure.com>
2019-05-13 17:24:48 +00:00
Ryan Shaw dca7832aeb Move k5uplodaer to /packages
Change-Id: Iee63af909559285316b4cba4bdc1a62ba8fd34a3
Reviewed-on: https://gerrit.instructure.com/192280
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-10 18:30:51 +00:00
Jon Willesen 81f7c56011 rce: add testcafe
closes CORE-2895

test plan:
- specs pass

Change-Id: I216436be045c1180c6601f4bf86ad9022dfc60d0
Reviewed-on: https://gerrit.instructure.com/192299
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-05-07 19:38:27 +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
Ryan Shaw cc1d87dd7b Update yarn.lock
Some things in yarn.lock got out of sync. This fixes that.

Change-Id: Ib9b9415bbca6de1f0c28aa11361fe9740cfaa838
Reviewed-on: https://gerrit.instructure.com/191471
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 19:39:34 +00:00
Ryan Shaw a4160b13f1 the regular “upgrade all the npm things” commit
Change-Id: Ia0b14f9778847690733edc545f9d405131041d8d
Reviewed-on: https://gerrit.instructure.com/191216
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-04-30 01:36:54 +00:00
Clay Diffrient ca8e9413d5 Add URL modal to the Upload Images plugin
refs CORE-2627

Test Plan:
  - Click images toolbar button
  - Select upload image
  - Click the URL tab panel option
  - A box should allow entering a URL
  - NOTE: It should not submit or embed the URL at this point

Change-Id: Ib1022198a23d291dff990cb0b91cefe163229702
Reviewed-on: https://gerrit.instructure.com/190035
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-04-29 15:48:53 +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 2d39d8e0a5 update inst-ui to 5.52.1
closes: CORE-2769

test plan:
* automated tests pass

Change-Id: Ie9b502c5eb86c11b95897e655e959d95cd7f67b5
Reviewed-on: https://gerrit.instructure.com/188957
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-04-15 15:39:47 +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 9ddd8269b2 upgrade tinymce to 5.x
Closes: CORE-2599

Test plan:
* with the rce_enhancements feature flag turned off, nothing should 
  change
* turn on the rce_enhancements feature flag
* go to an editor
* it should load without throwing any errors
  - note, you will see some “bomb” icons that we will need to update
    And the formatting/styling of the toolbar will need some work.
    But that is ok for this commit because it is all behind the feature
    Flag and we will get address those in a future commit

Change-Id: If28167731b5b285005143861e19fdb2fc0c34def
Reviewed-on: https://gerrit.instructure.com/187179
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2019-04-05 19:17:03 +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
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
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
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 4b0c45889d update inst-ui
Nothing major here. They just released a couple new versions so while we
are pretty current I want to stay up-to-date

Test plan:
* I am comfortable saying if the builds pass, shipit

Change-Id: I955dce0e74f7b86710f9a5956c12ad5a244a0c21
Reviewed-on: https://gerrit.instructure.com/186130
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-03-20 18:13:10 +00:00
Ryan Shaw b6a26453d8 prevent xss in media element from dfxp captions
Fixes: CORE-2527 

dfxp captions can be used to create an xss attack. so the mediaelement
that the arc team maintains removed that functionality. By pulling in
The new version we prevent the xss attack vector too.

Note: looking at the wording on the page where you can add captions
We have always said:
“Once you have a subtitle track in either the SRT or WebVTT format,
you can upload it here.”
And the api docs say:
“The contents of the track, in SRT or WebVTT format”

So we have never “officially” supported dfxp files.

Test plan:
* prepare a SRT file as explained in SEC-2176
* either upload/record a new video or find a page with one on it already
* try to upload that as a subtitle track to that video
* you should see an “Oops, something went wrong” error.
* if you had malicious TTML/dfxp caption tracks (like something as
  explained in SEC-2176) added to that video, they should not show
  Up as options in the available tracks to show for that video.
  and you should not see the malicious javascript alert like it did
  before

Change-Id: Id55e6b999c209bf8fa505c60aa459d60e9326ee9
Reviewed-on: https://gerrit.instructure.com/184843
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-20 17:19:07 +00:00
Steven Burnett 9f8870f23a upgrade proptypes
test plan:
- jenkins passes

Change-Id: If447ae4112622f5cdd2e3533ec4764695b713822
Reviewed-on: https://gerrit.instructure.com/186058
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-03-20 12:31:22 +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
Ryan Shaw 851fda89a4 upgrade react to latest version
Change-Id: I5ddef17ef739bdd0b9afbe422447cb68de38aff5
Reviewed-on: https://gerrit.instructure.com/185275
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-03-18 15:53:54 +00:00
Ryan Shaw 06f33590e8 upgrade instUI to 5.46.1
Closes: CORE-2560 CORE-2569

Refs: ADMIN-2453

Test plan:
* general spot check to make sure things look the same
  (Specifically check the publish/unpublish button on the modules page)
* verify that the total size of the vendor & common production webpack
  bundles is smaller

Change-Id: I734e9723917c14778cdc5fc4e22dcd1011b5e77e
Reviewed-on: https://gerrit.instructure.com/184911
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-13 22:23: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
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
Clay Diffrient 0f1cf5362f Upgrade node modules
closes CORE-2242
closes CORE-2303

Test Plan:
  - Automated tests pass

Change-Id: I7f9b248564d8a4dc034af3585581f6af2aa81702
Reviewed-on: https://gerrit.instructure.com/177078
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-01-08 16:07:06 +00:00
Jon Willesen 32a74f2278 upgrade instUI to 5.38.0
refs ADMIN-2277

test plan:
- Do some spot checking all around, esp. on newer stuff written with
  InstUI
- Do some specific spot checking on:
  - Assignments edit page. Esp. with moderated grading
  - Gradebook late policies
- Check the original bug (ADMIN-2211)

Change-Id: Iaaaeb9d86dc2d59cb2c9ccca2a8764a5adb0896b
Reviewed-on: https://gerrit.instructure.com/176912
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-01-07 21:24:50 +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
Clay Diffrient 0b2416a334 Add missing yarn entries
Test Plan:
  - Tests pass

Change-Id: I244b003cb61cc3a2d83f2d507c95c4ac1a6c4e7a
Reviewed-on: https://gerrit.instructure.com/173542
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-28 20:06:14 +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
Clay Diffrient 4e6b24ccfc Add junit reporting to canvas-planner
closes QA-614

Test Plan:
  - Run yarn test inside the canvas-planner directory
  - A junit file should be created in ./coverage/canvas-planner-junit.xml
  - It should also report to jenkins 'Test Results' when there is a failure

Change-Id: Ibfb1ec088ceb60f2c265b3c31e77029968268f9a
Reviewed-on: https://gerrit.instructure.com/173008
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@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-26 21:44:54 +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
Clay Diffrient d30be21992 Add junit reporting for canvas-rce
refs QA-614

Test Plan:
  - `yarn test` inside of packages/canvas-rce outputs
    `coverage/canvas-rce-junit.xml`
  - Also, Jenkins should pick that file up on patchset builds
    as well

Change-Id: Ib4db4ba16b90e181e17a319219544aa2f0c205ea
Reviewed-on: https://gerrit.instructure.com/172430
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-19 21:51:04 +00:00
Clay Diffrient 77e1095243 Update npm dependencies
Test Plan:
  - Build passes

Change-Id: I33580bc0c4c658eaa4d225bb5ea97258d4789588
Reviewed-on: https://gerrit.instructure.com/172843
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-19 20:10:51 +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
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
Ryan Shaw b492ed7f21 run update-and-dedupe again to get instUI from 5.30 to 5.31
Change-Id: Ib3b069a5b6f8dcb66a9ddf1790c0f120418ee67a
Reviewed-on: https://gerrit.instructure.com/170055
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-10-29 21:09:42 +00:00
Clay Diffrient ab41fa900a Update a bunch of node modules
Test Plan:
  - Tests pass, everything works

Change-Id: I2ff4b7e77349cc19d03ced2439bcb4c4a1252e5d
Reviewed-on: https://gerrit.instructure.com/169549
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-10-29 15:47: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 0e6e46fcd5 Updated yarn.lock
Change-Id: Ieeee0addc1935d2ffe71613cc7fd941958e36dda
Reviewed-on: https://gerrit.instructure.com/167425
Tested-by: Jenkins
QA-Review: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2018-10-08 20:44:44 +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
Ryan Shaw cbe7c13fce canvas-planner: upgrade to enzyme 3
Change-Id: I710a4657c8fe9773e04d5815370eeed22b6ab89b
Reviewed-on: https://gerrit.instructure.com/164988
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 20:56:43 +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 81659aa55c remove the "old-deprecated-enzyme" package
...now that nothing uses it
closes: CORE-1912

Change-Id: I8fa3fa63b0637aaaa815576bc744230ee5ef66ba
Reviewed-on: https://gerrit.instructure.com/164925
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:15:39 +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 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
Cameron Matheson 664fad805e upgrade graphiql
this fixes the broken doc viewer

Change-Id: I6d372223256d764e0172568faed1b17ecec7cb26
Reviewed-on: https://gerrit.instructure.com/164697
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
2018-09-17 20:34:35 +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
Derek Bender f98df4f3b0 update yarn.lock
Change-Id: I65e637cac26bce13b99337c8bd4ea55809b4bfad
Reviewed-on: https://gerrit.instructure.com/164408
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
2018-09-13 21:43:46 +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 4d76258d44 allow canvas-rce to use react 16
Change-Id: I3eebe6998284030eeb2519cf9c1ccf176da52dbb
Reviewed-on: https://gerrit.instructure.com/164183
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-13 14:51:44 +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 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
Mysti Sadler aa36bee66b Update yarn.lock
Change-Id: I1d7c6577b00ea98e2bdd8b703cd6ad015bc837ef
Reviewed-on: https://gerrit.instructure.com/162380
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-08-28 22:04:59 +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 b5ae428dbf Make it so i18nliner understands `import(‘./foo’)`
Closes: CORE-1756

Test plan:
* write `import(‘foo/bar’).then(bar => {})` in a file in app/jsx
* run `bundle exec rake i18n:check`
* it should work
* make sure the other i18n rake tasks still work like
  `bundle exec rake i18n:generate_js`

Change-Id: I0966a5de4402232c57476249a3879b9ec1100992
Reviewed-on: https://gerrit.instructure.com/161632
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:19:00 +00:00
Ryan Shaw 5fdcf69ec5 upgrade instUI to 5.25.0-rc.11
This is the result of running `yarn upgrade instructure-ui` and then
fixing the handful of specs that broke from the upgrade

Change-Id: Ifb569d7a4ea262ace0f9efe1c11952e475c17cb5
Reviewed-on: https://gerrit.instructure.com/161315
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-08-22 00:25:13 +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
Spencer Olson 2ed2a4e411 update yarn lock
Change-Id: I2ba6ce52c15f5eb91a7a1a776ed326eef1e4f15f
Reviewed-on: https://gerrit.instructure.com/158290
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
Product-Review: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
2018-07-23 15:18:44 +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 3837411f7d canvas-rce: upgrade package.json devDependencies
closes:  CORE-1618

test plan:
* smoke test canvas-rce to make sure clicking around still works

Change-Id: I03f427a471aae45d07bdec916aeb15d75666de78
Reviewed-on: https://gerrit.instructure.com/156318
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-06 17:11:03 +00:00
Ryan Shaw 462e1ba76f canvas-planner: upgrade package.json deps
closes: CORE-1619

test plan:
* click around canvas-planner and smoke test to make sure everything
  still works.
* check to make sure that strings are still being translated correctly
  as they were before

Change-Id: I5f2a62167a00f3df1874f3f6bf43bd8b08e203c8
Reviewed-on: https://gerrit.instructure.com/156311
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-06 17:10:33 +00:00
Ryan Shaw 4b510e448f canvas-rce: upgrade prod deps
closes:  CORE-1617

test plan:
* smoke test canvas-rce to make sure clicking around still works

Change-Id: Ic89aaf8f130f1910b7f35c2bc64f3cdbca8defbd
Reviewed-on: https://gerrit.instructure.com/156309
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-06 17:10:01 +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 0db7614eb0 upgrade react-apollo so it doesn’t use own lodash
The version of react-apollo that we were using had a hard dependency
On lodash 4.17.5 but the rest of all of our stuff was using 4.17.10.
That meant that react-apollo would use it’s own copy of lodash leading
To unnesisary JS bundle size in the browser.

But the latest version changes it’s hard dependency to 4.17.10 so it can
Share with everything else

Test plan:
* pages that use react-apollo should not download their own copy of
  lodash

Change-Id: I63068ce83d9ad834cbcd5fc3174c7cdf411e4409
Reviewed-on: https://gerrit.instructure.com/155245
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-26 20:01:55 +00:00
Ryan Shaw 5568da1b39 upgrade instUI from 5.13.0 to 5.13.1
Test plan:
Here’s what changed, verify none of these bug fixes screw anything up:
Bug Fixes
ui-a11y: absolutely position offscreen content at top (f0d6305)
ui-a11y: dialog should return focus on blur (f7eb47e)
ui-forms: accept zero for decimal places in NumberInput (d4cdd6b)
ui-forms: don’t use window.event in NumberInput (943a0c9)
ui-forms: handle min={0} and max={0} props in NumberInput (5b09754)
ui-forms: NumberInput onChange w/ updated precision (fa33d06)
ui-forms: fix inline input and label alignment in Select (a696dcc)
ui-forms: Select should return focus to input on close (0baa76f)
ui-layout: Position, absolutely position offscreen content (8c85b25)

Change-Id: Iebd84317ff9abbec966ff318b549ad0e1a848a61
See: https://instructure.design/#CHANGELOG
Reviewed-on: https://gerrit.instructure.com/155015
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-26 16:26:06 +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
Ryan Shaw 0c4be63a4a Upgrade instUI from 5.12.0 to 5.13.0
Test plan:
Here is the relevant changelog, it looks like, if anything, these are
only going to help us but try to see if there is anything in there that
breaks anything

Bug Fixes
NumberInput: fix controlled component (1ec816a)
Tag: pass down elementRef (ccb7a11)
ui-forms: fix aria-selected values on Select options (d84098a)
ui-forms: Select input shouldn’t be wrapped w/label (4c6e6c1)
ui-forms,RangeInput: focus styles for Edge 16 up (bbdf9e6)
ui-i18n: Fix leading zero decimal parsing (3224dc8)
ui-layout: Make body scrollTop attribute consistent for (55e5ed2)

Features
ui-buttons,Button: Add circle-default variant (addb97c)
ui-elements,Link: Add icon prop to Link (8953edb)

Change-Id: I41509228be779397b5f79f94fb9bb7c56f98cafb
Reviewed-on: https://gerrit.instructure.com/154174
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-19 15:11:06 +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 7ace1734f2 spec: update mocha-jsdom in canvas-rce
test plan:
 * Verify Jenkins passes

Change-Id: I57944f6bd7ed952028d7e44bc79ebc089d35d9c6
Reviewed-on: https://gerrit.instructure.com/153970
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 16:01:05 +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
Dan Minkevitch d4b333d0e6 Add redux-devtools-extension for easier debugging of planner
Adds compatibility to use
https://github.com/zalmoxisus/redux-devtools-extension
in development (but not in production).

Change-Id: I4f72645161ca8165f7c81b3b45afcaeba6a2148c
Reviewed-on: https://gerrit.instructure.com/153565
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Dan Minkevitch <dan@instructure.com>
2018-06-12 22:50:39 +00:00
Jeremy Neander 0c362c44ad update instUI from 5.11.0 to 5.12.0
closes GRADE-1235

test plan:
 * Verify Jenkins passes

Change-Id: Ic723445a543680ecb806238cc7253861408179f2
Reviewed-on: https://gerrit.instructure.com/153264
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
2018-06-12 18:49:43 +00:00
Ryan Shaw 53467da087 canvas-rce: fix “unhandled promise rejection” in tests
Test plan:
* run yarn test or look at the console output of linters and js build
* you should not see any:
| (node:6453) UnhandledPromiseRejectionWarning: Error: only absolute
urls are supported
 at node_modules/node-fetch/index.js:54:10
 at new Promise (<anonymous>)
 at new Fetch packages/canvas-rce/(/node-fetch/index.js:49:9)
 at Fetch packages/canvas-rce/(node-fetch/index.js:37:10)
 at module.exports (isomorphic-fetch/fetch-npm-node.js:8:19)
 at RceApiSource.apiFetch (canvas-rce/src/sidebar/sources/api.js:236:12)
 …

* the cavas-rce tests should pass

Change-Id: Id2ab92752f316dacc34290994645e47018fd0742
Reviewed-on: https://gerrit.instructure.com/153120
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-06-08 19:18:32 +00:00
Ryan Shaw 62aff4cf6e fix yarn.lock dependencies so canvas-quizzes tests work
test plan:
* run `yarn && yarn test`
* the canvas-quizzes tests should pass

Change-Id: I0786e86a8f10fbbef68fca287cc178fa5129a12d
Reviewed-on: https://gerrit.instructure.com/153119
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-06-08 19:18:16 +00:00
Ryan Shaw bfc647720d Update instUI from 5.10.0 to 5.11.0
closes GRADE-1209 CORE-1484

this new version of instui includes a fix we need
For pagination:

Test plan:
* verify the pagination on the account course/user search works
* ensure it does not steal focus with more than 5 pages

Change-Id: I5a5e67d10ff591fb0477a80598a30d89273cf35e
Reviewed-on: https://gerrit.instructure.com/152862
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-06-07 21:15:37 +00:00
Ryan Shaw aaab29c91f canvas-planner: upgrade to instUI 5
closes: ADMIN-1073

test plan:
* make sure the themeing stuff still works
* generally click around on all the components, they have been upgraded
  to use instUI 5 (from instUI 4)
* look at this changelog for things that might be interesting here:
  https://instructure.design/#CHANGELOG
* especially make sure that any of the <Select> elements still work,
  they changed from using a native <select> to some custom stuff.
* make sure that changing them works and what they send to the server
  is correct (as-in if you refresh it has what you changed it to)

Change-Id: I4afbeb03beda42106815de28983a418627d271e9
Reviewed-on: https://gerrit.instructure.com/150263
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-06-06 20:35:11 +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
Jeremy Neander c3e083727a add pagination to new moderation table
refs GRADE-964
closes GRADE-877

test plan:
 A. Setup
    1. Enable Anonymous Moderated Marking
    2. Select or create a course
       a. with Anonymous Marking enabled
       b. with three instructors (A, B, and C)
       c. with 51 or more students
          * this is for multiple pages of students
    3. Select or create an assignment
       a. with Moderated Grading
       b. with Anonymous Grading
       c. with instructor A as the final grader
    4. As each instructor (B and C)
       a. give at least one student a provisional grade
          on each assignment (using SpeedGrader)
       * This is optional, but is used for test plans
         in related commits

 B. Verify
    1. Log in or act as instructor A
    2. Visit the moderation page for the assignment
    3. Verify multiple pages of students load
    4. Verify the table has multiple pages
    5. Verify the table shows 20 students at a time
    6. Verify the table shows different students on each page

Change-Id: I133500446b581cfb2822eebacbfe5094c5af94ea
Reviewed-on: https://gerrit.instructure.com/151343
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-06-01 15:06:53 +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
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
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
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
Ryan Shaw 06f092b709 rce: upgrade demo to InstUI 5 & add RTL toggle
Closes: CORE-1421

Test plan:
* Run:
yarn
cd packages/canvas-rce
yarn dev

* open the demo: http://localhost:8080/demo.html
* the select boxes no longer use a native <select>, but use a new
  instUI select component.
* that means that we don’t need the whole ui-core library, so that 
  so that is gone from yarn.lock
* I also added a [LTR <-> RTL] toggle switch in the “editor options”.
  That should work.
* changing the language should work

Change-Id: I4906ff6d01fd774569d9394230f483054aa9553f
Reviewed-on: https://gerrit.instructure.com/150236
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-05-21 19:18:31 +00:00
Ryan Shaw 2c3390024a canvas-rce: upgrade components & icons to instUI 5
closes: CORE-1415

This is just import path renaming so everything is pulled from
it’s new location in the instUI5 monorepo. It also changes
the icon paths to come from their new home in @instructure/ui-icons
from their old home in ‘instructure-icons’

Test plan:
* look at the instUI changelog at the breaking changes from 5.0
  http://instructure.github.io/instructure-ui/#CHANGELOG
* make sure we are not affected by any of those
* general regression test of UI components

Change-Id: I7ee2b44f7f0e577981fe52cd1ad03ae78730bcab
Reviewed-on: https://gerrit.instructure.com/149947
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-05-21 19:18:15 +00:00
Ryan Shaw 0b4df04034 canvas-rce: replace Accordion w/ ToggleDetails
closes: CORE-1411

The ‘accordion’ variant of TabList is deprecated and we should use
The <ToggleDetails> component instead. This is needed before we can
upgrade to instUI 5

Test plan:
* go to the demo page
* on the “links” tab, the accordion with the “Pages”, “Assignments”,
  etc, has been replaced with a new InstUI component
* it should work the same as before

Change-Id: I9344525287cb30c7b01200b8d4dba0ba084c9305
Reviewed-on: https://gerrit.instructure.com/149946
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-05-21 18:30:55 +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
Ryan Shaw e123d3f532 canvas-rce: update yarn.lock to match master
This yarn.lock change should have gone with the last commit

Change-Id: Ie662859571f1a3bc15ce03c037734b35a3c8dde9
Reviewed-on: https://gerrit.instructure.com/150141
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-14 17:14:20 +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