Commit Graph

1558 Commits

Author SHA1 Message Date
Jenkins f67e64f719 [i18n] Update RCE translations.
Change-Id: I1026c42022e2c86edab4c730c6009b246b7768d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340091
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-09 04:51:07 +00:00
Jackson Howe 438b4bfefd Remove fonts that are not websafe from RCE
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>
2024-02-07 16:45:13 +00:00
Robin Kuss f3ef49ea0e update canvas-rce package for publishing
Change-Id: Iefb731183a93a2cc7c24e7f5ad27cda6b683881d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339366
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2024-01-31 17:43:18 +00:00
Aaron Shafovaloff 863eed6c6f move RCE's makeAllExternalLinksExternalLinks
Change-Id: I4471750caf9f13220471f3a5af7f983eaf5c3b08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339255
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-30 18:50:53 +00:00
Aaron Shafovaloff 85afff9a97 remove doc-previews package
closes CFA-50

Change-Id: I548a72737071cb0988b7e9a9cac2044bfd750c8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339231
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-30 18:06:54 +00:00
Aaron Shafovaloff c39706be9f Remove CommonJS build of RCE
Change-Id: I19381a5eae89ac0908b0a956ede4477aacc62985
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339248
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-30 18:06:41 +00:00
Mysti Lilla 0b5906d7fe Stop adding verifiers to files in new Quizzes
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>
2024-01-30 17:45:30 +00:00
Aaron Shafovaloff 93a345c527 reduce over-fetching of RCE code in common page loads
refs CFA-50

Change-Id: Ibcbf894ca755c2314a4a730eea1ac29e2a24f437
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339217
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-30 15:41:14 +00:00
Aaron Shafovaloff 8f33f8d3cf Remove babel-plugin-themeable-styles
test plan:
  - ensure that mathlive equation editor still works

closes LF-1173
closes CFA-39

Change-Id: Ic1d5b1288b17ecfa1385801885b6580208c7591e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335262
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-30 15:01:11 +00:00
Michael Hulse 164c22b390 remove remaining jquery from from mathml.js
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>
2024-01-27 05:25:26 +00:00
Michael Hulse cf7e12903c spec: fix isMathInElement jest test
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>
2024-01-27 01:31:04 +00:00
Evan Battaglia f262c7cf58 externalContentReady $.trigger() -> postMessage
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>
2024-01-23 17:00:05 +00:00
Aaron Shafovaloff 5e80298edf use unforked jquery 1.7.2
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>
2024-01-12 14:14:23 +00:00
Aaron Shafovaloff f2077e6639 upgrade fetch-mock
flag=none

closes CFA-36

Change-Id: I472d3474e743ca8867ea3434154aa598293f1db1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336880
Reviewed-by: Paul Gray <paul.gray@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>
2024-01-08 17:41:28 +00:00
Aaron Shafovaloff b535a55f52 include minimatch in main package.json
Change-Id: I3661ac887967c3d6a4b13ba93262f79c9bb1f2cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336040
Reviewed-by: Michael Hulse <michael.hulse@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>
2023-12-30 00:49:42 +00:00
Aaron Shafovaloff e02388380c upgrade redux-thunk
flag=none

closes CFA-30

Change-Id: Ibdca0a4d89e2b82859dfc551227bbfe53bad0131
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335971
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-26 15:01:32 +00:00
Xander Moffatt d5e6c6f2fb only use display=in_rce with inline LTI launches
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>
2023-12-21 16:29:40 +00:00
jake.oeding 90134300d2 allow width/height on source tags
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>
2023-12-20 14:58:28 +00:00
Jacob DeWar 734eac9161 Show full file name on hover in RCE All Files tray
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>
2023-12-12 15:19:03 +00:00
Aaron Shafovaloff caf0320bcc Revert "Upgrade prettier"
This reverts commit 2923619f64.

Change-Id: I73be26acb7c5288293a8027bf1289b8014988935
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334698
Reviewed-by: Michael Hulse <michael.hulse@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>
2023-12-12 02:04:14 +00:00
Aaron Shafovaloff dd3b94f910 remove scroll-into-view
scrollIntoView is supported by all our browsers now

test plan:
  - verify contentInsertion behavior

flag=none

Change-Id: I9d356ee0ec7071d0c1922f10171df67345b4947b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334981
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-12-12 00:17:51 +00:00
Aaron Shafovaloff 1abaa6fb1b Correct and add some folder owners
flag=none

