Commit Graph

424 Commits

Author SHA1 Message Date
Ryan Shaw a8073a5124 Update MediaElement to get faster pointerEvent check
test plan:
* see the commit msg from the pull request
  https://github.com/instructure/mediaelement/pull/52
* that forced RecalculateStyle should not happen anymore
* media element should work the same as before

Change-Id: I779d9aa193841bfe6e6f27004c3e0c85e0b734ea
Reviewed-on: https://gerrit.instructure.com/213061
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-10-15 17:15:48 +00:00
Clay Diffrient 5e5448f7aa Add ability to launch immersive reader from wiki pages
Test Plan:
  - Enable Immersive Reader Feature flag
  - Go to a wiki page with content
  - Click the immersive reader button
  - Immersive reader should open

closes COREFE-265

flag = immersive_reader_wiki_pages

Change-Id: I015fbbd72adf05177f3941890b5a04a7aa067ee2
Reviewed-on: https://gerrit.instructure.com/211546
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2019-10-11 21:24:10 +00:00
Ryan Shaw 96dc07a4cf upgrade all the npm things
In a future commit, we need to see why the tests in CanvasContentTray
In canvas-rce are so brittle and fix them

Change-Id: I890f47a0cae2758f2f91a3366066fe409c5ce056
Reviewed-on: https://gerrit.instructure.com/211956
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-10-03 20:15:31 +00:00
Ryan Shaw b44cbc5d47 Upgrade react
Change-Id: Ibd390abf8ee503aa120f5d72dcf8b9c500e7c919
Reviewed-on: https://gerrit.instructure.com/211955
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-10-03 19:59:21 +00:00
Ryan Shaw 98517b0d51 Upgrade InstUI 6.12.0 to 6.13.0
Change-Id: Ice3b1f6477586b1021651225fa0fcb8d64d9c3df
Reviewed-on: https://gerrit.instructure.com/211954
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-10-03 19:58:56 +00:00
Ed Schiebel d5a80a41a9 Update media upload
closes COREFE-268

test plan:
  - open a page with the rce
  - from the media toolbar button menu, select upload
  - pick a video from your computer
  > expect a preview to appear
    > expect the video to be about 75% the width of the modal
      and as tall as it needs to be for the video
  - click Submit
  > expect the modal to close
  > expect the video to show up in the rce
    > expect it to be 400px wide, and however tall it needs
      to be (try both portrait and landscape videos)
    > expect the grey placeholder while it's being uploaded
    > expect the yellow flash indicator when it's loaded
    > expect to see a "Loading..." message until the video player
      renders
  - from the documents toolbar button menu, select upload
    and upload a video
  > expect the video file to show up in the media>course media
    tray list
  - click on the video file
  > expect the video to show up in the rce
    > and for all the same constraints as the uploaded
      video to be true

  - you should try this with the video appended to the end of
    content and right in the middle
  - click on a video and delete.

  - if you loaded the page via http, there will probably be
    no fullscreen button

Change-Id: I934ad486b74689e81941e1fcf0cf6efd18e5f426
Reviewed-on: https://gerrit.instructure.com/209296
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2019-09-30 14:13:50 +00:00
Ryan Shaw a159af4d52 Fix analytics pagination caused by jQuery bug
Fixes: ADMIN-2950

See: https://github.com/ryankshaw/jquery/commit/637babee7ed47a532c962d
For the actual fix

Test plan:
* root cause check:
Open your browser devtools:
Type: $(window).is(':hidden')
That should return `false` and not throw this error:
Uncaught TypeError: Cannot read property 'defaultView' of undefined

Type: $(window).is(':visible')
That should return `true` and not throw this error:
Uncaught TypeError: Cannot read property 'defaultView' of undefined

Manual check for the jira
 - have analytics plugin configured
 - have more than 10 students enrolled in a course
 - scroll down in course analytics
 - students beyond the first 10 should appear as you scroll

Change-Id: I0e6e3ae2f8b5758f02611273018b751b9e20f758
Reviewed-on: https://gerrit.instructure.com/211192
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-09-26 21:55:37 +00:00
Clay Diffrient e596520374 Add filtering to the LTI app modal
Test Plan:
  - Go to the RCE and click the plug toolbar icon
  	- This won't appear if you don't have some
          tools installed
  - The LTI tool window should appear
  - Search for items in the search box and it will
    filter to them.

closes COREFE-254

flag = rce_enhancements

