Remove fonts that are not self-hosted or websafe to ensure that
everyone sees content the way it was intended. This only affects
font selection in the RCE and will not change existing user content.
flag = none
closes LF-1201
Test plan:
- Go to the RCE and expect to only see the listed fonts in the
menu bar (Format > Fonts)
Change-Id: I6e308ea45ff2cc7e01fe90c00015b2e9218c9c72
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339763
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
fixes LF-1016
flag=none
Test plan
- Ensure you have new quizzes working properly
with RCE
- Inside a new quiz RCE, link an image, media,
doc and any other kind of file from a course
- Ensure the HTMl for the link DOES NOT
have the file verifier added to the link
- Ensure user files do have the verifier still
- Locally Chrome will not be able to show
the files properly unless you are running
Canvas (and probably Quizzes) with https
- The workaround is to use another browser
like Firefox or Safari
Change-Id: I1ff38ffdee048ed3257e3fa3d4c977659b54841c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338767
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
This commit removes the remaining lines of jQuery from mathml.js
refs FOO-4220
test plan: tests pass
Change-Id: I9c66b1b250439ab73915878e065741997252a182
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338937
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit fixes test failurs for returns true if there is mathml.
When using jQuery 1.8, these tests failed. There was some sort of change
to how the DOM was being handled in the test environment (jsdom
incompatibility maybe?). Rather than fight jQuery, the more appropriate
long-term solution was to remove jQuery from mathml.js.
Note that I had to add `no-extraneous-dependencies` as the linter
was not allowing me to make this commit, giving this error message:
'jquery' should be listed in the project's dependencies. Run
'npm i -S jquery' to add it import/no-extraneous-dependencies
In my next commit, I plan on stripping jQuery completely.
refs FOO-4220
test plan: tests pass
[skip-crystalball]
Change-Id: If4ab24e3e15b38590772c75e4be65843e8920b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338920
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Remove the forwarder shim between externalContentReady postMessages and
the jquery event and have everything use the postMessage directly, for
simplicity and consistency.
closes INTEROP-7887
flag: n/a
Test plan:
- create an LTI 1.1 tool with the following placements supporting
Content-Item, and test sending back content:
- collaborations: /courses/1/collaborations
- other (new?) collaborations UI: same placement, but UI is at
/courses/1/lti_collaborations
- assignment_selection: I shouldn't have affected this but it's
good and easy to test. The tool needs the explicit
assignment_selection placement with
message_type=ContentItemSelectionRequest. In the New Assignment
page, choose "External Tool" for submission type, launch the tool,
return content, and make sure the second popup closes.
- assignment_index_menu placement: on the assignments page, the kebab
menu in the upper right to the right of the assignment button (not
that course_assignments_menu placements also appear here but they
cannot use Content-Item). After the tool sends back content, the
page should reload. Note: it doesn't seem like this placement
actually did anything with the content before my commit either.
- module_index_menu_modal: this placement doesn't support ContentItem.
click the "Redirect to launch presentation return URL" button and the
modal should close.
- module_menu_modal, file_index_menu, or discussion_topic_index_menu.
I tested menu_index_menu (also doesn't support ContentItem; doesn't
seem to even launch for me in prod but works locally).
- you can test cancelling in a tray or modal by going to a tool and setting
location.href = "https://web.canvas-lms.docker/external_content/cancel/external_tool_dialog"
but I haven't found a place where this actually works before my
changes.
Change-Id: I90683e5e3872d5d1bc1f0a9e515b57741b738271
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336794
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
one exception: I added jsdom condition on line 6954
this enables us to move forward more easily with jquery upgrades
test plan:
- build passes
refs FOO-3741
Change-Id: I40bce735119d81ab9bd53ef40134f6fee493cfc7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337415
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
why:
* using display=in_rce instead of borderless allows inline/iframed
LTI launches inside an active RCE to work and use postMessages
* this was mistakenly also using in_rce with link-type
LTI launches, which open in a new tab
* which meant that the new tab never replaced the iframe
with the tool entirely, so there was still a canvas wrapper
* continue using display=borderless with links that open
an LTI tool in a new tab
closes INTEROP-8379
refs INTEROP-8205
flag=none
test plan:
* in a docker container:
```
cd packages/canvas-rce
yarn build:watch
```
* you can also restart your webpack container to make sure the changes
are picked up
* install the lti 1.3 test tool or 1.1 test tool with the editor_button
placement
* launch the tool from a page that has the RCE, like a new wiki page
* pass back a content item with no iframe attribute so that it makes
a link
* change to the HTML editor - the <a> tag should have
display=borderless
* save the page, and hover over the link
* it should include display=borderless, not display=in_rce
* click on the link
* it should open in a new tab, and the URL in the address bar
should eventually be for the tool, not canvas
Change-Id: I49a7d99cc21d77540f9ea9023f4d371ad509a104
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335741
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes LF-1099
flag=none
test plan:
-find an RCE, toggle to the html editor
-insert a source tag with width + height attributes
-toggle to normal editor and back to html editor
>confirm the width/height attributes weren't stripped
-save the page
-re-edit your content again
>confirm the width/height weren't stripped by the server
Change-Id: Iffc814b1a12479971ed00bda98b776a5c3a5b6de
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
flag=none
closes LF-1089
Test Plan:
- Have files in course/user with really long names
- Go to an RCE (ex Pages)
- Go to one of the course/user images/media/documents traya
- Change category to "All"
- Expand until files are shown
- Hover over files
* Verify hover shows full file name
Change-Id: I3eab059e7b56e35129e9d9e02ac30baf13f0c8ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335090
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
Also:
- Remove some unnecessary use of @instructure/ui-themeable
- Remove use of TsMigrationAny
- Remove some instui-related module declarations
(no longer needed)
- Remove old upgrade-instructure-ui script
- Upgrade typescript and babel-plugin-typescript-to-proptypes in RCE
Test plan:
- Build passes
flag=none
Change-Id: I734183ed8bdf68422e4eb46285909c30bc31ee33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334667
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
when choosing a video from All Files in an
RCE, the url has ?type=video?type=video, which
is incorrect
closes LF-66
flag=none
test plan:
- in an RCE, add media by clicking on the media icon,
and then switching the file type from Media to 'All'
in the dropdown
- after adding the media, switch to the html editor and
notice the src should only have ?type=video once
- ensure the rest of the iframe looks the same
- ensure adding media from course media and user media
also still results in the correct src
Change-Id: Ibaebfc4520320ce1904823bd296f9c4ff8fcbb5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333420
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
closes LF-804
flag=none
Test Plan:
- Add Video to a New Quiz
- Add captions
- Refresh the New Quiz
- Open Video tray
* Verify captions appear
- Repeat with Audio
Change-Id: I1a3f0df0bfcaec7b3f456d7dcfea78017ab1a549
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334124
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
closes LF-709
flag=none
test plan:
- use the flags to skip parts of the script that don't need
testing, such as SKIP_NPM_PUBLISH
- run the script, ensure that the 'Verifying NPM install...'
works as expected, installing the package and reporting
if it succeeds or not
Change-Id: Ie0fb0e5d82f27426a99044acde64d774b9837d1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
Closes FOO-4017
flag=none
Several bug fixes, plus this has the requested changes
from InstUI for the new look and feel for the side and
top navigation bars.
Test plan:
* automated tests pass
Change-Id: I5292256e4e479c70837cc77b10b97dfaba235848
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333822
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
This fixes post-merge build failures.
New TypeScript version picked up on some naughty
assignments in a test file. But since it's a test
file we can ignore it
flag=none
Change-Id: Iacbae1a289f77f7eb14e1b176530f9469e89778f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333535
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes LF-968
flag = none
Test plan: jenkins passes
Change-Id: I2c64d49a5a82b455ef6b0793d0fee23edc6aa2a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333284
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Removes global use of jest-fetch-mock, which inhibits
migration to vitest.
Also:
- TypeScriptify Confetti
- more properly tests confetti with testing-library
- removes needless setTimeout on confetti SR-only flashAlert
Test plan
- Submit assignment as student
- Confetti should still show
flag=none
Change-Id: I70fdc23dbc6d18a37487abeaa7625c441cc64d77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333193
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes LF-954
flag=none
test plan:
- create a classic quiz
- go to the questions tab and create a new
question
- the html element display in the bottom status bar
should be left justified
- switch to the html editor
- the "Switch to raw HTML Editor" button should be left
justified
- ensure that rces in other places still look the same
Change-Id: Ib819fd229df4b9e1bda2b9b4ad8bdfe44c086a9c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332801
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
test plan:
- smoke test badges on old and new nav
- smoke test profile tray on old and new nav
flag=instui_nav
Refs FOO-3880
Refs FOO-3887
Refs FOO-3894
Refs FOO-3895
Change-Id: I1d3a669aee09dc67b04e798a23e016d26f398fd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331758
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Gustavo Bernardes <gustavo.bernardes@instructure.com>
fixes LF-887
flag=media_links_use_attachment_id
Test plan
- In a Blueprint parent course, upload
a media file and lock the file for editing
in the children courses
- Link a child course and sync the content
from the parent
- Link the video in the RCE in the child course
- Click on the video in the editor and go to
Video Options
- Verify that an API response to the RCS at
api/files/:fileId was sent
- For best results, test with g/330028 and
g/330353 (which will actually provide the
required API field)
Change-Id: Ib0f734ba45842c6320804c4d46516ab8b1a76304
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330025
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Closes FOO-3955
Refs EVAL-3613
Closes FOO-3820
Refs FOO-3947
flag=none
There's mount/unmount bug in <Tray> that was causing
some heartburn, this fixes that.
This InstUI fix exposed some broken tests which were
checking for a Tray to no longer be open; because a
tray closing is a transition, it's necessary to wait
for it to close in an asynchronous test... checking
for that immediately cannot be expected to work due
to the transition, but was accidentally working in
some cases.
Two entire Selenium specs became very flaky as a
result of this version bump; they were just skipped
for now since they're rather complex and it wasn't
obvious how to fix them. The EVAL ticket was created
so that that issue could be addressed later.
test plan:
* automated tests pass
Change-Id: I81374d0c8e783a7b0285c2cf9506153e2194fceb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330333
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
I think this may be due to instui8 being fully typescript,
though I don't understand why it would affect native react
prop type validations. This commit eliminates the new
prop warning console error messages.
The real solution to this is to convert CanvasConentTray
and all the related components to typescript, but that
is way beyond the scope of this ticket.
closes LF-786
flag=none
test plan:
- in a dev environment (so you get react console messages)
- open a page with the rce
- open dev tools
- in the RCE, open the CanvasContentTray
(e.g. Documents -> Course Documents)
> expect the tray to open w/o bad prop error messages in
the devtools console
- repeat for images and media
Change-Id: I3d211eaade0f4a27fde446dfeafc27edcfb4558e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328124
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LF-919
flag=none
test plan:
- open a page with an RCE
- tab to or click in the RCE's content area
> expect a focus ring in your theme's primary color
- put the user in high-contrast mode
- repeat the above
> expect the high contrast theme's dark blue focus ring
Change-Id: I33710b9f02c1e1d1ca7274a69d8f008cb287371e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330578
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
This appears to only be useful for file links. It's currently
being added to all course links inserted in the RCE. This
patch removes that behavior.
refs LF-844
flag=none
test plan:
-navigate to an RCE
-insert course links
-switch to the HTML editor
>confirm they don't have a wrap parameter
-add some file links
>confirm they still have a wrap parameter
Change-Id: Ic5ffe53e5d38c9a2384398211eb1dab876b4548f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330248
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
We need more work to integrate the newer SourceCodeEditor.
Let's not do that with the clock ticking toward deployment.
closes LF-781
flag=none
test plan:
- the RCE's pretty html editor works as expected
- try flipping between wysiwyg and html
- try flipping between pretty and plain html editor
- try various combinations of fullscreen and switching
back and forth between editors
- insert enough html that you have to scroll, switch
to html editor. expect the html editor to resize
so that its scrollbar is correct.
Change-Id: Ieb0ad96ad2bb549676f7f9199d1231ece02b5aae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330095
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
which is primarily the instui 8 update
closes nothing
flag=none
test plan: n/a
Change-Id: I003e667a44230b33923309e6cd50524d0f079041
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329978
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
flag = none
closes LF-775
Test plan (regression testing the feature):
- Open an RCE
- Create a course link to a page/assignment/etc
- Click "Edit link"
- Expect to see the edit course link tray
- Switch the link and hit save
- Expect the link to be updated
Change-Id: I8481fb2a7a461849ee39114e514dd44c12d94ad4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329843
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
closes LF-776
flag = none
Test plan (regression test the feature):
- Open the course link tray in an RCE
- Expand a category that doesn't have any items (like no assignments)
- Expect to see messaging about creating a first assignment
Change-Id: I3752ec06991f60960083dec3cb64bc20a9e1f03b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329833
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>