better for static analysis of the frontend
also helps gives visibility to what we need to move to
ui/boot/initializers/router.tsx
test plan:
- tests pass
flag=none
Change-Id: I8ff04a7449293abcb54379ce4d5a51fcbe312ae3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335975
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Josh Wilson <josh.wilson@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: James Butters <jbutters@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>
Override the moment locale files, setting LLL = YYYY年M月D日 HH,mm for
Japanese and lll to YYYY年 M月D日 H:mm for Chinese. This generates valid
formats for the dates provided by tz() when using the
date.formats.full format in these languages.
closes LF-945
flag= none
Test plan:
- Create a course, and set the language to Simplified Chinese(简体中文)
- For the course start or end date, using the date picker, set a date
within the first nine months of the year of 24, e.g., January 5, 2024
- After selecting the date, click outside the input
- Expect the date to be taken as valid.
- Repeat the process using the Japanese language(日本語)
Change-Id: I925ff078c8ea307a744701665c26534451d4aa73
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331836
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
test plan:
- Ensure that Account Grading Settings tabs still work
- Ensure that "Act as..." page still works
- Ensure that group dropdown in Student Groups pages still renders
flag=none
Change-Id: If04a5faab051fab7301f0550637fd9ae489b58e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328746
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
this resolves some chunk errors in dev
test plan:
- build passes
flag=none
Change-Id: I61dcc44b214374d5f2ec43c790c1244fdb7eacbc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327912
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
also: reduced need for specialized babel config
test plan:
- existing tests pass
flag=none
Change-Id: I2625830f01b2d65da0dad02e740f458dfb96863a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323643
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: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
also: use separate .d.ts declaration files in
defer-promise and html-escape
test plan:
- existing tests pass
flag=none
Change-Id: Idd4d2b7b3fc2f0f1e8a10d6a456ba7b7b1442758
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323760
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
closes LF-311
flag = none
Test plan:
- Enable "Assignment Enhancements - Student" flag on a course
- Enable "Microsoft Immersive Reader" flag on the course's account
- As a student, go to an assignment in the course
- Expect to still see the Immersive Reader button at the top
- As a teacher, go to the assignment show page
- Expect to still see the Immersive Reader button at the top
Change-Id: I2a0ad0a676b1b1f02d3c220b5c4d00c5c44dc7fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318778
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>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
closes EVAL-3137, adding an entry point for
react router that mounts to the 'content' div.
Allows for client side routing and eliminates
the need to make a new controller and .erb for
each rails route that uses react router.
Currently constrained to course and account
context, but could be extended to groups,
sections, etc if desired in the future.
flag = none
Test plan:
- n/a. No routes currently use this controller, so it
is not accessable from the UI
Change-Id: I7a6e7855578fb6c6d55c9c2e828f82c90cec4d0e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318670
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
refs VICE-3523
flag=restrict_quantitative_data
NOTE:
You will need to run:
bundle exec rails canvas:compile_assets
Otherwise you will get a build error that
will prevent you from compiling webpack
Test Plan:
- as a teacher create 2 assignments with due dates in the past
- as a student submit 1 assignment
- as a student go to the course grades page
- should see one assignment with a status of late
- should see one assignment with a status of missing
- as a teacher grade both assignments
- as a student open network inspector
- as a student on the grades page, you should see unread badges
- mouse over the rows with unread badges
- unread badges should disappear
Change-Id: If7fa262f2d9295c685fd3dad8e0917cc8ccb1783
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318325
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
Refs FOO-3190
flag=none
Trying to uprev InstUI to version 8 revealed that our
front-end build config needs a little attention first.
Most of this was stuff that's been "wrong" for a while
but this major version upgrade of a major dependency
really uncovered where some things needed to be tweaked.
Test plan:
* This only touches build toolchain stuff, so...
* If the automated build passes, this should be good
Change-Id: I89bd29a581a8c84b7f82d319a0501a4adf59016e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
this removes annoyances when decaffeinating files
test plan:
- all tests pass
flag=none
Change-Id: Ie3af0faf13d64a4701bb917fbcae29cb10474df1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315484
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Because DefaultUrlMixin.js has trouble importing str-pluralize
in some cases
Test plan:
- Test pass
flag=none
Change-Id: If93f7915b0d6b8793aa21125d00fb0a90fa83d65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314885
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
closes MAT-1175
flag=none
test plan:
- Navigate to a course.
- Change its title to add some inline math.
- Save it.
> Verify that the course title was updated
using Mathjax.
test plan 2:
- Navigate to a RCE instance.
- Open equation editor.
- Enable "Directly Edit LaTeX"
- Add some inline math.
> Verify that the preview was correctly
generated with Mathjax.
test plan 3:
> Verify that you can still edit a module's
title adding inline math.
> Verify that you can still edit syllabus
page content adding inline math.
> Verify that you can still create or edit
a discussion reply with some inline math.
Change-Id: Icfe60adb90f1e03e1aee72d1e60b8e2a2eb7dfd8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311688
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>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
Major overhaul of the External Tools portion of the RCE:
- Incorporates needed functionality previously in canvas common
- Moved all code into packages/canvas-rce
- Refactored, cleaned up, and clarified
- Converted all code into TypeScript
Refs MAT-1082
flag=rce_new_external_tool_dialog_in_canvas
test plan:
- Testing of LTI 1.3 must be done in Firefox, unless you have
https configured locally.
- Install LTI test tools
- LTI 1.3 test tool from gerrit:lti-1.3-test-tool
- LTI 1.1 test tool from
- https://github.com/Yona-Appletree/lti_1p1_test_tool
- Create a config with the "Editor Button" placement enabled
- Spot check original external_tools plugin by disabling flag
- Disable rce_new_external_tool_dialog_in_canvas
- Test LTI 1.1 and LTI 1.3 resource item selection and embedding
- Re-enable flag
- Then test LTI 1.1 and LTI 1.3 resource selection
- Links, Resource Links, Images
- In Canvas
- In New Quizzes
- Test embedded frames, both in canvas and quizzes
- LTI 1.1 iframe content items
- Select 'Return 1.1 test link item (iframe)'
- LTI 1.3 iframe items
- Content Item Type: "LTI Resource Link"
- iframe (JSON): {}
The content doesn't matter, so long as it's an object.
- Note: refreshing the page will prevent this from working
until QUIZ-10579 is completed.
- Ensure the frames load:
- in the RCE
- in the page after saving
- in the RCE after editing
- in the page after saving
Change-Id: I9a6b716ba2af29348d82522f4e81bab2140a6cab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308732
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Uses the webpack-retry-chunk-load-plugin module
Test plan:
- Use the chunk URL feature in devtools to block a chunk
- Reload the page
- Unblock the chunk URL before webpack stops trying to reload it
Refs EVAL-2053
flag=none
Change-Id: I7bbc0374183f300c8ce96a258cef48c56c594f06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311956
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
adds a plugin menu item that launches our own custom
modal (that looks identical to tiny's wc modal), and
simply subtract the counts of mentions dropdown content
(if present)
fixes MAT-783
flag=react_discussions_post
test plan:
-enable the feature flag, flush redis cache if needed
-navigate to discussions (you should see new redesigned
discussions now)
>type some content in the RCE, make sure the word count
in the status bar is updating appropriately
>go to the menu -> tools -> word count, observe the
numbers match your expectations for the content you
entered
-go back to the actual editor and start a mention by
typing '@'
>notice the word count is not affected by the contents
of the mentions menu
>launch the modal through tools menu again, confirm the
numbers here again are unaffected by the mention menu
Change-Id: I73ca2ab2bbba795243d36d25456ff748b5d1ae9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304424
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Joe Hernandez <joe.hernandez@instructure.com>
QA-Review: Joe Hernandez <joe.hernandez@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Refs FOO-3200
flag=none
Only a couple of little things in packages/ were in
CoffeeScript, both were extensions to Backbone.js.
Also had to decaf ui/features/roster along with this
because it ran into the CoffeeScript-to-JavaScript
class inheritance issue.
Test plan:
* automated tests pass
Change-Id: Ice445776b2e5e04349317aab54c154b66f22e935
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304981
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Webpack was unnecessarily requiring files in webpack_spec_index.js
Serving public/dist/brandable_css/**/*.css in Karma is also
unnecessary
This cuts down error noise in the console when running Karma tests
This also fixes use of globs in the command line, e.g.
yarn run jspec-watch ./spec/javascripts/jsx/gradebook/**Spec.js
Test plan:
- All JS tests pass
flag=none
Change-Id: I82b152bdc70fd77e260ffc27254211b1d0a8bbf5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/303069
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>