Change-Id: Ifc9844f4a2db21b7217c3df615d0c478faa28806
Reviewed-on: https://gerrit.instructure.com/210331
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2019-09-25 19:00:35 +00:00
Ryan Shaw 3df20d6c5d Upgrade instUI from 6.10.0 to 6.12.0
Closes: COREFE-301

Test plan:
* all the instUI things should still work
* specifically check to make sure that bowser is no longer in prod build
  And that objectSpread thing is fixed so it uses babel helpers

Change-Id: Ie30edddba6ff7c9f37852ea13a65dddc42f93d65
Reviewed-on: https://gerrit.instructure.com/209745
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-09-24 18:44:22 +00:00
Ryan Shaw 857e37a73f allow prettier for ruby too
This does not mandate anything or -1 or anything like that, it just
makes it so if you hate figuring out how to format ruby code like I do
you can have prettier do it for you.

Test plan:
* First checkout this commit & run yarn and make sure you are using
  Ruby 2.5 or newer

To test on command line:
* `yarn prettier --write path/to/any/ruby/file.rb`

To test in vscode:
* After you checked out this commit and ran yarn, restart vscode
* Open a ruby file in vscode
* open the command pallet (command-shift+p)
* type “Format” so the “Format Document” command appears. Hit enter
* it should pretter format that ruby file

* or alternatively, trigger the “Format Document” command directly
  By typing “Shift+Alt+F”

Change-Id: Ifd0272f2c1bed3263473a1e7d5df13547e10dec4
Reviewed-on: https://gerrit.instructure.com/209982
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-09-18 19:24:43 +00:00
Jon Willesen 3f8f0fcf48 direct share user selection modal
closes ADMIN-2839
flag=direct_share

test plan:
- as a user with course management permissions (such as a teacher) go to
  the discussions index page and select "Send To..." from a discussion's
  kabob menu.
- this should open a modal where you can search for and select other
  course users who have course management permissions.
- clicking on the "Send" button only does a console log at the moment.

Change-Id: I67f823d0820283fd90e2aa6e3ae3ea5fe54d9b3d
Reviewed-on: https://gerrit.instructure.com/205967
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-09-17 19:20:57 +00:00
Landon Gilbert-Bland 8596433ff7 Add support for javascript optional chaining
Per https://github.com/tc39/proposal-optional-chaining

Test Plan:
  - Jenkins passes

flag = none

Change-Id: I7b9fde7e91a9bd00a85397bcf791b8eccd528a5b
Reviewed-on: https://gerrit.instructure.com/209826
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-09-17 17:33:46 +00:00
Ryan Shaw 20b962f5f5 Use native es modules for tinymce-a11y-checker
Change-Id: Ia17a47e50711abca1b6ca154995bfa2f6e5b1eb8
Reviewed-on: https://gerrit.instructure.com/208604
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-09-09 20:07:28 +00:00
Ryan Shaw f0d6f1a497 Remove rest of the $.support checks for old browsers
see: https://github.com/ryankshaw/jquery/commit/ce59a7f0b3c4fc6ff9a2176
for the diff of the actual changes

Copying from that commit message:

All of these checks only ever returned false in older browsers that
We no longer support. By getting rid of them, we can get rid of this
Chunk of javascript execution that happens on every page right before
The domcontentloaded event fires: https://cl.ly/d368d5c9388 which ends
Up being non-trivial because it causes a couple recalculate-styles
(As seen by the purple in that screenshot)

Test plan:
jQuery should work the same as before
* domcontentloaded should end 15-200ms sooner which means all pages
  Should load a little faster

Change-Id: I3efa8752708b9043107e9123d31cd509536e9993
Reviewed-on: https://gerrit.instructure.com/208606
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-09-09 17:19:47 +00:00
Jon Willesen 3fceef17cb basic direct share course selection tray
Note: There appears to be an issue with VoiceOver not announcing the
aria live updates. Going to ignore this for now and see if it is still a
problem when InstUI 6 lands. Another ticket will be created to check and
fix.

refs ADMIN-2811
flag=direct_share

test plan:
- should be able to search by name for courses you manage in the direct
  share course selection tray.
- copy button disabled until you select a course
- after selecting a course, the copy button just logs to the console
- cancel button closes the tray
- generally accessible, except for VO reading alerts.
  - could check the flash_screenreader_holder div in the inspector if
    you want to watch the DOM changes that should trigger the alert.

Change-Id: I5c102b25d277204a9929f780adbe94b9d3e46bcb
Reviewed-on: https://gerrit.instructure.com/205371
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
2019-09-06 20:58:59 +00:00
Ed Schiebel bd2211f35d User and Course Images
closes COREFE-203