Change-Id: I3d4ba200bac6b9efc73e8bc54c79b6ba1c9b221e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334903
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-12-11 17:23:30 +00:00
Aaron Shafovaloff 2923619f64 Upgrade prettier
Change-Id: I214d1bf39552395013ad01fc4cbf04ab9cb57940
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335005
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-11 17:22:48 +00:00
Aaron Shafovaloff 7575ffb3ec Upgrade moment
Change-Id: Iafdd31a8c02a5918c6b68c234df661ed90d24032
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335007
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-11 17:22:24 +00:00
Aaron Shafovaloff 942b7755df upgrade babel-loader
Change-Id: I1520db81e141135c42799ee895d1de01ad0f9ce8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335006
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-11 17:22:14 +00:00
Aaron Shafovaloff ecceff10e3 Remove use of InferType
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>
2023-12-07 18:39:51 +00:00
Sarah Gerard d7da0c1dff Fix double ?type=* for video from all files
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>
2023-12-06 23:18:23 +00:00
Jacob DeWar 92353a1edf Show Media Captions in New Quizzes
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>
2023-12-06 19:40:53 +00:00
Sarah Gerard 1cd1466252 Npm install verification step for RCE publish script
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>
2023-12-05 22:16:10 +00:00
Charley Kline 5df235929f Bump InstUI to 8.49 for new nav bar stuff
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>
2023-11-29 03:56:33 +00:00
Aaron Shafovaloff 5cc6ee20ea Add @ts-nocheck to a RCE test
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>
2023-11-22 15:42:22 +00:00
Jackson Howe 2bad036fa4 Unskip TrayController spec
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>
2023-11-21 16:44:05 +00:00
Jenkins a1829c662a [i18n] Update RCE translations.
Change-Id: I738b64818e444142537a77cca7db3e7f85551b66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-21 04:52:05 +00:00
Aaron Shafovaloff abd4f77040 Localize jest-fetch-mock usage
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>
2023-11-20 17:42:32 +00:00
Jenkins 411edbe0df [i18n] Update RCE translations.
Change-Id: I94452b48c5966c21d652cdf6154daa2620eb4fc8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333196
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-18 04:52:29 +00:00
Sarah Gerard b915103388 Left justify the html element display
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>
2023-11-14 19:11:10 +00:00
Jenkins 248c7baa6e [i18n] Update RCE translations.
Change-Id: Icecdd1d905e27c94945cefb155c28b48f5e07e69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332768
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-14 04:51:34 +00:00
Jenkins 003d396aa4 [i18n] Update RCE translations.
Change-Id: I68c7777cf55f4792319b5076397d714a025b4631
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332602
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-10 18:50:13 +00:00
Jenkins 18add0099c [i18n] Update RCE translations.
Change-Id: Ib5803c3a72abf70ec55bf91a56805ea4dc76fd9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332352
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-08 04:51:54 +00:00
Aaron Shafovaloff f7ba7f9a6a Use useQuery in ProfileTray; NavigationBadges
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>
2023-11-01 15:32:38 +00:00
Mysti Lilla c9383c7ce1 Make API call to get attachment info
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>
2023-10-24 16:31:38 +00:00
Charley Kline e587ca6596 Bump InstUI to 8.46.1 for ui-tray bugfix
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>
2023-10-19 18:32:15 +00:00
Ed Schiebel c2caf68c26 Fix rce react property validation errors
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>
2023-10-18 00:24:54 +00:00
Ed Schiebel 7a53808458 Fix missing RCE content area focus ring
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>
2023-10-17 18:24:44 +00:00
jake.oeding ab963aba07 stop adding wrap param to course links in RCE
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>
2023-10-12 21:41:24 +00:00
Jackson Howe bdcab32a0e Remove filterUselessConsoleMessages from canvas-rce (again)
This was done in 28a635561d, but the
dependency got inadvertantly restored.

refs LF-704
flag = none

Test plan: specs pass

Change-Id: I69ad77c3feef83cc16e9e7061ab80b189b09e92d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330245
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-10-12 18:26:14 +00:00
Ed Schiebel 0f31ee66dc Revert RceHtmlEditor to INSTUI's CodeEditor
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>
2023-10-11 18:29:17 +00:00
Ed Schiebel b6d48c24bf Publish RCE v 5.11.0
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>
2023-10-10 21:03:19 +00:00
Jackson Howe 054ad9d0ef Remove rce_ux_improvements flag
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>
2023-10-10 20:36:37 +00:00
Jackson Howe d323747490 Remove improved_no_results_messaging flag
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>
2023-10-10 20:14:12 +00:00