Commit Graph

534 Commits

Author SHA1 Message Date
August Thornton a4b36ec653 convert group edit JQueryUI dialog to InstUI modal
This commit covers the teacher/admin view of editing user
groups. Need to look into removing the old code in a followup
change.

closes FOO-909
flag = none

test plan:
 - Verify the test plan in the following gerrit still plays out:
   - https://gerrit.instructure.com/c/canvas-lms/+/247628
 - You'll need a student created group set and an admin created
   group set to test all the angles
 - Student Group Set
   - Create a group and remember its state
   - Go to edit said group
     - Verify the Group Name field is populated
     - Verify the Joining select is populated with prior choice
   - Edit the Group Name and Joining select dropdown
     - Verify the group collection is refreshed with your newly
       updated group
     - Go to edit the group and verify your changes saved
       successfully
 - Admin Group Set
   - Create a group and remember its state
   - Go to edit said group
     - Verify the Group Name field is populated
     - Verify the Group Membership Limit is populated
   - Verify as you did with the Student Group Set
   - Ensure the group has a member count
     - Edit the group and set the Group Membership Limit lower
       than your member count
       - Verify you get a descriptive error
 - The updated group modal should behave as it did before and
   be accessible and keyboard navigable

Change-Id: I6bd4c6983239c9ed779fa41d297dab81c364fcbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250185
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-10-19 22:26:16 +00:00
Clint Furse 146d27fae3 update Microsoft Immersive Reader SDK
closes LS-1377
flag = immersive_reader_wiki_pages

Test Plan:
- Enable immersive reader.
- Because there doesn't seem to be a way to run this locally
  (without consul), I had to temporarily modify the
  immersive_reader_controller.rb and added
  prod creds to get this to test.  see me for more details

Change-Id: Ifaa7edfa94ff29856ae6b474548e0f450b9d4c6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245869
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
2020-08-27 15:41:17 +00:00
Aaron Ogata e5e6fa54f1 move packages into dependencies layer for caching
refs DE-216

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-216]

Test Plan:
1. Ensure that docker-compose build works locally
2. Ensure that packages building is cached when files aren’t changed
3. Packages build correctly when modified

Change-Id: I3e775e5d7eb51ba06078314b50bf2f8efb6d7d0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245423
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-08-24 14:40:21 +00:00
Aaron Ogata 99d0010d86 minimize yarn caching dependencies
refs DE-209

[change-merged]
[build-registry-path=jenkins/canvas-lms-de-209]

Test Plan:
1. Ensure that `docker-compose build` works locally
2. Ensure that yarn is cached on Jenkins when run on a separate node

Change-Id: Icadf02b9e999eafd14f493ae1c0649ed0ffe58bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245336
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-08-18 15:53:28 +00:00
Ed Schiebel a0dfe0a334 Update ui-media-player to v7
This change bumps the ui-media-player from v5 to v7.
I also found a bug in the logic for retrying fetching the video sources
that's fixed here so we don't call fetch unneeded extra times. Learned
a lot about the interaction between useEffect and timers used to retry
actions.

Updated the @testing-library components in canvas-rce. waitFor in the new
version uses a mutation observer, not just a timer which helped make specs
more reliable.

Also did some significant rework of CanvasMediaPlayer.test to get it to
pass, especially without a bunch of react or testing-library warnings.

With PS13, I finally figure out how to listen for the onLoadedMetedata
out of <MediaPlayer> without having to reach under the hood and grab
the <video> element

closes LS-1077
flag=none

test plan:
  - audio and video still works, but with the new player
  - record a longish (30s+) video
  > expect to see the
    "Your media has been uploaded and will appear here after processing"
    message, and for the video to eventually play.
  - record or insert a portrait oriented video
  > expect it to be letterboxed in the player
  - record or insert audio
  > expect it to be loaded in the player

Change-Id: I797e6f16e763d7029eaf19149439e973590e978c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-17 16:02:52 +00:00
Jacob Fugal 2b3886c5f4 extend client_credentials oauth2 grants for CD2
refs SAS-1540

* adds an audience setting to developer keys, so a key can be set to
  target external audiences with its credentials grants
* when a key with an external audience grants credentials, the token is
  signed with an asymmetric key instead of the internal symmetric key
* external audiences can retrieve the corresponding public keys from
  /login/oauth2/jwks