Adds ability for a teacher to switch between course and user files.
Changes the images query logic to piggyback on the /documents api
so docuents, media, and images will all share the same query logic

test plan:
  - have a course with some images
  - have a teacher and a student with personal images

  - go to the course as a teacher
  > expect rce images toolbar button menus to
    show Upload, Course images, and My images
  - upload an image
  > expect it to succeed
  > expect the new image to appear in the Course images
    tray
  > expect the images to appear in the course's upload media  folder

  - select My Images from the toolbar menu
  > expect my Images to be shown in the tray
  - use the filter to switch to Course Images
  > expect course Images to be shown in the tray
  - repeat, starting with Course Images and flipping to My Images

  - go to the course as a student
  > expect rce Images toolbar button menus to
    show Upload and My Images
  - upload Image(s)
  > expect it to succeed
  > expect the new imsges to appear in the user's file page's
    My Files (/files).
  > do NOT expect the imsges to show up in the course's Files page
    (/courses/:id/files)
  - click on Images > My Images
  > expect to see Links and My Images in the top select of the tray
  > do NOT expect to see the Course Files option in tray

Change-Id: If7f4e6b6f90b445e497be81b9cb940da71a8cf74
Reviewed-on: https://gerrit.instructure.com/206788
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-09-05 15:28:54 +00:00
Ryan Shaw f29990694b one more update to all the npm things
Just making sure there’s not something fixed in a package we use
That could help with build flakiness

Test plan:
* builds should pass

Change-Id: I67d738063dd1170612846673623455b7c62f71d5
Reviewed-on: https://gerrit.instructure.com/207712
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-30 21:52:59 +00:00
Ryan Shaw 3718da12c5 Upgrade canvas-lms proper to instUI 6
closes: COREFE-209 COREFE-207 COREFE-230

this should help bugs, spec flakiness, and bundle sizes

test plan:
* make sure that the pages that are still using the old 5.x one from
  @instructure/ui-core still work, namely:
  app/jsx/account_course_user_search/components/CoursesToolbar.js
  app/jsx/blueprint_courses/components/CourseFilter.js
  app/jsx/grade_summary/SelectMenu.js
* make sure themeing of instUI components still works and picks up
  theme editor settings
* make sure bundle sizes are smaller, not bigger
* check tinymce-a11y-checker that it still works the same
  (With the rce-enhancements feature both on and off)

Perf test plan:
* make sure tree shaking is working
  load it up in one of the webpack bundle visualizers to see
* make sure we are not loading *all* of the icons


this commit also updates the instUI6 version we use from 6.9 6o 6.10
which has  fix for <Alert> unmounting that ed fixed:

Test plan:
* you should see less console arrows about react unmounting nodes
  Associated with the CanvasSelect component

Change-Id: Ied2ff1d1521b0900126136170f103dea27bc554a
Reviewed-on: https://gerrit.instructure.com/204545
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-30 14:36:53 +00:00
James Butters 1f73f600a2 spec: add html results for i18n gem
add cleanup for spec_results folder on nodes.
add jasmine-pretty-html-reporter to get html reports
for i18n tests.

refs: CORE-3254

Change-Id: Ifa1724e368c5c91dc69e854ae98a1a13abe33aa0
Reviewed-on: https://gerrit.instructure.com/207203
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2019-08-29 18:58:13 +00:00
Ryan Shaw d1bc046578 Upgrade canvas-rce to 4.1.5
The only change is that some things that it actually used weren’t
In it’s package.json and they were added.

See 
https://diff.intrinsic.com/@instructure/canvas-rce-old/4.1.4/4.1.5

For the differences

Test plan:
* when we upgrade canvas’s instUI to 6.x we shouldn’t get failures
  about not being able to find 
  @instructure/ui-alerts/lib/packages/alert.js

Change-Id: Icff6d120bff55697defc73c092b2ca9782fc44e2
Reviewed-on: https://gerrit.instructure.com/207063
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-28 21:22:24 +00:00
Cameron Matheson 883c6d8925 upgrade graphiql
Test plan: graphiql works

flag = none

Change-Id: Ia8bd7100024cab45746a27f370d5423e6c5fa9e6
Reviewed-on: https://gerrit.instructure.com/206853
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-27 15:26:45 +00:00
Ryan Shaw 9d54094803 upgrade @testing-library npm deps
Change-Id: I5438f3895173d4b2b417835c6ac937dc65d160d3
Reviewed-on: https://gerrit.instructure.com/205774
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-27 14:49:48 +00:00
Ben Nelson ff2055d08e upgrade react-apollo to 3.x.x
closes COMMS-2316

