Commit Graph

798 Commits

Author SHA1 Message Date
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
Jenkins 61852574d7 [i18n] Update package translations
Change-Id: I25c0789116d72c822e4cefb2f801663b41e0c0fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236261
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-05-05 04:52:41 +00:00
Jenkins 7ae766e250 [i18n] Update package translations
Change-Id: I8f70b3277211e1ce4b83f3b3a021cfe21ad51ca9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236069
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-05-02 04:48:47 +00:00
Laura Gonzalez-Horwitz 9da71c3335 Revert "Add new font to RCE"
This reverts commit d3d7ebf2c1.

Reason for revert: Merged after rebasing but before Jenkins finished building

Change-Id: I86783eb8f555ab4948b9a16937c08ee4871c96c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236002
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-05-02 00:19:16 +00:00
Laura Gonzalez-Horwitz d3d7ebf2c1 Add new font to RCE
flag=canvas_k6_theme

Closes UXS-95

Test plan:
1. Turn on RCE Enhancements and Canvas Elementary Theming flags
	You can turn them on at the admin level
	You can turn them to 'allow' at the admin level
	and on at the course level
2. Navigate to any page with RCE. Ex. Syllabus tab in any course
3. Edit the RCE content.  By default,
	the font should be Architect's Daughter
4. Open the hidden menu (Option + F9)
5. Select any other font (Format > Fonts > [font])
6. Add an additional line to the RCE content
7. Close the editing mode
8. The text should be in the fonts in which it was typed

Change-Id: Ia5dc5d2fbd0e042310b687a1d865a0804d95ef5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233850
Tested-by: Laura Gonzalez-Horwitz <lgonzalez-horwitz@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
2020-05-01 21:43:54 +00:00
Ed Schiebel 0ebf876f7a Respect user's selection when creating links in the RCE
closes LA-508
flag=rce_enhancements

test plan:
  The problem described in the ticket:
  - in an rce, type in some text, select some text
  - choose Documents > Upload Document
  - upload a file
  > expect the created link to use the selected text,
    not replace it
  Related fixed issues
  - select some text
  - choose Links > Course Links
  - pick something (Course Navigation is always populated)
  > expect the created link to use the selected text
  - this should work for images and files also (media is always
    embedded)

  - with a selected link, try creating another link like above
  > the link's href is updated, but the selected text remains
    the same

Change-Id: Ia2d419cb07b779e02677b28b60973d1daf53932c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227979
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
2020-05-01 13:52:59 +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
Jenkins 4a758ff050 [i18n] Update package translations
Change-Id: I60ce598ba59d874949e2116f92b4176963284d93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234856
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-22 04:47:07 +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
Jenkins 2d0f193072 [i18n] Update package translations
Change-Id: I1c14416e97c5c03246578b57804e1f2c6106e7e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234737
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-21 04:49:31 +00:00
Ed Schiebel 79e02debaf Make canvas-rce build independent from canvas-lms
In the interest of time, we imported the canvas FileBrowser
into canvas-rce by dot-dotting our way out of our package. This
kept canvas-rce from building outside canvas-lms. The CI team
needs this to work so that they can integrate snyc into out build
process. While we will eventually get the RCE working outside canvas,
this change doesn't do that, but does let it build.

closes LA-927
flag=none

test plan:
  - in the RCE, document > course documents
  - in the tray, switch from "Documents" to "All"
  > expect the file browser to populate with all your files
    and to work like before
  - have file name with diacritic marks and other non-English
    characters
  > expect the files to be correctly sorted by name according
    to the user's locale
      to help 'ä' sorts before 'z' with locale 'en' or 'de' (german)
              'ä' sorts after 'z' with locale 'sv' (swedish)

Change-Id: Ifa348a77525c6e8af7611cf14b96510ce4ddd7f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234251
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-20 12:58:59 +00:00
Jenkins 5680974b7b [i18n] Update package translations
Change-Id: Ib5b55c0495ece3633844bbed3683fd05fdb6839f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234566
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-18 04:49:21 +00:00
Ed Schiebel dfac0ff66a better media upload error handling
The user can no longer leave a page while media is uploading
If media upload fails, the user gets an error message

closes: LA-759
flag=none

test plan:
  - in the RCE, upload some media (maybe have your network throttled
    so the upload is slow)
  - try to leave the page
  > expect to be prompted whether you really want to leave the page
  - say no
  > expect to be left on the page
  - say yes
  > expect to leave the page

  - in the RCE, upload some meddia, but cause it to fail
  > expect an error message in the RCE
  > expect the grey placeholder to be removed

Change-Id: I447e232f6bc0801249fa2b7fd92314716dbc95e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233902
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-17 17:56:36 +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
Derek Bender 4dc3c9a689 release canvas-rce 5.0.2
Change-Id: I0abd66c92543a377e39dc93d003ed3fa34baf536
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234153
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-15 13:52:02 +00:00
Jenkins 7fe451ee7e [i18n] Update package translations
Change-Id: I6651d45bf1605a77c26e014c022a8c206bf846c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-14 04:47:41 +00:00
Ed Schiebel 1271571e3e fix error with unexpected audio mime-type
we were looking for audio and video mime-types from a list. when
recording on a mac, the type wasn't in our list. This change
generalized the check by considering mime-type starting with "audio"
to be audio, and "video" to be video.

closes LA-868
refs LA-595
flag=none

test plan:
  You'll need notorious running
  in chrome
  With RCE Enhancements turned off and again with it on
  - in the RCE select Media > upload/record media
  - go to the record tab
  - record a video
  > expect it to be in the RCE
  - repeat, but in the Record tab, click on the "webcam"
    button and select "No Video"
  - record some audio
  > expect it to be in the RCE
  - save
  > expect to be able to play both.

  - go to an assignment's submission
  - go to speedgrader
  - add a media comment
  - record audio
  - do it again for video
  > expect the comments to be viewable



