Commit Graph

81 Commits

Author SHA1 Message Date
Aaron Shafovaloff 81b9e57bfe use static list of feature bundles
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>
2024-01-02 21:36:09 +00:00
Aaron Shafovaloff 4d1430af13 correct d3 imports
Change-Id: I9224577e986ff052ecc9137fdd4fe0d3452dab0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335962
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>
Build-Review: James Butters <jbutters@instructure.com>
2023-12-26 19:30:21 +00:00
Aaron Shafovaloff 26f4dabb03 correct direct-sharing imports
Change-Id: I9114421eec5fbd230c15361c2629beaddeef0bbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-24 00:34:49 +00:00
Aaron Shafovaloff 665281ef74 reduce use of babel
Change-Id: I6f928635f6f6e0b084d18c878bb02cdc1a2e404f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335930
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-24 00:34:28 +00:00
Aaron Shafovaloff 501cde202c move datetime-moment-parser
Change-Id: I6fde4cb5ebb0e4b9c51f94e9bf073e83623d307c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-24 00:33:06 +00:00
Aaron Shafovaloff f73b214066 remove unused canvas-planner artifacts
Change-Id: Ie3fa23641aa57160ec57e03d4b71d8af30fac616
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335931
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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>
2023-12-23 17:50:35 +00:00
Aaron Shafovaloff ddc4465585 move datetime into ui/shared
Change-Id: I141da8bb5a8b1b2e52cce821466c3b8265782d72
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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>
2023-12-23 17:50:24 +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
Aaron Shafovaloff e1384057d1 Install Vitest
This does not yet change our build process

Demo:
  - yarn run test:vitest:watch ui/features/theme_editor/

Test plan:
  - build passes

Closes CFA-17

flag=none

Change-Id: I6eac4684af62525829e36f5dd0c64bb80c638ca3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Ochoa <martin.ochoa@instructure.com>
Reviewed-by: Gustavo Bernardes <gustavo.bernardes@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-11-17 14:19:22 +00:00
jonathan 9015212f76 Fix Japanese and Chinese date selection.
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>
2023-11-03 18:01:22 +00:00
Aaron Shafovaloff 370b61f08a Don't run RetryChunkLoadPlugin in dev
flag=none

test plan:
  build passes

Change-Id: I8194e950acd6fda44c1b1f9d086ab2ba34307911
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330977
Reviewed-by: Gustavo Bernardes <gustavo.bernardes@instructure.com>
Reviewed-by: Martin Ochoa <martin.ochoa@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>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-10-23 22:48:57 +00:00
Aaron Shafovaloff 36abfde198 Consolidate browser router
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>
2023-10-11 18:07:15 +00:00
Aaron Shafovaloff cb826376f4 set publicPath ui-build/webpack/index.js
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>
2023-09-15 18:00:55 +00:00
Aaron Shafovaloff c82dfc2387 TypeScriptify ui/index.ts
test plan:
  - build passes

flag=none

Change-Id: I6c459e401cd425b5512740213d515624887cf24b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327667
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@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: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-09-13 21:04:51 +00:00
Alexander Youngblood cd91836f18 Add all fields to frontend CreateDiscussionTopic mutation
refs VICE-2463
flag=discussion_create

Test plan:
1. Mutation exists in file

Change-Id: I313f5b51193e79e0e83dd51631a4d0612b8f4150
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322715
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: Caleb Guanzon <cguanzon@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
2023-08-07 02:09:02 +00:00
Charley Kline f887c32f27 Prepare for InstUI upgrade
refs FOO-3190

flag=none

Test plan:
  build passes

Change-Id: I6df7d02a6facc7b4730eb6579cd94b23aac713d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324310
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: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
2023-08-02 23:12:41 +00:00
Aaron Shafovaloff c59dd07087 handle .jsx files in karma
test plan:
  - build passes

flag=none

refs FOO-3190

Change-Id: I48d9459276123f0fe13767682855d4d0cc16c938
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324173
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@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: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
2023-08-01 20:16:15 +00:00
Aaron Shafovaloff 14a66cb299 .jx -> .jsx in canvas-planner
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>
2023-07-28 16:33:32 +00:00
Aaron Shafovaloff af8f9af5bc correct some references in package.json files
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>
2023-07-28 00:05:23 +00:00
Aaron Shafovaloff 11b284327c move .js files with JSX to .jsx extension
- .js files without JSX reduces unnecessary AST transformation
 - also paves way for vitest

test plan:
  - existing tests pass

flag=none

Change-Id: I392daefdfefab89e7cf511477e16c860b05519ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323393
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-07-24 14:59:37 +00:00
Aaron Shafovaloff 3e4a278969 support .jsx
Change-Id: I131bf00133a5a14df1ce050540503f4241776a09
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323390
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-07-21 22:56:34 +00:00
Jackson Howe 9f4f621f7e Remove MIR encapsulation integrity violations
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>
2023-05-23 18:46:43 +00:00
jen.smith d4233e9b31 add a react router and a controller to support it
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>
2023-05-23 17:21:08 +00:00
Drake Harper 0eaaf9c785 Add unread badge w/ability to mark as read
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>
2023-05-22 20:39:14 +00:00
Charley Kline cf3fbd96bf Build prep and cleanup for InstUI 8
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>
2023-05-15 17:56:05 +00:00
Aaron Shafovaloff 7ba6ceea12 remove coffeescript from webpack config
also: remove vestiges of CoffeeScript

test plan:
  - existing tests pass

closes EVAL-3071

flag=none