TEST PLAN
-------------------------------
all tests pass

Change-Id: I0c270bb7a8d5dfa166641648841e619a1a21c0f4
Reviewed-on: https://gerrit.instructure.com/206348
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Jenkins
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
2019-08-26 23:28:25 +00:00
Ryan Shaw 60e8c8bbdd Clean up yarn.lock
If you ran yarn on master it would create a dirty yarn.lock

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

Change-Id: I0303e6e9ca0032771b95497df4b39a3e26e2eed3
Reviewed-on: https://gerrit.instructure.com/206700
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-26 16:31:11 +00:00
Jeremy Neander 62c92a2264 allow custom sizes of images
closes CORE-2654

Testing Notes:
 * Max dimensions per size are as follows
    * Small: 200 x 200px
    * Medium: 320 x 320px
    * Large: 400 x 400px
    * Extra Large: 640 x 640px
 * Images must be at least 10 x 10px

test plan:
 1. Add an image to TinyMCE
 2. Select the image
 3. Click the "Options" button in the popover

 4. For each of the preset sizes:
    a. Select the size
    b. Click the Done button
    c. Verify the image fits that size

 5. For the Custom size:
    a. Enter a width
    b. Verify the height maintains the aspect ratio
    c. Enter a height
    d. Verify the width maintains the aspect ratio
    e. Verify the image cannot be saved when:
       * The image is too small
       * The dimensions are not numbers

  6. Integration with tinymce
    a. add an image
    b. click in it, then on the Options button
       to open the tray
    c. resize and click Done
    e. Verify the Options button/toolbar realigns
       itself with the newly sized image

Change-Id: I1c1456b33c355d2d17a5430cd3d6d1687ff6ecdc
Reviewed-on: https://gerrit.instructure.com/198540
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
2019-08-24 18:42:10 +00:00
Ryan Shaw d631de2f21 Update the rest of the npm deps
This is the rest of the npm deps except for the ones we know we have to
hold back like the graphql/apollo stuff and canvas-rce’s tinymce

Test plan:
* builds should pass

Change-Id: I985cf8915540af8377d5b83bb3c114a58ccfce4d
Reviewed-on: https://gerrit.instructure.com/206060
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-22 20:30:30 +00:00
Ryan Shaw e91e2340fe upgrade React to 16.9.0
note: this will start logging a lot of deprecation warnings from
React about stuff like componentWillMount and componentWillReceiveProps.
Teams should update their code to not use those things so those
Deprecations go away

Test plan:
* automated builds should pass

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


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

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

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

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

flag=direct_share
refs ADMIN-2811

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

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

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

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

Change-Id: Ia3204cd6c3147eb52ca612adbb3b20b2df8c6921
Reviewed-on: https://gerrit.instructure.com/205378
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 14:06:41 +00:00
Ed Schiebel cd4a8e834d Update yarn.lock
the entry to ui-focusable unexpectedly changed.

Change-Id: Iba491ab95d415d5bb37677da8ebeae9aeb36dffc
Reviewed-on: https://gerrit.instructure.com/205624
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-19 20:07:48 +00:00
Ryan Shaw 0bf6e0d5be Make it so i18nliner understands React fragments
This also upgrades it to babel 7 so it should be able to handle other
Modern features that it used to not.

I will try to get jon to merge the pull request for this
https://github.com/jenseng/i18nliner-js/pull/27
And use the official version but for now we can just use it directly
From my pull request branch.


Test plan:
* with the next commit applied (which changes all the <Fragment>s to <>)
* Run bin/rake i18n:generate_js
* It should work

Change-Id: I2752ff4c18c8e71b8b0530e0572596fa7da9ea8e
Reviewed-on: https://gerrit.instructure.com/205377
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-15 22:26:11 +00:00
Ryan Shaw 1d199b5e2f upgrade eslint & don’t use unique one in canvas-rce
instead of having our own eslint in canvas-rce, and maintaining all
future rules like react hooks and stuff we can just use the same one
that the rest of the repo uses.

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

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

flag = none

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

This reverts commit 27b6085218.

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

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

flag = none

Change-Id: I4b384c3724fc843132c9db34f044cd88aba227bb
Reviewed-on: https://gerrit.instructure.com/204276
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-14 01:38:07 +00:00
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