Change-Id: If2cdfd4dd689569ac539a079f270bd789f37a502
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231542
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-04 12:51:29 +00:00
Ed Schiebel 531b3a359a FullStory updates
This change
1. moves the feature flag from RootAccount to SiteAdmin, as it should
   not be manipulated by any of our institutions
2. hides the mobile login qr code from fullstory using their fs-exclude
   class name
3. hides the users' avatars by adding a data-fs-exclude attribute to all
   instances of the instui Avatar component, which we an then filter on
   in the fullstory UI (because instui doesn't let us add a className)
4. hides the users' avatars that are not Avatar by adding .fs-exclude

Note: I am hiding all <img> elements via the FullStory UI, but this does
not hide Avatar, which puts the image in as a background-image

closes UXS-97
flag=enable_fullstory

test plan:
  - you can really only test in beta where fullstory can capture
    sessions and see that user avatars and the qr code are hidden

Change-Id: Ic8b73a2d7cd0474c1fd9a5337f747b76e5f67d06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232666
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-04-03 15:15:27 +00:00
Jenkins 7a37442af3 [i18n] Update package translations
Change-Id: I683e6bf0af46ca7f747fe3b3558669dd45060254
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232589
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-04-02 04:47:02 +00:00
Jenkins e764368d0f [i18n] Update package translations
Change-Id: I9d2e144020223114240ac3e3ffa42dad4c147a5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-30 04:47:35 +00:00
Jenkins ee095ade57 [i18n] Update package translations
Change-Id: I35c6b7fdd90b06d4cae582170d7d87c1ae8b7fff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232024
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-29 04:50:25 +00:00
Jenkins 4cb968c3cf [i18n] Update package translations
Change-Id: I9165c7874893e84b94bb5f998e2e45b557f366ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232013
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-28 04:48:55 +00:00
Jenkins a3eadd4246 [i18n] Update package translations
Change-Id: Ide69fb2735b51c49b4457a5168e282166460798e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231804
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-27 04:47:51 +00:00
Jenkins 088e7d912f [i18n] Update package translations
Change-Id: I93f2d15fe1b57532e917974165e0e3f821f6ed48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231598
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-26 04:46:36 +00:00
Jim Simon eb03f439ac Fix several build issues for docker on linux
flag = none

This issue manifests when running `docker-compose run --rm web yarn`. The build
scripts do not have permissions to write to various generated directories, so the
builds fail. We're able to work around these permission constraints by using
volumes and deleting folder contents instead of the generated folders themselves.
Without these changes, anyone using docker on linux will end up with runtime JS
errors relating to missing files (i.e. missing js-utils/lib/* files).

Change-Id: I5d0efe70d161717b8b2fa4f5a7f1b162eca55281
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231029
QA-Review: Jim Simon <jsimon@instructure.com>
Product-Review: Jim Simon <jsimon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
2020-03-24 17:28:04 +00:00
Jeremy Neander 664090f1df prefetch user_ids in gradebook
closes TALLY-749
flag = prefetch_gradebook_user_ids

test plan:
 * Enable the prefetch_gradebook_user_ids release flag
 * Visit Gradebook
 * Open the network tab in dev tools
 * Refresh the page
 * Verify user_ids are requested early
   (within the first handful of XHR requests)
 * Verify user_ids are not requested twice
 * Change the section or enrollment filters
 * Verify user_ids are requested again

Change-Id: I3969d988f3328dfb6ac15be96fa7cb18d7609c82
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230246
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2020-03-19 14:49:20 +00:00
Ed Schiebel 211b7c1c0e Handle inst-fs uploads from the rce
the previous flow lost track of the file verifier, causing
users not to be able to view other user's images/files

closes LA-745
flag=none

test plan:
  - in an environment where file uploads to go inst-fs*
  - create a discussion
  - as Student A, add a reply including an uploaded image
  - as Student B, or the Teacher, view the discussion
  > expect the image to be rendered
  > if you look at the <img>, the src attribute should include
    the verifier parameter.
  - more scenarios from the acceptance criteria in the ticket

*I might be able to help you get this setup locally.

Change-Id: I2bf707f0f1f8a29cd8e5d224a962f8ef515f4a9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229433
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-03-13 20:25:55 +00:00
Jenkins 3c5202eb80 [i18n] Update package translations
Change-Id: I952194cdd43acb2765e10cf8560713e79ae49f92
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229588
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-11 04:49:04 +00:00
Ed Schiebel 86b91c7f1c New CC/Subtitle picker
closes LA-462
flag=cc_in_rce_video_tray

Updates the UI to match the new design
Adding the CC picker to the Video Options tray is
what is behind the flag.
NOTE:  requires g/229165

test plan:
  - edit something with the RCE
  - click on Media > Upload/Record Media
  - select a video file
  - check the "Add CC" checkbox
  > expect the cc picker to appear
  - select a language
  - select a file
  > expect the picker to be replaced with a box showing
    the language and a trash can
  > expect a + button
  - click +
  > expect a new picker
  - this time select the file first
  > expect a button showing the file name
  - click the button
  > expect to be able to change the chosed file
  - select a language
  > expect another row with the language and trashcan
  > expect the + button too
  - click one of the trash cans
  > expect that row to disappear
  - at any time, click "Submit"
  > expect the video added to rce to have a CC button
  - click the CC button
  > expect a menu including the languages of the
    captions you added

  If you have the cc_in_rce_video_tray (Edit Closed Captions)
  flag on:
  - click in the video in the rce
  - click on Options
  > expect the closed caption picker UI to be in the
    video options tray
    (you can interact with it, but it will not save
     anything on clicking Done)

Change-Id: I575fcd2a5c735d5067103dc07e058cd74e3fbf36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223222
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-03-10 17:23:33 +00:00
Ed Schiebel 815a609f3e Introduce CanvasSelect into canvas-lms/packages/canvas-media
nothing uses it yet. just introducing the component to be
used soon.

refs LA-462
flag=none

test plan:
  - the unit tests should pass

Change-Id: I6b5dca8e8d7f3007bbbf25e70fb2699bc775b36b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229165
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-03-10 12:29:51 +00:00
Jenkins aa7a56aa71 [i18n] Update package translations
Change-Id: I0309fcb0aabe039c6caa188218565afe8bbb3621
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229423
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-10 04:48:39 +00:00
Ed Schiebel 417fc616a3 Restore <img> upload placeholder in the RCE
closes LA-698
flag=rce_enhancements

test plan:
  - edit something with the rce
  - add some text
  - using devtools, slow down your network (this will give you
    time later)
  - upload an image (or anything, really)
  > expect the grey placeholder box
  - refresh (before the image replaces the placeholder)
  > expect to be prompted to restore autosaved content
  - say yes
  > expect the RCE not to have the placeholder image

Change-Id: I79211fa8daa77d51ff15e73563dcce48103cbdb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228721
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-03-09 15:32:39 +00:00
Jenkins 0cdca0a7b8 [i18n] Update package translations
Change-Id: I6f46cca2a8b41077ab257ec1e513a1774913bc50
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229259
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-07 04:48:49 +00:00
Ed Schiebel 4e39b31711 Add a title to embedded media's dom element
which is typically an iframe

closes LA-628
flag=rce_enhancements

test plan:
  - in the rce, choose Media > Upload/Record Media, the the Embed
    tab, then paste in some html (you can get a real video from
    youtube, or just type any old valid html element code)
  - click submit
  - click save
  > expect the element you added to have a title="embedded content"
  - repeat, but when you enter the  embed code, give the embedded
    html an aria-label or title attribute
  - submit and save
  > expect the embedded element to have kept its original title
    or aria-label

Change-Id: I42a8ee26e8a95aa255705f09efcf581de69664d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228273
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-03-06 18:22:38 +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
Jon Willesen 9e70974239 add protocol in rce when linking existing text
fixes LA-517
flag=rce_enhancements

test plan:
- In an RCE, select some existing text and click on "external links"
  from the toolbar.
- Link to a URL without a protocol. e.g. "example.com"
- View the HTML: the href of the link should have the "http://" protocol
  added.
- Select an existing link and click the "Options" popup, or click "Edit
  Link" in the toolbar.
- Set the Link to a URL without a protocol, as above.
- View the HTML again and see the protocol has been added to the link.

Change-Id: I8f887e1630b74c278fe3b72da55a34fa163e5709
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228553
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Clint Furse <cfurse@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2020-03-04 21:29:20 +00:00
Jenkins c5cc77e14b [i18n] Update package translations
Change-Id: I86eda7085df5d9716e4351c07661da74e4a1edfe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-28 04:51:42 +00:00
Davis Hyer 64bb26477e fix coverage reports for canvas-rce
refs KNO-308
flag=none

https://gerrit.instructure.com/c/canvas-lms/+/223471 added a reference to
the window object, and that package's mocha tests weren't configured
properly. This commit registers jsdom for the tests, injecting the needed
window

test plan:
  - from canvas root, run (cd packages/canvas-rce/; yarn test:coverage)
    - tests should run
  - running RUN_TESTS_FIRST=1 yarn test:coverage from root should at least
    make it past that package

qa risk: low

Change-Id: I86a3acc921644533ac381254aea376a833a6ec8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228134
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
2020-02-27 20:44:07 +00:00
Jenkins ecdfc6e2ca [i18n] Update package translations
Change-Id: Ie7164d2d1da231a2208eec4a3dffe32ba46787ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228146
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-27 04:53:33 +00:00
Ed Schiebel 1e082c81ef Remove "Links" from RCE tray for students
Students can't access links to course objects, which is why we
removed "Course Links" from the RCE's Links menu. But we forgot
to remove it from the filter at the top of the CanvasContentTray
that opens when you select "User Images" or similar. So once the
tray was open, the user could choose "Links", even though she couldn't
query for them.

closes LA-613
flag=rce_enhancements

test plan:
  - as a teacher or admin, go somewhere with an rce
  - select Course or User Images, Media, or Documents
  > expect the top Select in the tray to offer
    "Links, Course Files, and User Files"
  - repeat as a student
  > expect "User Files" to be shown, and cannot be changed.

Change-Id: I65ad19afb07c033bb7e46b7570031357711dee95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226999
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Clint Furse <cfurse@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2020-02-25 17:30:39 +00:00
Ed Schiebel f36eaed5d6 Enusre correct editor has focus when inserting rce content
closes LA-520
flag=rce_enhancements

test plan:
  - create a new quiz and go the the questions tab
  - click on "+ Question"
  - do Links > External Links
  - fill in the dialog and click "Done"
  > expect the new link to be put in the rce

  - refresh the page and repeat for (because focus
    kind of straigntens itself out after interacting
    with the RCE, it's important you refresh the page
    and start from scratch for each test)
    - Documents > Upload Document
    - Images > Upload Image
    - Media > Upload Media
  > expect the uploded item to appear in the new rce

Change-Id: I2b77bf5cea57eddd17f49b4333632a725a3c7b19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-02-24 16:45:28 +00:00
Jenkins 9a34092074 [i18n] Update package translations
Change-Id: I002430e421992e145c27877bf3d42821717c9367
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226941
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-18 04:47:49 +00:00
Jenkins 14f6805847 [i18n] Update package translations
Change-Id: I4f938dcd53a8b0c60f3f4f453c50133fa8b619fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226915
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-16 04:48:10 +00:00
Jenkins d67d9ce581 [i18n] Update package translations
Change-Id: I4ffb5941ae80041806f0a10f321c3d570e7de8c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226912
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-15 04:47:02 +00:00
Jon Willesen 5b4fc26e4e fix RCE menus
Make the RCE menus execute the same commands as the toolbar instead of
Tiny's internal commands. Add menu items for things only currently found
in the toolbar.

closes LA-468, LA-403
flag=rce_enhancements

test plan:
- Play around with the RCE menus. They should generally do the same
  things as the corresponding toolbar options.
- Check the new "Horizontal line" menu item in the Insert menu

Change-Id: If9abce772496c89cd0a2ec64540aaaf86c77b418
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226164
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2020-02-14 16:41:45 +00:00
Ed Schiebel 8d697d722e new improved rce URL handling
this moves the locations where swizzling of the file
url takes place to be more uniform whether the file
is being uploaded or selected from the tray.
I also adjusts the url of an image depending on whether
it's linked or embedded so it's displayed (and not
counted as a view) or downloaded (which is logged
as a view)

to test this, you will also need the changes to the RCS
in g/225943

closes LA-585
flag=rce_enhancements

test plan:
 - as a teacher in a course, create anything with the rce
 - insert an image you upload
 - insert a Course image
 - insert a User image
 - insert another image and use Options to convert it to a link
 - insert a document you upload
 - insert a course document
 - insert a user document
 - save
 - view the item as a student
 > expect to see all the images
 - click on each of the links
 > expect you to have access.
   > right click on an image > View Image will download
     (same as old rce)
   > the link to the image will download (new to new rce)
   > the link to the uploaded document will open in canvas' files page
     (same as old rce)
   > the link to the course file will open in canvas' files page
     (same as old rce)
   > the link to the user file will be displayed right in the browser
     assuming the browser can display the file type
     (new to new rce)

 - repeat, but as a student create a discussion topic
 - view the discussion as another student
 > expect to see all the images and be able to access all the links

Change-Id: I6fe7e77250082e6f4ddfc3fba7def9655a5c2b49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2020-02-14 15:16:37 +00:00
Jenkins 601c92fbdf [i18n] Update package translations
Change-Id: Idcde5138d877ad968cbff01af893943725518e1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226696
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-14 04:48:11 +00:00
Jenkins f35a1ab35b [i18n] Update package translations
Change-Id: Ia8b84da8d946459f21a67d3c27a519c871368f2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226379
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-12 04:48:38 +00:00
Ed Schiebel 11f140adea Remove RCE's upload media menu item if kaltura not enabled
closes LA-560
flag=rce_enhancements

test plan:
  - from /plugins/kaltura
  - check "disable this plugin" and click Apply
  - edit something witn an RCE
  - click on Media toolbar button
  > expect the Upload/Record media menu item not to be there
  - return to /plugins/kaltura
  - uncheck "disable this plugin"
  - fill in the rest if not already and click Apply
  - edit something with an RCE
  - click on Media toolbar button
  > expect the Upload/Record media menu item to be first in the list

Change-Id: Iac680c9e8cb4af1cfae8b212c22e387f025f834a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225195
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: Jon Willesen <jonw+gerrit@instructure.com>
2020-02-11 14:50:18 +00:00
Jenkins 34b88170a4 [i18n] Update package translations
Change-Id: If78d9bc36944f47e989abbe85e593b9ae06bbe9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226188
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-11 04:48:00 +00:00
Jon Willesen 1fc9c85682 add filename to rce upload clear button
fixes LA-450
flag=rce_enhancements

test plan:
- In the new rce, choose "upload image" from the toolbar and drag a file
  into the dialog.
- Using a screenreader, check that the SR text for the trash button
  includes the filename.

Change-Id: Ie32f11cba28aa0957c3b1d0e51c129a23c6a7f6e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226066
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2020-02-10 23:30:34 +00:00
Jenkins 96fa7255c4 [i18n] Update package translations
Change-Id: I74d56c9a4be657408c5b3192846410aaf1f82ee6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225425
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-04 04:48:02 +00:00
Ed Schiebel 80b3bd0c7c Change rce's upload placeholder
The previous placeholder was an <img src="data:image/gif...">. When
autosave saved it, it got saved as an <img src="blob:...">, which
cannot be restored. By changing it to a <div>, the problem goes away.
The only side-effect is that if the upload fails and the user wants
to delete the placeholder, it used to take one click of the BS key.
Now they have to delete the "Loading..." text and the <div> will
eventually go with it.

closes LA-475
flag=rce_enhancements

test plan:
  - with notorious not running
  - in the RCE, upload media
  > expect the "Loading..." grey placeholder box
  - refresh the page
  > expect to be prompted with auto-saved content
  - say Yes
  > expect the grey box in the RCE
  - iwth notorious running
  - in the RCE, upload media
  > expect the "Loading..." grey box
  > expect the grey box to go away once the media appears

Change-Id: If16037b4b3310eb8bdc8212bc1ed1d8dc83b657d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224433
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-02-01 14:54:06 +00:00
Jenkins 94cbfc7550 [i18n] Update package translations
Change-Id: Ifef362652a5dae4943893cfbcde44becdcaa3a52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225263
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-02-01 04:48:03 +00:00
Ed Schiebel 16a594b9d9 Cleanup rce autosave before prompting to restore
We originally looked for saved content to restore, and
prompted the user about it before cleaning up expired
autosaved content. This is backwards.

closes LA-518
flag=rce_enhancements,rce_auto_save

test plan:
  - edit something with an RCE then navigate to another page
    without saving
  - edit again, soon.
  > expect to be prompted to restore saved content
  - edit some more and navigate away without saving
  - edit again later, after the timeout period expires (this is
    1 hour, but you caould do
    Setting.set('rce_auto_save_max_age_ms', 10)
    in a console and change it to 10ms
  > expect not to be prompted to restore saved content

Change-Id: I35b17ccc744f3c0c6138980a5131404532aef3ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224523
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-31 15:35:21 +00:00
Jenkins d1fdfebdc7 [i18n] Update package translations
Change-Id: Ie7e12b9ca72674697a33e781c6b2e1c920bb0a16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225046
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-31 04:47:54 +00:00
Jenkins 1448526d63 [i18n] Update package translations
Change-Id: I9a0601333362ca1e299058b2b3f427d96e6b2594
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224938
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-30 04:47:05 +00:00
Ed Schiebel da790f80c2 Remove media upload from rce per kaltura plugin setting
closes LA-536
flag=rce_enhancements

test plan:
  - open a page with the rce
  - click the Media toolbar button
  > expect "Upload/Record Media menu item to be available
  - go to /plugins, click on kaltura, check the
    "Hide the video icon in Rich Content Editor." checkbox
    and click Apply
  - return to a page with the rce
  - click the Media toolbar button
  > expect "Upload/Record Media menu item to be absent

Change-Id: I7c7d89c18115c8d2970da4db736614d252a3661a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224823
Reviewed-by: Steven Burnett <sburnett@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-01-30 00:56:21 +00:00
Jenkins 73323fb09e [i18n] Update package translations
Change-Id: Id8a3cd6a1d54a9e884cbec2c74fd89ce19d2dd7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-29 04:49:40 +00:00
Ed Schiebel f8e06be3fd Add 'audio/x-m4a' to the list of audio mime types
closes LA-505
flag=rce_enhancements

test plan:
  - create a new audio file with quickTime Player
  - in RCE, use Media > Upload/Record media to upload the
    resulting .m4a file
  > expect the player to be embedded in the content (and not a link)

Change-Id: Ia835f76f526a82fa0aa970a3502ea78d24dd11ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-28 20:06:34 +00:00
Ed Schiebel 09ec04bfcb Update wording in rce auto-save restore modal
closes LA-519
flag=rce_auto_save

test plan:
  - type some stuff into an rce
  - refresh the page
  > expect the "Found auto-saved content" modal
  > expect it to say
    "Auto-saved content exists.
    Would you like to load the auto-saved content instead?"

Change-Id: Idc8f29318435a8678a53f46501491a2e285742f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224645
Reviewed-by: Jeremy Stanley <jeremy@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-01-28 17:54:19 +00:00
Jenkins 6b3ef44170 [i18n] Update package translations
Change-Id: I4da517f87f6a663721e755f18d5b5f79e50659d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224484
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-26 04:48:03 +00:00
Jenkins 98b77afce3 [i18n] Update package translations
Change-Id: I26df98e42673d237e956f3c8e57e37303ab7c375
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224476
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-25 04:47:53 +00:00
Ed Schiebel 05ada029a9 Autosave RCE content
Autosaves what you type into the RCE in local storage
keyed by "rceautosave:{your url here}:{textarea.id}"

Only enabled for pages where there is one RCE.

closes LA-219, LA-469
flag=rce_auto_save

rce_enhancements flag must also be on

test plan:
  - create a new announcement or assignment
  - type some stuff in the rce
  - refresh the page
  > expect to be prompted to restore saved content
  - save the thing
  - edit the thing and make some changes
  - cancel
  - re-edit
  > expect to be prompted to restore saved content
  - edit again, make changes, save, re-edit
  > expect not to be prompted
  - do more stuff like that

  test max-age timeout
  - in the rails console, run
    Setting.set('rce_auto_save_max_age_ms', 10000)
  - create a new announcement, put some text in and
    wait 10 seconds
  - create a new assignment
    (jump to /courses/:id/assignments/new)
  > expect local storage to include the entry for
    the announcement's url is gone (you can do this
    with devtools)

  test exceeding storage quota
  - this is more easily tested in firefox
  - in FF go to about:config and search for
    dom.storage.default_quota
  - change the value to 1 (k)
  - create a new announcement and past almost-a-k's
    worth of text. this works:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Duis rhoncus erat nunc, ut euismod odio tristique volutpat.
Vivamus porttitor, nulla vel convallis ultrices, leo leo bibendum
ligula, at egestas augue velit eget est. Vivamus tincidunt,
metus non consectetur vulputate, ex neque sagittis neque,
aliquet luctus ex felis sed neque. Nullam vel feugiat tellus,
in sagittis lorem. Nullam facilisis turpis vel justo sollicitudin gravida.
Sed volutpat vel velit a lobortis. Donec vel condimentum massa.
Maecenas feugiat cursus condimentum. Nam iaculis ex vitae nibh interdum
pretium. Duis tincidunt diam sit amet fringilla finibus. Aenean magna
velit, accumsan eget scelerisque ut, mattis in erat.

  - w/o saving, create create a new assignment,
    (/courses/:id/assignments/new)
    add ^that lorem ipsum, and refresh
  > expect localStorage to have deleted the announcement's auto-saved text
    and saved the assignment's text

Change-Id: Ia5f8161cc28213d2361054ddad1b189a3bad06d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222311
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2020-01-24 17:30:21 +00:00
Jon Willesen db25c2ffc0 fix rce wheel scrolling in Safari
I have no idea why this fixes it.

fixes LA-212
flag=rce_enhancements

test plan:
- In Safari, create a long document in the RCE and save it.
- Go back to the edit view and try to scroll the RCE via the scroll
  wheel. It should scroll the RCE instead of the window.

Change-Id: Iba618a76dfd811238567fd232a571caeefb8fcce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223471
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: Carl Kibler <ckibler@instructure.com>
2020-01-22 05:29:25 +00:00
S. Jacob Powell e52fe12c36 Allow forcing a failure in each JS stage
This is a great canary for making sure we
report failures correctly,
when they happen.

test plan:
With the force-failure flag,
it should fail all JS stages
Otherwise, they pass like normal.
The flag sets the "FORCED_FAILURE"
environment variable to "true"
to fail the stages.

See
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Ftest-suites%2FJS/detail/JS/5269/pipeline
For an example of this flag being set.

fixes: CCI-188

flag = none

Change-Id: I32a51550d17140c6ed8c5423a31f98d7e71282bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223294
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-01-20 21:18:25 +00:00
Jenkins 36095e7966 [i18n] Update package translations
Change-Id: I322288199a8dd05a14febc329341856c8edbe787
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223763
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-18 04:49:47 +00:00
Jenkins 03fc0c0dfd [i18n] Update package translations
Change-Id: I92cfff59d3b5b80355fe14fed7fdd2ba0945bf64
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223588
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-17 04:49:57 +00:00
Ed Schiebel 9921eac4a8 Fix RCE file link issues
1. files uploaded via the rce are now recognized as previewable
   and get the preview icon after saved
2. files linked to from the tray are viewed w/in canvas Files
   page when clicked
3. images converted to links open w/in the canvas Files
   page when clicked
4. media still opens in a new tab with the viewer, but is not
   wrapped in the canvas Files page

closes LA-447
flag=rce_enhancements

test plan:
  - in the RCE
  - using Documents > Upload Document,
    upload a previewable file (e.g. .txt, .pdf)
  - using Documents > Course Documents, add a link
    to the same file
  - save
  > expect both links
    a) to have the preview icon next to the link
    b) clicking the preview icon loads the preview
       (note: since this is done via the google doc viewer,
       google won't be able to link back to your local canvas
       so the preview will be blank)
    c) clicking on each link should load the file in the canvas
       Files page in a new tab
  - repeat with images, but after adding to the RCE, use the
    Options tray to change display to a link, changing
    the alt text.
  > expect the link text to be the image's alt text
  > expect clicking on the links to open the image in the
    canvas Files page in a new tab

Change-Id: Ib182bf93a5a2a0b4450c52ab3833d69b3fa0e0fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222929
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-16 00:09:45 +00:00
Ed Schiebel b1fb7384fc Let media upload modal focus go to close button
We had shouldFocusOnRender=true on the Tabs

closes LA-448
flag=rce_enhancements

test plan:
  - on a page with the RCE, from the toolbar select
    Media > Upload/Record Media
  > expect the modal's close button to have focus

Change-Id: I455d1d6177cc6c5b8f0623335b93851b7be387a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223101
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-15 21:37:06 +00:00
Ed Schiebel 5e669610b3 Hide course links when user is a student
just like the images, media, and documents

closes LA-455

test plan:
  - create an assignment
  > expect the Links toolbar menu to contain
    External Links and Course Links
  - save and assign to a student
  - open the assignment as the student
  > expect the LInks toolbar menu to contain
    External Links only

Change-Id: If5910065dd8e399b27383f4e8683acfd97b12462
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223108
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-15 20:31:50 +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
Ed Schiebel e0782e3c45 Requery rce tray content when filter changes
When the CanvasContentTray's filter changed the contextType,
the query logic reuses the existing query result if one exists.
If the user switches context, changes sort, the switches context back,
the previous result in the incorrect sort order is displayed.

To reuse the existing query, we would have to track the sort params
per contextType, which would require it be in the redux store, which
would mean a lot of changes to actions, reducers and UI components
to track that. The effort (at this time) is not worth the reward and
we'll just requery the data if either the contextType or the sort
changes. The data should be in the browser's cache anyway.

The other change here is to delegate the logic for reexecuting the
initial query for the first page of results to the useIncrementalLoading
custom hook, removing it from each of the CanvasContentTray's panel
components.

closes LA-419
flag=rce_enhancements

test plan:
  - in a course that has some files, images, and media
  - for a user that has some files, images, and media
  - create a new Assignment or Announcement (to get an RCE)
  - from the toolbar, select Documents > Course Documents
  > expect the tray to open, displaying the course docs
    in descending order by date
  > expect there to be only 2 network queries for documents
    (one the method is OPTIONS, one GET)
  - switch sort to "Alphabetical"
  > expect the file to be displayed in alphabetical order
  - switch from Course Files to User Files
  > expect an alphabetical list of the user's files
  - switch sort to "Date Added"
  > expect the list to be displayed by date, descending
  - switch back to "Course Files"
  > expect the list of course files to also be displayed
    by date, descending

  - repeat for images and media

  - select Links > Course Links from the toolbar
  - expand any of the sub-sections (e.g. Pages, Assignments)
  > expect the  section to be populated

Change-Id: I592d5cec32f98d5a243386760a5a37f3e207d21c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222221
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-13 23:21:39 +00:00
Ed Schiebel 0c036549d2 close tinymce floating toolbar when the user does something
Converts all the actions taken by our plugins into
ExecCommand calls, and then we close the floating toolbar
on('ExecCommand'). This works, and I actually like the plugins
executing execCommand to do stuff.
We also close the floating toolbar on('blur'), so it closes if
the user moves focus away from the rce.

closes LA-167
flag=rce_enhancements

test plan:
  - enable "Assignment Enhancements - Student" in a course
  - create a Text Entry assignment in the course
  - navigate to the assignment as a student
  - click "Edit" to create the RCE
  - shrink your browser until the ... more button is in the toolbar
  - click it to open the floating toolbar
  - do anything in the rce
    - try the Images > User Images
    - try highlighting some text, then open the More toolbar,
      then click "B"
  > expect the floating toolbar to close
  - try opening the floating toolbar, then click somewhere else
    on the page
  > expect the toolbar to close
  - open the floating toolbar, then click on "Comments" tab
  > expect the toolbar to close
  - return to "Attempt 1" tab, open the editor and the toolbar
  - click "Cancel" or "Save"
  > expect the toolbar to close

Change-Id: Id588c0d744a1ef1301af1ac080c741c94de19937
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2020-01-13 23:21:21 +00:00
Jenkins fbb68eb73e [i18n] Update package translations
Change-Id: I6e0d6a730732c1792fdfc826128d8493869dc55d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222976
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-11 04:48:08 +00:00
Aaron Griffin 054598ec2f Improve RCE's CommonJS / ES6 output
1. Make sure the module package.json key points to the right place
2. Ensure lib and lib/modules paths properly compile how we say

Test Plan:
- Run `yarn build:all`
- Confirm output in lib and lib/modules differ
- Verify that output is correct

closes LA-433
flag=rce_enhancement

Change-Id: If3a46e2406ea28c2d549ef5b43a947385059ae57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222460
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jim Simon <jsimon@instructure.com>
QA-Review: Jim Simon <jsimon@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-10 19:15:11 +00:00
Jenkins d3d1ee6795 [i18n] Update package translations
Change-Id: I6ed56af7d42a3099716cb983a6b13fbbc90ef486
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-09 04:48:50 +00:00
Jenkins e8eee1c6d9 [i18n] Update package translations
Change-Id: I911cfb7bb631de9d54e8b43cd95e52777f8ed9a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222350
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-08 04:51:35 +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
Ben Nelson 3541e666f5 swap depreciated TabList for Tabs
swap out the old depreciated TabList for the newer
Tabs component in the canvas-planner package

TEST PLAN:
- have a student with Planner Opportunity notifications on their
    dashboard (such as missed assignments)
- switch to List View on the Canvas dashboard as a student
- click on the bell icon in the upper right
- verify that the New and Dismissed tabs work as expected

fixes KNO-201
flag=none

Change-Id: I5a99cc5d9adabc28df28b90a41a1cb11503b3683
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222099
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
2020-01-07 18:09:18 +00:00
Jenkins fe44ce200a [i18n] Update package translations
Change-Id: Ibab4bf380b9d050ecff1153bf3cd6b20fe21f4a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222175
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-07 04:47:14 +00:00
Ed Schiebel 4131b38b78 Implement sorting of rce tray content in images panel
requires the sorting of documents panel to be merged first

closes LA-111
flag=rce_enhancement

test plan:
  - have a course with some image files
  - create a new assignment or announcement (to get the rce)
  - from toolbar select Images > Course Images
  > expect the images to be sorted by
    created_at date in descending order
  - change sort by from Date Added to Name
  > expect the images to be listed by file name ascending

Change-Id: Ic29d901f614feb31faebc874d3715b0bff5e143e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221834
Tested-by: Lauren Williams <lcwilliams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-01-07 00:28:04 +00:00
Ed Schiebel c4ba2409d6 Implement sorting of rce tray content in media panel
requires the sorting of documents panel to be merged first

closes LA-111
flag=rce_enhancement

test plan:
  - have a course with come files
  - create a new assignment or announcement (to get the rce)
  - from toolbar select Media > Media Documents
  > expect the media files to be listed by
    created_at date in descending order
  - change sort by from Date Added to Name
  > expect the files to be listed by name ascending
  - switch to documents
  > expect the documents to be sorted by name ascendingw

Change-Id: If51a90507b97572f62dabbde8e692ddf7d13829e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221840
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2020-01-06 23:13:28 +00:00
Ed Schiebel 7e161af9d6 Implement sorting of rce tray content in documents panel
closes LA-111
flag=rce_enhancement

test plan:
  - have a course with come files
  - create a new assignment or announcement (to get the rce)
  - from toolbar select Documents > Course Documents
  > expect the non-image or media files to be listed by
    created_at date in descending order
  - change sort by from Date Added to Name
  > expect the files to be listed by name ascending

Change-Id: I0a16958aab544624548cc9d73881109f9259161a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221757
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
2020-01-06 23:12:07 +00:00
Clay Diffrient a033a077e4 Use new translation package for packages
This makes it so canvas-rce and canvas-planner are using
the new translations build rather than relying on their
own builds.  It also removes the package specific translations
from the individual directories to avoid confusion since they
are no longer used. It also removes some language packs that are no
longer used/supported for the packages.

Another important note is that another new package is introduced in
the form of
babel-preset-pretranslated-translations-package-format-message.  This
package is important because it allows the use of pretranslated builds
for canvas-rce without causing problems trying to read in non-existant
translations from the canvas-rce directory.  Also the new build.js
script inside of canvas-rce provides means to continue doing
pretranslated builds for canvas-rce while using
@instructure/translations.  While these aren't used anywhere currently,
it's a positive pattern going forward for other packages and this can be
used a template to move towards that pattern.

Test Plan:
  - Canvas builds appropriately
  - Translations of the canvas-planner and canvas-rce
    work as expected

closes USERS-45

flag = none

Change-Id: I1653bc7440aefc7299341b8cc2486843db320aee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220506
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
2020-01-03 20:34:46 +00:00
Jenkins d181f0786f [i18n] Update package translations
Change-Id: Ibb9e0a733c80fea2f7e90b0398e4f561e718320c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221854
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-01-02 04:47:55 +00:00
Jenkins 670ee456be [i18n] Update package translations
Change-Id: If5755e161b0526c6b231ccdc60384da8eecaf3b9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221808
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2019-12-25 04:47:08 +00:00
Jenkins 0e0dcafd4c [i18n] Update package translations
Change-Id: I83b2b02e1f748adb9170bf1ebc12642ad673539a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2019-12-24 04:47:01 +00:00
Jenkins eedcd56f99 [i18n] Update package translations
Change-Id: Ic0c54f1f07df75bb55c0bfecd2ab93b3e2524c6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221752
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2019-12-22 04:48:10 +00:00
Jenkins efd75c9156 [i18n] Update package translations
Change-Id: Ieb14f8d5ed6c4bfb07d51808dce0dee201153f6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221742
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2019-12-21 04:48:16 +00:00
Ed Schiebel 461e3f9a95 Push edits to the video title to canvas db
closes LA-242
flag=rce_enhancements

test plan:
  - insert a video into the rce
  - click on it and then the Options button
  - update the title in the video options tray
  - click Done
  > expect to see a PUT request sending the new title to
    canvas via the RCE
  - stop the RCS api and update the title again
  > expect to see a couple alerts telling you something went wrong
  - query the media_objects api at
    /api/v1/media_objects?exclude[]=sources&exclude[]=tracks
  > expect to see the video with it's updated title

Change-Id: Ic334866703a1e48ecd86c4f717ce736f419dd67e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-12-20 19:34:43 +00:00
Jenkins 697fc84917 [i18n] Update package translations
Change-Id: Ibfe436931ba48e676cd010d85a03f8ecb4a55622
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221567
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2019-12-20 04:46:56 +00:00
Jon Willesen dbf8b3238d insert file link into rce when a file is selected
refs LA-164
flag=rce_enhancements

Note that this always inserts a link, even if you select some embeddable
file type. If you actually want to embed, use one of the other content
type options from the dropdown.

test plan:
- Enable the new rce and edit some content
- Open the add tray
- Select "All"
- Click on a file and see a link to the file inserted into the rce
- Save the content and click on the inserted link. The browser should
  download the file.

Change-Id: I5d8af78e43791fb1d41b1eb7b3ec442ebfe7e0f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221338
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-12-19 22:40:47 +00:00
Ed Schiebel 141c9e0ad3 Add support for replacing rce video with its link
closes LA-273
flag=rce_enhancements

test plan:
  - in the rce, embed a video
  - click on the video, then the Options button
  - in the tray, change the DisplayOption to "Display Text Link"
  - change the video's title (do this after selecting "display text
    link" to be sure the title box isn't disabled.)
  - click "Done"
  > expect the video to be replaced with a link to the video player
  > expect the visible text to be the video's title
  - right click in the link and select "open in a new tab"
  > expect the video in the new tab

Change-Id: I4d478e0b55a8a083bfdb90dd1a937b2604f847a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220946
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-12-19 20:35:40 +00:00
Ed Schiebel 1af26d4d06 List media objects in RCE's CanvasContentTray
closes LA-113
flag=rce_enhancements

test plan:
  - have a user  upload a video from their Files page
  - have a user upload a video from a course's Files page
  - open a page with the RCE
  - upload a video via the RCE
  - select Media > Course Media from the toolbar
  > expect the videos uploaded to the course's Files and via the RCE
  - click on one
  > expect it to be embedded in the RCE
  - select Media > My Media
  > expect the videos uploaded to the user's Files page
  - click on it
  > expect it to be embedded in the RCE

  - same should work for audio

Change-Id: I7878963f0e2f6e18cf04eb52a8a5d78d467d86a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218722
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-12-19 20:35:26 +00:00
Clay Diffrient 9d59bccd2e Change "My *" to "User *" in canvas-rce
This makes it so everything is User Files
rather than My Files, and so forth for all the various
options.

Test Plan:
  - Go to the RCE
  - You should not see "My" describing any of the User options

closes LA-353

flag = rce_enhancements

Change-Id: Icc6efdfcfa388c3b3795c037cbe45bd95dd9a614
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221292
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-12-19 15:42:06 +00:00
Ed Schiebel 7a112cf835 Fetch subsequent pages of images
closes LA-284
flag=none

test plan:
  - to make this easier, in canvas-rce-api/app/api/wrapCanvas.js,
    change DEFAULT_CANVAS_PER_PAGE_ARG=5 (from 50) and restart
    canvas-rce-api
  - with a user that has many images, open a page with the rce
  - choose Images > [Course|My] Images
  > expect a page of images and a load more button
  - click "Load More"
  > expect new and different images to get loaded

Change-Id: I2196085ec6f840a3f8561a3a5097792b4d747996
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221251
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2019-12-18 23:47:14 +00:00
Jon Willesen 92adeea1aa add file browser to RCE add tray
refs LA-164
flag=rce_enhancements

The tree doesn't do anything yet when you select a file except log to
the console.

This imports stuff from Canvas because it already exists there and we
don't have time right now to refactor it and create a new package.

It is also talking directly to Canvas instead of the RCS because that's
what the existing component does.

test plan:
- enable the new rce
- open the add tray
- select "All" for the content type
- see that you can browse the course's files and the user's files

Change-Id: Ia340cc730b39f5e29a782e8676436e83d1cebcf1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220979
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2019-12-18 21:14:10 +00:00
Derek Bender 5da8b40278 Spec: Reduce deprecated logging
Closes: CCI-138

Test plan:
- javascript test logs are significantly smaller!

Change-Id: I4e30489ef3215ed6c192aa1c7fbdf1afe00229df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220931
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
2019-12-17 18:24:00 +00:00