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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>