* credentials issued by developer keys with an account id include the
  account's guid in a custom claim

includes a refactor of key storage and rotation in consul, which had
already been done for LTI. but it wasn't really a feature of lti, just
something used by LTI, and we needed the same for key management for
this. moved it to be part of Canvas::Security

Change-Id: Ie5c0fcee6fc21687f31c109389a3bcc1ed349c5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243606
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2020-08-13 18:52:47 +00:00
Alex Anderson 590f43aa32 Enables adding alt text to image uploads
It also allows editing other a11y features, like making
the image presentational or embedding it as a link.

It splits out the Image Options form from the editor tray
to avoid copy/pasting too much. The logic and state are
still separated between the upload and edit forms, since
they don't overlap super well.

It also edits the logic around uploading and embedding
images to support the extra attributes.

A few Jest tests were added to check for appropriate
attributes being added.

Test Plan:
With RCE Enhancements enabled, visit an RCE page
Open the image upload modal and choose an image
Notice the image attributes form underneath.
Add alt text. Adjust the other attributes as desired.
Upload the image
Open the Raw HTML Editor.
Notice that the alt text is added to your image, along
with whatever other attributes you changed.
Decoration Images are given the `role="presentation"`
attribute; Display As "Link" embeds the image as a
link.

Fixes LS-445

flag = rce_enhancements

Change-Id: I462e2c322a3b39fc4fa9f47b675426c581c3a398
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242736
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-07-28 19:48:17 +00:00
Drake Harper 0469b0227a Change inbox avatar to use inst-ui
Test Plan:
-inspect avatar on inbox message is rendered from inst-ui

fixes VICE-17

flag=none

Change-Id: I92941e079b63a3a60468e1e894059c20e15b1251
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241435
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2020-07-01 17:22:03 +00:00
Ed Schiebel c603d6e9f2 fix audio player and video player sizing
closes LA-729
flag=rce_enhancements

The original intent for the audio player was to size it so the buttons
just fit. This ignored the fact that it's rendered w/in an iframe,
so popup menus are clipped. This change sizes the player to leave
room for those popups.

While the ticket was written against the audio player, the same issues
may occur in the video player, either for portrait videos or videos < 400px
wide when closed captions are present.  The original code for
sizing the video player shrank the width to fit
thea video's size, which clipped the buttons. This change sets a minimum
width for the player and letter-boxes the video.

test plan:
  - in the new rce
  - add an audio file
  > expect it to be wide enough to show all the buttons and
    tall enough for the speed and volume popups

  - add a vertical video
  > expect the video sized to fit in the available space in the Computer
    tab of the Upload Media modal
  - Submit to upload
  > expect the player to be wide enough to show all the buttons
  - click the fullscreen button
  > expect the video to be the height of the screen and letterboxed
  - restore to windowed size
  > expect the video to return to its letterboxed size
  - click the video, then the Options button
  - change the video's size
  > expect the video to remain letterboxed

  - add a horizontal video
  > expect the video sized to fit in the available space in the Computer
    tab of the Upload Media modal
  - submit to upload
  > expect the player to be sized to the size of the video
  - fullscreen
  > expect the video to be letterboxed in the fullscreen player
    (if the aspect ration of the video !== that of your monitor,
     or fill the screen if they match)

  - for the horizontal video, select Opitons and
    change the size to be "medium" or "custom" and < 400px wide
    and add subtitles
  > expect the video to be letterboxed in a 400px wide iframe.

Change-Id: Ib5d08dbd7796985d00f656e38a642ab92939d614
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238432
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-06-04 12:58:00 +00:00
Ed Schiebel 656de86a31 update build to load es modules from subpackages
closes LA-995
flag=none

1. unify the instui ui-babel-preset options across sub-packages
2. include "@instructure" as part of each sub-package name
3. unify the commonjs and es module directory structure
4. use index.js to export anything needed to be imported from
   outside the package. This removes any dependency on the
   package's internal directory structure and makes importing
   independent of commonjs vs es module simple