Change-Id: Ic52024efd7d16e9a5ee550d7ad9a406950ec4b51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316570
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-04-20 19:49:42 +00:00
Aaron Shafovaloff 795405bca0 decaf handlebars-helpers/index.coffee
test plan:
  - existing tests pass
  - substantial comments are preserved

flag=none

refs FOO-3470

Change-Id: Ifb131792d6cb1e4661ad9041a4003d6a4c9cffbc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316382
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-04-19 19:37:18 +00:00
Aaron Shafovaloff 82814f7b74 move with-breakpoints to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I07fb203c8b64126cee59e0ccb3be59580a9a2e05
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316312
Reviewed-by: Charley Kline <ckline@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>
2023-04-19 15:19:18 +00:00
Aaron Shafovaloff d178d6124e refactor webpack config
This makes ui-build/webpack/index.js more readable

Also: forces linting on webpack config files

Test plan:
  - Existing tests pass

[build-registry-path=jenkins/canvas-lms/foo-3464-webpack-config]
[change-merged]

flag=none

Refs FOO-3464

Change-Id: I1a230b4266cb55c7a897203630d4f5b0e8ad8e7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315464
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-18 19:32:27 +00:00
Aaron Shafovaloff 2b6f76fce9 decaf ui/features (6)
test plan:
  - existing tests pass
  - meaningful comments are preserved

flag=none

refs FOO-3470

Change-Id: Ia7534536951f9d5702d82c5e8c5d3e0e3290d47f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316084
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>
Build-Review: Aaron Ogata <aogata@instructure.com>
2023-04-17 16:10:01 +00:00
Aaron Shafovaloff 8e1c0585c6 move backbone-identity-map to ui/shared/util
test plan:
  - existing tests pass

flag=none

Change-Id: I33fc54fc8734d5eb16c3bb7601c2bdd5a76a8a54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315473
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-04-10 21:56:29 +00:00
Aaron Shafovaloff a58fbbe4f8 remove persistent-array package
test plan:
  - exists tests pass

flag=none

Change-Id: I30d0ac60c15fdc4ea10da499f5a87c68dc74d2b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315476
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-10 17:47:41 +00:00
Aaron Shafovaloff 1b09079cba move jquery-sticky to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I0693395899798d546e0913888a4116a87112eb5f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315477
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-10 17:39:07 +00:00
Aaron Shafovaloff 51349dfa05 remove .coffee extension from coffeescript imports
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>
2023-04-10 17:01:42 +00:00
Aaron Shafovaloff 12e2f7cf4b Move stringPluralize to ui/shared/utils
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>
2023-04-04 17:49:12 +00:00
Juan Chavez d9810753c3 Remove mathml duplicate
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>
2023-03-29 14:51:09 +00:00
Paul Gray f946d1db13 Convert pluralize to Typescript
Change-Id: Ie64b87b5a3462d425a374098f3d2d3dfff956440
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314240
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-03-28 16:22:00 +00:00
Yona Appletree a48af3cb4e Rework and modernize RCE External Tool dialog
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>
2023-03-01 18:20:53 +00:00
Aaron Shafovaloff 50e88880fd Auto-retry chunk load failures
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>
2023-02-24 22:25:31 +00:00
Aaron Shafovaloff 419a4906e2 Specify types for convert-case and html-escape
Test plan:
  - Existing tests pass

flag=none

Change-Id: Ib4ff7609f4ca71242cef7ed91de53a5ef177112c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310891
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-02-14 17:48:45 +00:00
Paul Gray 70ba806b5c Convert postMessages to Typescript
fixes INTEROP-7910

Change-Id: I75cb94bb97acd03c1fe6a304d0506787cf7dd721
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308290
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-01-18 22:33:52 +00:00
Jacob Burroughs d7cdcb6dc2 Organize backbone code better
fixes FOO-3242

Change-Id: I1571d333a8ee9227edc8c9ff6f1077972b2fa071
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305850
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
2022-11-22 01:22:46 +00:00
jake.oeding 4113a49074 exclude mentions dropdown content from wordcount
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>
2022-11-14 23:38:46 +00:00
Charley Kline 90fe0e6789 Decaffeinate packages/
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>
2022-11-09 18:21:44 +00:00
Aaron Shafovaloff ea47f42a15 Improve Karma test loading
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>
2022-10-12 18:23:35 +00:00
Aaron Ogata a1248c2bec restore ability for webpack development mode to use in-memory cache
refs DE-1379

Change-Id: Ic5cf33bcf69b96a3b16c6be4d14a612fda6f67d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302341
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
2022-09-30 18:33:15 +00:00
Aaron Shafovaloff ef40b94fbd Stop using jQuery for Deferred in Gradebook
Test plan:
  - Gradebook still loads

flag=none

Refs EVAL-2665

Change-Id: Iaf4ae79f38b016509a4f1b7d3c5901a2ae88851b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/301756
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
2022-09-30 16:57:31 +00:00
Aaron Shafovaloff a78f3fca8c Update spec/javascripts/ to latest prettier config
Test plan:
  - All existing tests pass

flag=none

[skip-eslint]

Change-Id: Ib125529990a476c49d4737ff7ba277f4f6c31b98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302260
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-09-29 22:27:11 +00:00
Aaron Ogata 1734090658 cache compiled webpack assets
refs DE-1379

[build-registry-path=jenkins/canvas-lms/de-1379-webpack-3]
[change-merged]

Change-Id: I61bef0e398b917611136bdee34284bb7584c5aa6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/301946
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-09-27 19:43:55 +00:00
Aaron Ogata d734111b71 always transform class properties due to safari bug
Change-Id: I2970f8487db368d609fbe73d4f0ff80b768851f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297835
QA-Review: Mysti Lilla <mysti@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-08-04 04:03:51 +00:00