Commit Graph

733 Commits

Author SHA1 Message Date
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