5. move canvas-rce's main entry from async.js to index.js
   (I'm 98% sure index.js was an artifact of the old rce)

test plan:
  - canvas-lms builds locally and in docker. (Jenkins builds
    the docker image, so I presume if it passes jenkins,
    the docker build wasn't broken)
  - sniff test the result, esp. student planner and the new rce.
  - yarn build:watch from canvas-rce, canvas-planner, and
    canvas-media packages should work, and yarn build:watch
    from canvas-lms should pick-up any changes.
    (I've verified this by finding a console.log statement
     and changing the message then use devtools to see it's in
     the new source after refreshing the browser)

Change-Id: I5f242d06ad655597cd416057d4b740d4bd86003b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-06-03 13:41:38 +00:00
Michael Brewer-Davis d989afbf15 change outcomes alignment component
closes OUT-3593
flag=outcome_alignment_non_scoring_content

Test plan:
- with quiz_api, outcomes, canvas running,
  provision outcomes for account
  - in canvas rails console:
      Account.first.provision_outcomes
- in a course, create some outcomes and groups
- sync canvas outcomes to outcomes service
  - following instructions in outcomes-service canvas.rake
    re: canvas docker-compose config, run in outcomes-service:
      dc run --rm api bundle exec rake \
         canvas:dump_canvas_data[outcomes.docker,db.canvas.docker]
      dc run --rm api bundle exec rake canvas:sync[outcomes.docker,true]
- enable "Outcome alignment to non-scoring content" FF
- create canvas course with wiki page
- on wiki page show page, add outcomes to the page
- verify that outcomes are retained on reload
- in another course without outcomes, verify that outcomes widget does
  not appear

Change-Id: Ie3af07642d818eaa529bff76b1ac7d81e575622b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235665
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2020-05-29 00:50:27 +00:00
Ed Schiebel 9d779b3d7f Update eslint rules to allow optional chaining
closes LA-973
flag=none

test plan:
  - code with a?.b does not report no-unused-expressions eslint error

Change-Id: If31b5545c31a9a095176cee74a2173ba0eeceab8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235941
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
2020-05-07 12:38:29 +00:00
Charley Kline 2543084cc1 Add use-media-set responsive React hook to package.json
Refs USERS-549
flag=none

This will be used in places where responsive components
may have performance issues due to complexity.

Test plan:
* build passes

Change-Id: Icce432352b5eb5118fc258b7c2f0e3c730eaae86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236255
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-05-06 15:59:14 +00:00
Derek Bender 1a5bb0a7e5 Point to instructure forks
Closes: CCI-351

flag = none

Test Plan:
- no behavioral changes
- build passes

Change-Id: I2e6bfa46b56ee2b59b8289fc90ef9c319757fc34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235566
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-04-30 16:35:43 +00:00
Derek Bender 3d9bffdbfb Add ui-flex explicitly to package.json
Fixes: CCI-352

This resolves an issue with a plugin which includes it explicitly and
then changes the yarn.lock. This gets both package.json files in sync.

Test plan:
- yarn.lock does not change with or without plugins present

flag = none

Change-Id: I48452b2c542476b42cf1aae80605e267d0c62819
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235769
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-30 16:25:44 +00:00
Benjamin Christian Nelson 9a20868030 remove unused selinimum gem
Change-Id: I0adc219a6cab442226619d5bdd0814d7f09d0d52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-04-23 17:25:57 +00:00
Ed Schiebel 9e73b30345 Update instui and media-capture versions, reprise
instui -> 6.24.0
@instructure/media-capture -> 7.1.0

the update to @instructure/media-capture is necessary to
fix the audio recording bug described in LA-859.  This change
required a bump to INSTUI's version. Both updates are rolled
into this change.

closes LA-595
flag=none

test plan:
For the audio recording part:
prereq: have notorious running. you must be loading canvas
from localhost unless using https in order to enable
the mic and webcam.
  - create or edit something with the rce
  - select Media > Upload/Record media
  - change to the Record tab
  - click on the "WebCam" button and select "No video"
  - record some audio and save
  > expect the audio to be uploaded and appear in the RCE

  - go to the speedgrader for a graded object
  - click on  the Media Comment button
  - click on the "WebCam" button and select "No video"
  - record some audio and save
  > expec the audio comment to be uploaded and playable

For the instui upgrade part:
  - make sure everything still works as expected
  - check with instui changelog for changes since 6.21 for guidance

This commit reverts commit 7ede798549,
which reverted 81d493b722
which was prematurely merged.

Reason for revert: get the oritinal patchset back in the queue,
but hold off merging until after beta is cut from master. This
will give the INSTUI change a chance to soak in dev for longer
than the weekend before being deployed

Change-Id: Iada67ee10a796e4b4b967b27a64f3e527e78249a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233037
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-21 17:44:46 +00:00
Ed Schiebel 7ede798549 Revert "Update instui and media-capture versions"
This reverts commit 81d493b722.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I605acf8519f023c671e6bb52eb541434701bc52f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233036
Tested-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-17 14:10:27 +00:00
Ed Schiebel 81d493b722 Update instui and media-capture versions
instui -> 6.24.0
@instructure/media-capture -> 7.1.0

the update to @instructure/media-capture is necessary to
fix the audio recording bug described in LA-859.  This change
required a bump to INSTUI's version. Both updates are rolled
into this change.

closes LA-595
flag=none

test plan:
For the audio recording part:
prereq: have notorious running. you must be loading canvas
from localhost unless using https in order to enable
the mic and webcam.
  - create or edit something with the rce
  - select Media > Upload/Record media
  - change to the Record tab
  - click on the "WebCam" button and select "No video"
  - record some audio and save
  > expect the audio to be uploaded and appear in the RCE

  - go to the speedgrader for a graded object
  - click on  the Media Comment button
  - click on the "WebCam" button and select "No video"
  - record some audio and save
  > expec the audio comment to be uploaded and playable

For the instui upgrade part:
  - make sure everything still works as expected
  - check with instui changelog for changes since 6.21 forguidance

Change-Id: I322b57f4addca16c989feeb9b74a1fc3f8c775e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234155
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-17 13:46:24 +00:00
jonw e9a47c91f6 add progress bar and errors to asmt bulk edit
closes LA-898
flag=assignment_bulk_edit

test plan:
- Edit many dates and save
- The job should start and a progress bar should be displayed next to
  the cancel button
- The job progress should be polled and the progress bar updated
- When the job completes, polling stops (see network tab), the progress
  bar should be at 100%, and a success message should be displayed.
- There should be appropriate screen reader announcements.
- If there are any errors during the job, polling should stop and the
  error messages should be displayed.

Change-Id: Ifd9ec6224318a003317a66ce2460ccf3e9d45efa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233136
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2020-04-10 16:35:19 +00:00
jonw d48344a5e1 add overrides and editing to bulk assignment edit
closes LA-847
flag=assignment_bulk_edit

test plan:
- Assignments and their overrides should be displayed with their dates
- Each date input should function and work independently

Change-Id: Ia2206bcae8b462535e3bcc99bf024bfaae39bc3e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230953
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2020-04-06 21:36:14 +00:00
Derek Bender fef18b228a require node 10.16 for brotli support
Fixes: CCI-312
flag = none

Test Plan:
- builds pass

Change-Id: I419c5f8a2572195c3b81bf51c8028ceabb7df1bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231945
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-03 19:48:37 +00:00
Derek Bender 2cdf77e112 Pin instui to ~6.21.0
Since instructure-ui has published version 6.22, any developer who runs
`yarn` will result in a modified `yarn.lock` file. To prevent accidental
upgrading from 6.21 to 6.22, it would be prudent to pin these
dependencies in the `package.json`. This also is a good idea to help
reduce any confusion around _why_ the yarn.lock is being changed locally
as well.

Fixes: CCI-302

Test plan:
- manually verify no changes to the `resolved` fields of each
  git-changed package. Since this pins all instui deps, they should all
  be exactly the same.
- manually verify there are no @instructure prefixed packages that are
  version 6.22

Change-Id: Id1c061bc60f1922d330cfafab00b4ddc9e09f9ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232255
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-03-31 17:28:00 +00:00
jonw 0bf9b8df9d add CanvasDateInput and bulk edit test table
The thrust of this commit is to implement a CanvasDateInput on top of
instui's DateInput field. The bulk editing table is just an instance
of it to test with.

closes LA-835
flag=assignment_bulk_edit

test plan:
- go to the assignment bulk editing page
- play around with the single date input component
  - selecting dates from the calendar
  - typing in dates
  - typing invalid dates
  - blank line
  - keyboard navigation
  - screen reader
- play around with your user locales and timezones and expect correct
  behavior showing the proper dates

Note that VO reads the date twice when you navigate with the keyboard. I
believe this is because it is reading the input value change and the
selected calendar date. I don't know that there's much to do about this.
The demo on instui's page does the same thing.

Change-Id: I9c66ccaa746fb91fecd20362e00a927c57f491b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230609
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2020-03-31 03:52:27 +00:00
Charley Kline 4a3e308105 Add <Responsive> component from InstUI
Refs UXS-49
Refs USERS-459

It will be generally useful to be able to use the InstUI
Responsive component to deal with browser breakpoints in
React. The immediate use case is something I'm working on
in multiple-root-accounts but it needs to be in core
Canvas.

Test Plan:
* You agree that the changes here, especially what happened
  to yarn.lock, are kosher.

Change-Id: Icad7db3de7fef94dd1eb292b02b30014a0facbd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-03-30 15:34:01 +00:00
Alex Anderson 66cd0c07f0 Add Teacher Tourpoints
Uses the "Product Tour" feature flag to selectively load
the bundle. It also grabs the user's role to only show
the tour to teachers. Admin and Student tours coming
soon.

To properly facilitate communication between the Navigation
component and the Tour component, I created a
simple PubSub engine which allows components to pass
messages between each other in an efficient and clean way.
This allows the tour to open the nav trays at certain
points in the tour.

Whether the tour shows is determined by a localStorage
key, set on the users browser. When they close the tour
if turns the flag on and uses that to now automatically
show the tour again.
The key is "canvas-tourpoints-shown-teacher"

This patchset also includes an update to the help links.
If the user is a teacher, it shows the "Show Welcome Tour"
link, allowing the tour to be re-opened from the help tray.

Test Plan:
Log into Canvas as a teacher
The tour should appear. Navigating through the tour properly
opens and highlights items in the navigation trays.
Reloading the page after closing the tour completely should
cause the tour not to appear. Removing the localstorage
key should cause the tour to reappear.

It should look like the designs linked below.
https://www.figma.com/file/BzfJcEbBaccu5lMsaZ08zK/Canvas-COVID19-Tourpoints?node-id=8%3A33

Refs UXS-22

Change-Id: I1164bc1fbe55fa5cbb5f4a9df271a0dcd772f045
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230614
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Laura Leavitt <lleavitt@instructure.com>
2020-03-27 16:36:59 +00:00
Chris Hart 2eb072efe1 Update new user tutorial tray content
flag=none
closes UXS-8

Adds new content (copy and links to Canvas Guides), as well as
updated images for each of the existing new user tutorial trays.

Test Plan:
Verify that the trays work as follows:
- All links should correctly resolve to the Canvas Guides page
  they name
- All trays should feature a Panda image
- All tray should open and close, and should be able to be
  dismissed permanently (no regressions from existing functionality)

Check the following index pages for trays: Announcements, Assignments,
Collaborations, Conferences, Discussions, Grades, Course Home Page,
Course Import page (under Settings), Modules, Pages, People, Quizzes,
Settings, Syllabus. There is a tray for Files, but it seems to be removed
from the Files index page on page load (not a result of this commit).

Change-Id: I873fdf9ceb6097d987f3e7da38e5fd615c1d98ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230372
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-21 08:53:38 +00:00
August Thornton 403b13a4f8 run jest tests concurrently
closes USERS-376
fixes USERS-379
fixes USERS-385

test plan:
 - specs pass

Change-Id: I30d4c27a2c628858a207d4c0236345bad49b7bcf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228278
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-03-10 21:38:24 +00:00
Charley Kline b897df4336 Update INST-UI to v6.21
Closes USERS-336
flag=none

Test plan:
* should be wrung out in beta
* can someone please test the CanvasMediaPlayer in the RCE?
  I saw some weirdness there and had to skip a test.

Change-Id: I1663466aa411fc5e98e2a5e4f7384eb151364817
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2020-03-05 01:48:56 +00:00
Augusto Callejas 8f537e3594 Enable outcome alignment on Canvas pages
closes OUT-3401

flag = none

test plan:
  - check out/update canvas plugins needed for sharding:
    * multiple_root_accounts
    * demo_site
    * canvas_geoip
  - check out/update canvas plugin needed for provisioning:
    * uuid_provisioner
  - check out/update quiz repo:
    * quiz_api
  - check out/update outcomes service:
    * outcomes-service
  - add the following to the postgres container section
    of your docker-compose.override.yml in canvas:
    ===
    ports:
      - "5432:5432"
    environment:
      VIRTUAL_HOST: db.canvas.docker
    ===
  - update canvas configuration by adding example
    dynamic_settings to existing config/dynamic_settings.yml
    and by copying example uuid_provisioner.yml
  - in canvas rails console, enable the auto provision setting:
    > Setting.set('auto_provision_outcomes_service', 'true')
  - start up canvas, outcomes-service and quiz_api
  - create a new root account from canvas siteadmin
    http://canvas.docker/accounts/site_admin/root_accounts:
    * account name: outcomes
    * account domain: outcomes.canvas.docker
  - after a few minutes, verify in the outcomes rails console that a new
    shard has been created and registered for the second account, but
    not the first
    > ap AccountRegistry.all
  - create a course with outcomes in outcomes.canvas.docker
  - in the outcomes api docker container, dump canvas data and sync
    into the provisioned outcomes shard:
    > bundle exec rake canvas:dump_canvas_data[outcomes.outcomes.docker]
    > bundle exec rake canvas:sync[outcomes.outcomes.docker,true]
  - enable the outcome alignment feature flag:
    - http://canvas.docker/accounts/site_admin/settings
    - Feature Options tab
    - Find "Outcome alignment to non-scoring content" feature flag
    - Switch to "ON"
  - return to course created in new canvas account
  - create a canvas page in the course
  - load the newly created canvas page
  - confirm that an outcome alignment widget appears, and that
    it opens a side tray with course outcomes  when attempting to align

Change-Id: Ide6891493ea3c926d155d4aea9bc7aff5bdaa6fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-02-21 16:28:03 +00:00
Davis Hyer 74714095be add confetti when assignment is submitted
refs KNO-265
flag=confetti_for_assignments

Moving Steven's POC (https://gerrit.instructure.com/c/canvas-lms/+/224811)
to the original assignments implementation.

A followup commit will introduce the screenreader text as this commit
is already getting large, and there has been a few difficulties on
adding that behavior already.

test plan:
  - with confetti_for_assignments flag disabled
    - turn in a submission for an assignment before the due date
      - you should be redirected to /courses/:id/assignments/:id
        - no confetti should display
      - visit /courses/:id/assignments/:id?confetti=true
        - no confetti should display
  - with confetti_for_assignments flag enabled
    - turn in a submission for an assignment before the due date
      - you should be redirected to /courses/:id/assignments/:id?confetti=true
        - confetti should display
    - turn in a submission for an assignment after the due date
      - you should be redirected to /courses/:id/assignments/:id
        - no confetti should display
  - while confetti is displayed
    - you should be able to clear by pressing either `space` or `esc`
    - confetti should clear itself after 3 seconds

qa risk: low

Change-Id: Ie7743af9e2341eab26fbc3055e90bb0658463018
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Johnny Le <jle@instructure.com>
Product-Review: Johnny Le <jle@instructure.com>
QA-Review: Johnny Le <jle@instructure.com>
2020-02-19 15:35:29 +00:00
Rex Fleischer 01165c1db3 spec: testing changes for js failures
Change-Id: I7b20ca53f0defdc78ffd285540e62d1b2bf51b86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223373
Tested-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-15 22:18:14 +00:00
Charley Kline dcaf1fd4b6 Upgrade INST-UI dependencies to latest (6.16.0)
Closes USERS-205
flag=none

Also had to make a slight tweak to a Canvas Planner file to reflect
a change in ui-forms -> ui-checkbox

In addition, several imports from InstUI had to be changed from
their legacy locations to their currently-documented ones, in
order for all the tests to pass. Using the old import sources
apparently causes two components of the same name to be rendered
which breaks assumptions in some tests that there will be only one.

Eventually we'll have to fix up all the imports which will be a
bit of a slog.

INST-UI changes notes for 6.16.0:
---------------------------------

Bug Fixes:

ui-a11y-utils: fix ui-a11y-utils dependencies
ui-docs-client:
    remove unnecessary import of ScreenReaderContent
ui-modal: update deprecated lifecycles in modal
ui-tooltip: uncontrolled example broken

Features:

instui-cli,ui-scripts,ui-template-scripts:
    add a new ui-template-scripts package
instui-cli,ui-upgrade-scripts:
    add a new ui-upgrade-scripts package
ui-badge: add ui-badge package
ui-buttons: add a CondensedButton component
ui-buttons: add an IconButton component
ui-byline,ui-layout: add ui-byline package
ui-checkbox: add ui-checkbox package
ui-docs-client:
    make content within docs pages navigable via linking
ui-docs-client: updates to compileMarkdown for id generation
ui-drawer-layout: add ui-drawer-layout package
ui-elements: add isWithinText prop to ui-element Link
ui-elements,ui-truncate-text: add ui-truncate-text package
ui-expandable: add ui-expandable package
ui-forms,ui-radio-input: add ui-radio-input package
ui-forms,ui-text-area: add ui-text-area package
ui-navigation: remove experimental pill from AppNav
ui-range-input: ui-range-input package
ui-responsive: add ui-responsive package
ui-spinner: ui-spinner and design updates
ui-themeable: update deprecated lifecycles in themeable
ui-tray: ui-tray package

Test plan:
* Review changelog above
* Test on master thoroughly.

Change-Id: I9f4552f18b2a48a626e7bb2102f8b3def46eb775
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221466
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-01-15 18:22:03 +00:00
S. Jacob Powell 85fe2246e9 Ensure all JS stages output test results
test plan:
See the following link for examples of failing in each stage,
as well as the test output being correctly loaded into
the Tests tab:
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Ftest-suites%2FJS/detail/JS/5082/pipeline

fixes: CCI-178

flag = none

Change-Id: I43c16ce7b589eb69cbe266c0929a722325ece2cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222604
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-01-15 06:01:08 +00:00
Charley Kline e8db468fdd Update InstUI imports for canvas planner
Refs USERS-205
flag=none

The InstUI folks are splitting up packages so to allay
future compatibility problems, and to get tests to pass
on future upgrades of InstUI, we should follow these as
they move rather than rely on the old locations. This
takes care of the Canvas Planner package.

Note that I cheated a bit here and brought CanvasSelect
over from the main Canvas app into this package. At
some point that should probably become a package of its
own, I guess.

And I had to add another test file because the tests
for CanvasSelect dragged the test coverage below 85%.
Sigh.

Test plan:
* tests pass
* canvas planner works

Change-Id: I40bbbe559f4928318b8ac1444649d97b09a281c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221741
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
2020-01-07 19:14:21 +00:00
Mysti Lilla 7ea5d98f47 Announce when items are loaded
fixes LA-292
flag=direct_share

Test plan
- Load the content shares and ensure the
  SR announces the load

Change-Id: I828c4ad23d5ebaf0879a7e3df56d2584b715c508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220774
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
2019-12-18 23:02:33 +00:00
Ed Schiebel 8746eef1ff Fix course image dnd
closes LA-95
flag=none

test plan:
  - go to any course settings page
  - click "Choose Image"
  - drag an image file into the drop area
  > expect a spinner while it uploads
  > expect the image chooser modal to close
  > expect the image to show as the course image

  - repeat, but try to drop an image outside the drop area
  > expect nothing to happen

  - repeat, but try to drop a non-image file into the
    drop area
  > expect it to be rejected and the message
    "File must be an image"

Change-Id: I7c94a02090b2b806610637d6329cf301ca1d5237
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
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-12-16 13:39:54 +00:00
Ryan Shaw 202f0b80a3 Print a helpful message in yarn webpack:analyze
Change-Id: I7d73e8d482dc025d478597393c261b9807dae544
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220599
Reviewed-by: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-12-13 16:13:55 +00:00
Mysti Lilla 3849cfad1c Prevent 404 error in Direct Share tray
fixes LA-325
flag=direct_share

Test plan
- In the direct share import tray
  select a course and then a module
  for that course
- Then search for a different course
  and select one from the searched list
- Verify that you don't get the "something
  went wrong" picture

Change-Id: I70b7614da7d9003c76bf3ebe3ff1290e4de98575
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219207
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2019-12-10 00:15:54 +00:00
Ryan Shaw ecfa985af1 Revert "Perf: use a minimal version of tinycolor2"
Closes: TALLY-318

This reverts commit 1db3924086.

Change-Id: Id59d17728734fc150bd3295684937fd88c9ae0a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218038
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-11-20 21:36:10 +00:00
Ryan Norton 7051c0aa74 fix deprecated ellipsis warnings in A2
this fixes the following error that is showing up in the console
when using student view:

Warning: [Heading] `ellipsis` is deprecated and will be removed in
version 7.0.0. Use `<TruncateText />

Test Plan:
* when using A2, go to an assignment page and confirm that the
  warning is no longer showing

flag=assignments_2_student
fixes WOKE-90

Change-Id: I9fea740c04d9b4029d01a688a8b2f98c94d3fd8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215964
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
2019-11-05 22:42:37 +00:00
Ryan Shaw 1db3924086 Perf: use a minimal version of tinycolor2
closes: COREFE-389

This version of tiny color has only what we need to provide the APIs
exposed by @instructure/ui-color-utils
Before: 15k, after 5k

See the difference
https://bundlephobia.com/result?p=@instructure/tinycolor2
Vs
https://bundlephobia.com/result?p=tinycolor2

Here’s the actual changes of what was removed:
https://github.com/instructure/TinyColor/commit/350479a

Change-Id: I591652bf95f2c1667f17da5c94b4e60df6fba0d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214768
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-11-01 21:00:38 +00:00
Brent Burgoyne 802645337e update timezone library for brazil dst change
temporarily using a fork of bigeasy/timezone since it does not build
with the latest releases of eggert/tz

fixes COREFE-308

test plan:
- set user timezone to brazilia
- create an assignment with a due date after 2019-11-03
- save the assignment
- the time should not be off by an hour on the details page

Change-Id: I7a15e92def90a5d83f8be079657a58894bd13822
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215065
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-10-30 16:12:28 +00:00
Ed Schiebel 67e551c5e5 Add video options tray to the rce
closes COREFE-315

test plan:
  - load a page with the RCE and have a video in it
  - click on the video
  > expect the Options popup toolbar button
  - click it
  > expect the video options tray to open
  > expect the title to default to the video's file name
  > expect the default size to be Large (400px on the long side)
  - delete the title
  > expect the Done button to be disabled
  - set a new title
  - change the size to Custom
  - delete the width or height
  > expect an error message and the Done button to
    be disabled
  - enter a new size, or select one from the dropdown
  - click Done
  > expect the video to be resized to the new size
  - if you're using a screenreader, expect the video
    to be announced as "Video player for {your title}"

Change-Id: Id7e29520cc91c02645b92d666216e64f6619bbbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211355
Product-Review: Lauren Williams <lcwilliams@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2019-10-30 13:14:42 +00:00
Jeremy Stanley cac818a878 files: turn off page.js click handler
because it prevents preventDefault on file links (sometimes)

then use it explicitly where we need it, on the left/right
preview buttons

test plan:
 - go to user files (/files)
 - have multiple image files in a folder
 - reload the page, then click an image file
 - it should preview, not download
 - clicking the left/right arrows at the
   side of the preview window should go to the
   previous/next image without reloading the page

fixes ADMIN-2923

Change-Id: Ib97d25d51e7c94fb962e5d24d3c763554e7fcdd4
Reviewed-on: https://gerrit.instructure.com/212876
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2019-10-17 20:47:47 +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
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 48c055ed0e Now that we have streaming, execute JS sooner
Closes: COREFE-302

This will actually start executing the JS as soon as it comes in
the <head> instead of waiting until after the </html> for it to start.

What this means is that for any page that is streamed, we will start
running our javascript sooner, as soon as the <head> is sent to the
browser. So we can begin executing code while the server is still
working on sending back the rest of the document.

Note: this change makes it necessary for any endpoint that is streamed
to have a check for DOMContentLoaded before doing anything that assumes
elements will be there. I added this `@instructure/ready` helper do to 
that in all the places I could see. If the DOM is already loaded,
`@instructure/ready` run the callback immediately (not in a setTimeout) 
so theoretically load/execution order should be _exactly_ the same for 
any response that is not streamed, even if it is wrapped 
in a “ready(…)” callback

QA test plan:
* click around in prod mode, especially on pages that are streamed
  make sure there are no thrown javascript errors or pages that
  fail to render
* try both on a fast network as well as simulating a slow network with
  browser caching turned off (if you don’t know how to change your
  network speed simulation settings in Chrome, I can show you)
* specifically look at pages that are streamed 
  (like courses/x/discussions/y, /courses, courses/x/modules) 

Change-Id: I49a74ab480095e50cfa08dca8e074848dce12012
Reviewed-on: https://gerrit.instructure.com/203198
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-09-19 23:10:43 +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