Commit Graph

2380 Commits

Author SHA1 Message Date
Sarah Gerard d1ada58769 Fix accessibility checker alert after applying a fix
the alert should go away after fixing any a11y issues

Fixes LF-433
flag=none

test plan:
- create a page with some a11y issues
- notice the a11y icon should have an alert with
  the number of issues
- open the accessibility checker and fix the issues
- close the tray
- the alert icon should be gone/poperly reflect the amount
  of issues

Change-Id: I8eb8ec41783fc817467b91c246ea919b1b686144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321947
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-07-07 17:28:11 +00:00
Jenkins c5adbe87fb [i18n] Update RCE translations.
Change-Id: Ibaa5301abae779709d2ec0d972870c71c81c43d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321831
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-07-01 04:50:58 +00:00
Jenkins 348423ab01 [i18n] Update package translations
Change-Id: Ia2c6a5c5af340a7889e18e878a3d28608efcb52a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321830
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-07-01 04:50:52 +00:00
Jackson Howe 505bc167ad Create @instructure/canvas-media v1.6.0
Change-Id: I6bb9550985ccc3bbe522b58342a7327b79fc5d4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321790
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2023-06-30 16:33:42 +00:00
AJ Esa d28a8b526f Get rid of Themeable in MissingAssignments component in planner
closes FOO-3561
flag=none

Test plan:
- Make sure the MissingAssignments component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: If47d380b153cb2879f3de6c024a90a2496a0bf97
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321688
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-29 19:33:06 +00:00
AJ Esa fd94d959a7 Get rid of Themeable in StickyButton and WeeklyPlannerHeader
closes FOO-3568
flag=none

Test plan:
- Make sure the StickyButton and WeeklyPlannerHeader component in
  the planner have the correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I08faf991fe5fb4179da7b5fb3e6ccda15711dbff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321524
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2023-06-29 17:29:40 +00:00
Jenkins 40329be87c [i18n] Update RCE translations.
Change-Id: Icf34e16e26726956094b8b0136f347aa130c5ab0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321540
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-28 04:52:36 +00:00
Jenkins c7b367f3b0 [i18n] Update package translations
Change-Id: Ie0ef907c241caa16f0c71fe994ae846d8d834971
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321539
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-28 04:52:30 +00:00
Aaron Shafovaloff d119d15904 Correct some InstUI import declarations
Test plan:
  - Existing tests pass

flag=none

Change-Id: I2cf4e91ee339faf2e28a07f97322fffa57209431
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321515
Reviewed-by: Christopher Soto <christopher.soto@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-06-27 22:55:54 +00:00
Jackson Howe 5bff8eb0ff Read SR alert when updating link in RCE
closes LF-421
flag = rce_ux_improvements

Test plan:
 - Open an RCE
 - Add a course link
 - Open the link edit tray
 - Click "Replace" in the tray (with SR on)
 - Expect to hear "Updated link"

Change-Id: Ied242a04a0002fb63f71bebcef9295892c74bc05
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321285
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-06-27 17:13:58 +00:00
Jackson Howe fbb5c75aa9 Create RCE v5.6.17
flag = none

Change-Id: Ic1ae31479d9dac5a9c4b1e939697fa638343ff33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321483
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2023-06-27 16:52:19 +00:00
AJ Esa 3352a24324 Get rid of Themeable in ShowOnFocusButton and UpdateItemTray
Note: ShowOnFocusButton does not use any styling, so did
not substitute themeable styling with new method

closes FOO-3567
flag=none

Test plan:
- Make sure the ShowOnFocusButton and UpdateItemTray component in
  the planner has the correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I8ff4d2a6b2bbe5ebafa3f736b5c50c4f5329a8ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321306
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-27 16:23:28 +00:00
Matheus 7a974cb79b Stop rendering title and CC panels on media tray for locked attachments
closes LF-367

flag=media_links_use_attachment_id

Test plan
- Create a BP course and link a child course
- Upload a media file and lock it in the parent
- Sync the courses
- Use the locked child media in a page
  for the child course
- Open the rce options tray while editing the page
- Check the CCoptions dont show up
- Check the title textarea doesnt show up

Change-Id: I071918a1bc8c18c9e321c596cc866662ae9efbeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320873
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: Luis Oliveira <luis.oliveira@instructure.com>
2023-06-26 12:08:18 +00:00
AJ Esa a0932881a5 Get rid of Themeable in PlannerItem component in planner
closes FOO-3566
flag=none

Test plan:
- Make sure the PlannerItem component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I68290d6604361170560574401f03fbcb8f07fb56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320950
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-23 21:05:54 +00:00
jake.oeding 5ec3edc25b IM: fix image compression workflow
fixes LF-394
flag=buttons_and_icons_root_account
qa risk: low

test plan:
-download the images from the jira
-find an RCE and create an icon
-choose the 'upload image' feature and
 select one of the images from the ticket
>confirm it is displayed in the crop modal
-repeat with the other image from the ticket
-try other large jpgs images (>500kb) if
 desired

Change-Id: I2982c8d413a0dea5f9c7a7781592888586db24a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320635
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: Jake Oeding <jake.oeding@instructure.com>
2023-06-20 17:56:03 +00:00
jonathan fa986280e7 Add Edit Course Link selenium tests
Closes LF-195
flag= rce_ux_improvements

Test Plan: passes Jenkins

Change-Id: I8ceb7c097345445b6eb494ff539acbc69a15f2be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320569
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
2023-06-20 16:30:43 +00:00
Jenkins 8dc46c2347 [i18n] Update RCE translations.
Change-Id: Iaceab84481f36cca67ed6e83ed769d20f55b4f79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320749
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-17 04:52:09 +00:00
Jenkins 4b3817b63a [i18n] Update package translations
Change-Id: If8bcc4e416e9238f33bc09d440052909876dd919
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320748
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-17 04:52:01 +00:00
Jenkins 1bc0f81d7e [i18n] Update RCE translations.
Change-Id: Ic45835a2e19aaee2382104cd28d69bd79dee36a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320687
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-16 04:52:29 +00:00
Jenkins a39dfa1ffe [i18n] Update package translations
Change-Id: I623020435e518ccb7d9ae627ac279e21bea7851c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320686
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-16 04:52:23 +00:00
AJ Esa 86c59695d2 Get rid of Themeable in Opportunities component in planner
closes FOO-3563
flag=none

Test plan:
- Make sure the Opportunities component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: Ibce189d4bd71ffee6aa0db9aba928cd129e9e0f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-15 20:14:47 +00:00
Ed Schiebel 6b2fad63a4 Show grades for observee on student planner's grades tray
The courses api already had a feature to include all observed
students but needed a way to specify just 1. That's
how this works.

I had to deal with making a few changes to address
new eslint errors + prettier formatting tweaks (like
adding a lot of commas). Those changes should be pretty
easy to differentiate from the substantive changes.

The weekly planner used in c4e already serves up new
grades when the observee changes, so nothing was
needed there.

closes LF-353
flag=none

test plan:
  - have a couple students in a couple courses, submit assignments, and
    grade them
  - as the student, go to the list view dashboard
  - click the show grades button
  > expect to see grades for the courses with graded assignments
  - have an observer observing the students
  - while observing a student, open the grades tray
  > expect to see the observed student's grades
  - switch observed student
  > if the grades tray is open, expect it to refresh with the
    new observed student's grades
  > if the grades tray is closed, open it and expect the
    new observed student's grades

  - add a new user as an observer to one of the courses
  - link the new observer to 2 students in the course
  - as the observer, visit the list view dashhboard
  - select one of the observed students in the dropdown
  - open the grades tray
  > expect the selected student's grade for just the one course
    the observer is in
  - change the student
  > expect the newly selected student's grade

Change-Id: I53c7986da13aebfffa20f119761950f231cc82d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320384
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: Ed Schiebel <eschiebel@instructure.com>
2023-06-15 11:53:44 +00:00
Mysti Lilla abdcfc6242 Cleanup BP change page for captions
fixes LF-389
flag=media_links_use_attachment_id
QA-risk: low

Test plan
- Have a BP course set up
- Upload a media file with captions
- Go to the blueprint unsynced changes
  page and make sure media tracks
  give useful information to the user
  about what's being changed

Change-Id: I76462867c533981f176720b7529b544ab4102085
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320319
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>
2023-06-14 18:58:56 +00:00
Ed Schiebel f77ef9d241 Send translation process slack messages to #learning-foundations
instead of #mat-bots

closes LF-363
flag=none

test plan:
  I don't know how to test this other than wait for some translations

Change-Id: I1ed59fb7bad238fd36aa349628d9f8d729532dcf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319996
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: Ed Schiebel <eschiebel@instructure.com>
2023-06-12 17:03:55 +00:00
Jackson Howe eff64de4ef Send rce/media translation messages to #learning-foundations
Change-Id: I73af2bfce7ccafa71e9a0e7dfa1fa09ed951e3dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320214
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2023-06-12 15:41:12 +00:00
Jenkins 1dcdd0a458 [i18n] Update RCE translations.
Change-Id: I0b8e42c0a493014e7ccc058f5b19022660d067c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320222
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-11 04:53:30 +00:00
Jenkins 44f63072e9 [i18n] Update package translations
Change-Id: Iea2e49ec59035e5772a6835dbb049eeb3e7019f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320221
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-11 04:53:24 +00:00
Jenkins 02c9951d49 [i18n] Update RCE translations.
Change-Id: Ia8c57a7533e8f3332cebcd8ab867e1c3e23ec2a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-10 04:52:10 +00:00
Jenkins d1fdac60fd [i18n] Update package translations
Change-Id: Ib7ddb0c78f6658690e3f098d39c97e7ca8820953
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320219
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-10 04:52:04 +00:00
AJ Esa 6ec0636669 Get rid of Themeable in Opportunity/PlannerHeader component
closes FOO-3564
flag=none

Test plan:
- Make sure the Opportunity and PlannerHeader component in the planner
  has the correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I4051155e232e9ecdcb12c0ae822eae90bbcfa2b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320215
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
2023-06-09 23:26:00 +00:00
AJ Esa 9b4f10f39e Get rid of Themeable in PlannerEmptyState component in planner
closes FOO-3565
flag=none

Test plan:
- Make sure the PlannerEmptyState component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: If69421f12117410f6dcc7c648c5f8f6f8a5e5895
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320051
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-09 23:10:48 +00:00
jake.oeding 2b583b363d remove SMO feature flag
closes LF-164
flag=none

test plan:
* pre-req: you'll need to configure the studio lti
  in your dev setup to point to my studio beta. i
  will help
* you'll need to do the following with the new
  external tools dialog flag on AND with it off
1. find an RCE, open the studio lti
2. choose a video to insert, and de-select the
   'display media tabs' toggle
3. finish inserting the video
4. confirm you can launch the SMO tray from by
   clicking on the embedded video
5. repeat step 2 but leave the toggle selected,
   and again insert the video
6. confirm that you can't launch the tray from
   the embedded video

Change-Id: I21b17c8c33be5c5f78dade122bdd5e4f290586a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320182
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: Jake Oeding <jake.oeding@instructure.com>
2023-06-09 18:40:09 +00:00
jake.oeding 937ada546f boost a11y of 'edit course link' tray
closes LF-344
closes LF-345
flag=rce_ux_improvements

test plan:
-have a course link embedded in an RCE
-click link -> link options
-turn on VO
-navigate to current link
>confirm if gives you type and publish
 info for the selected current link
-try again but use a navigation link
>make sure it doesn't give publish info
 for a navigation link

Change-Id: Ib6142eb4a9308e948952ed1911832d65cc7ed986
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-06-09 14:11:47 +00:00
Sarah Gerard c6b22f8844 Replacing text with spaces defaults to link name
In a course link options tray, if there's no text then
we should default to a link name. In a files link option
tray, the 'Done' button is disabled if there is no text,
including if it's just spaces.

closes LF-342
flag=rce_ux_improvements

test plan:
- have the flag on and a course link in an rce
- open the options tray, delete the text, and
  add some spaces. Click replace, and the text
  should default to whatever the link's name is
- have a link to a course file. (add course link ->
  switch the filter from "links" to "files" and
  choose one.)
- delete the text, add some spaces, and note that
  the 'Done' button should be disabled.

Change-Id: I317ef02c0a648fbd89bf7ef670548d8ce971e910
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319813
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-06-07 17:50:32 +00:00
Davis Hyer f0b5f584bb upgrade canvas to DateTimeInput v8
fixes LF-48
flag=none

test plan:
  - ensure BBB modal options renders correctly

qa risk: low

Change-Id: I22ac472e7eff24fcc501f9e7c97dbb616893192d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319256
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2023-06-07 17:27:46 +00:00
AJ Esa 8d7583fcbd Get rid of Themeable in NotificationBadge component in planner
closes FOO-3562
flag=none

Test plan:
- Make sure the NotificationBadge component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I31d9434495690e4c8cd25499b0011642f71cd6fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319973
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-07 16:32:27 +00:00
Sarah Gerard eef78e1646 Make default link text the link title
the placeholder text should always be the current
link's title and saving with no text entered should
default to the current link's title

closes LF-343
flag=rce_ux_improvements

test plan:
- have an rce open with the flag on, add a course link
  to your page.
- open the course link options tray. Change the text to
  something else, remove the text, and ensure the placeholder
  is still the title of the current link
- change the current link to a different course link using the
  tray
- delete the text and ensure placeholder is the new link
- click replace and make sure the text is the new link's title

Change-Id: I99e0600600732f59670911520688dd5f4a9913c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319776
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-06-07 15:47:51 +00:00
AJ Esa 9526426af8 Get rid of Themeable in Grouping component in planner
closes FOO-3560
flag=none

Test plan:
- Make sure the Grouping component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I6ed1487aa2efbf9ea386ffd757d604e1abadd50a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319927
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-06 18:25:04 +00:00
jake.oeding a32648e89e clear search results on tray close
closes LF-341
flag=rce_ux_improvements

test plan:
-find an RCE, open the course link tray
-search for something, close the tray
-reopen the tray
>confirm that your search results were cleared
-repeat the same process with the 'edit course
 link' tray and confirm the expected result

Change-Id: Ide55dec84d4f530c2b55aa4f271fc29573939d5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319764
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: Jake Oeding <jake.oeding@instructure.com>
2023-06-06 13:24:22 +00:00
Jenkins 89725fb6db [i18n] Update RCE translations.
Change-Id: Iec9473faf5da5499bf85bba6ee942bbd2e611e95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-06 04:52:21 +00:00
Jenkins 8fea493a4a [i18n] Update package translations
Change-Id: I2367b56473b313f75eac6c00bcfcf72935cb9dc7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-06 04:52:15 +00:00
jake.oeding a6985049c4 handle file paste issue in Firefox
fixes LF-312
flag=none

test plan:
-confirm existing paste and drag and drop
 functionality holds true in  Chrome and Safari
-confirm that image pasting into the RCE and drag
 and drop (any file type) still works in Firefox
-now test pasting a non image file type in the RCE
>confirm you get the new flash alert and no console
 errors are thrown

Change-Id: I218ff18d2acaaf0eefb9432e3d705c0add7b99ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319574
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: Jake Oeding <jake.oeding@instructure.com>
2023-06-05 23:54:49 +00:00
Cameron Ray 90f032296b Update alert text to be a little more user focused
flag=none
Closes EVAL-3205

Test plan
- Open the canvas dashboard
- Switch to list view
- Scroll all the way to the bottom
- Ensure test says "No more items to show"

Change-Id: If31210c0eed2b2572843fd82f3bdfa2d1d62d3ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319492
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Rohan Chugh <rohan.chugh@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-05 21:50:39 +00:00
AJ Esa 14fe582a01 Get rid of Themeable in EmptyDays component in planner
closes FOO-3558
flag=none

Test plan:
- Make sure the EmptyDays component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: Ic21bea3d2b806b55b38fc75d80037f96fda6f583
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319700
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-05 18:21:24 +00:00
Caleb Guanzon 255b0cd178 make restrict_quantitative_data for planner type agnostic
flag=restrict_quantitative_data
fixes VICE-3549
fixes VICE-3557

test plan:
- create a graded discussion and a quiz
- as an rqd enabled student, go
to recent activity dashboard
- verify todo list does not
show points possible for discussion and quiz

- go to list view
- verify list view shows no points possible
for discussion and quiz

Change-Id: Ic9c28d3d3e83c659f6cb5c055ab11f1bc847304d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319608
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2023-06-02 21:01:38 +00:00
AJ Esa 2e8804a4c9 Get rid of Themeable in GradesDisplay component in planner
closes FOO-3559
flag=none

Test plan:
- Make sure the GradesDisplay component in the planner has the
  correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I01905cb27b8922fefb5fac55f4e1c4b8146db287
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319564
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-06-01 19:58:51 +00:00
Sarah Gerard 0d5b8d07a8 Fix inserting media from 'All Files'
updates the mime types so the embeded prop gets set
properly when inserting media from all files, and allows
fallback to mediaEntryId if embeded props were not set
correctly. Further context in the linked ticket.

fixes LF-191
flag=none

test plan:
- have a media object with a corresponding attachment and using
  the rails console, change that attachment's content_type to 'video/*'
- in an rce insert course media, then change the type filter
  from 'Media' to 'All'
- insert the media (who's content-type is 'video/*')
- ensure media is embeded properly, switch to html view
- iframe should have src "https://canvasdomain/media_objects_iframe/XXXX"
 and data-media-id="XXXX"

Change-Id: Ib35f78211c43290f44ac829d819450dc13485744
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319482
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-06-01 18:10:42 +00:00
AJ Esa 0c8cc74935 Get rid of Themeable in the Day component in the planner
closes FOO-3557
flag=none

Test plan:
- Make sure the Day component in the planner has the correct
  look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I9266fae41731cf868ad3ac93bb0304edc43acb8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319456
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-31 23:17:34 +00:00
AJ Esa 7a9ded3169 Get rid of Themeable in the planner, CompletedItemsFacade
Note: date property of propTypes object required for
scrollt-to-today animation

closes FOO-3556
flag=none

Test plan:
- Make sure the CompletedItemsFacade component in the planner have
  the correct look and feel
- Make sure planner tests pass in packages/canvas-planner

Change-Id: I09555c32ff26b63d0c21728dd3673359eb598ac7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319261
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-31 16:45:58 +00:00
Matheus c747c8fa08 Use media attachment route on update
closes LF-329
flag=media_links_use_attachment_id

Test plan:
- Upload a media file to the RCE, save the entity
  (page, discussion...)
- Go back, add a CC or change the title.
- Check that there was no xhr to the media_object
  route if the FF was ON
- Turn the FF OFF and try again, see that the old
  route is used then.

Change-Id: I52f3ef5537423a30562b7831c155830eada4e870
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319383
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-05-30 23:46:25 +00:00
jake.oeding 259976570f update README
fix broken links, remove irrelevant text,
modify grammar

closes LF-308
flag=none

test plan:
-proofread
-check that links work correctly

Change-Id: I4e0a74277f4b760fc8f127a1b115399b8a8f4880
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319237
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: Jake Oeding <jake.oeding@instructure.com>
2023-05-30 20:59:12 +00:00
Jenkins 8d429c1e84 [i18n] Update RCE translations.
Change-Id: Ia295a580e2573d1c004f76b8908b8e68a6eff6c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319269
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-27 04:52:08 +00:00
Jenkins fd4b869f22 [i18n] Update package translations
Change-Id: Ibc4f5063d044caa6d87bf94ed469973bd13f3259
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319268
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-27 04:52:02 +00:00
Mysti Lilla 570206eb60 Upload correct content type for media
refs LF-283
flag=none
QA-risk: medium
[fsc-timeout=30]

Test plan
- Upload files in the RCE and make sure
  their content types make sense
- (It looks like 'video' was sort of the
  default recently because the old
  code didn't seem to be getting the
  data it was expecting)
- We want the full content type with
  a slah to make LF-283 work better
- Check other places we might be using
  the uploader and see if it's working
  there too (I can't think of other places
  we're using it :( )

Change-Id: I7f155ee2c2bd7c2dfdc62e097748c5c8ecb9e513
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318822
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-05-26 17:04:35 +00:00
deyvison.penha 70494bfbd5 Remove percentage from video options
This Patchset removes percentage from video custom options

fixes LF-34
flag=none

Test plan1:
- open the RCE and get a video from upload or course files
-click in video options and in the trayOptions, select Size options
-Expected that has only pixels inside Custom option.

Test plan2:
-open the RCE and get a image from upload or course files
-click in image options and in the trayOptions, select Size options
-Expected that have  pixels and percentage inside Custom option.

Change-Id: I1e65c23937162269b85efec0675adbb7bb1652d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318765
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2023-05-26 16:21:11 +00:00
Davis Hyer 4e82630444 upgrade planner to DateTimeInput v8
fixes LF-334
flag=none

test plan:
  - open the item editor tray in the planner dashboard view
  - ensure that date/time inputs work
    - you should be able to type a non-step value time if desired

qa risk: low

Change-Id: I7b8b675abe1aacee697979ed1860f02e2e5fc8bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317167
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: Davis Hyer <dhyer@instructure.com>
2023-05-26 15:35:38 +00:00
Jenkins 344eb8524d [i18n] Update package translations
Change-Id: Ia0a78cb044b66078a19d6a4c8f8b0b48a74f5739
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319200
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-26 04:51:55 +00:00
Caleb Guanzon 0c4cc326a7 make the grades tray in list view rqd aware
flag=restrict_quantitative_data
fixes VICE-3522

test plan:
- enroll a quantitative data student in 2
courses, one in a course without an assignment
and another in a course where the student has been graded
in 1 assignment

- visit dashboard
- go to List View
- click the grades icon on the top right
- verify the grades tray shows No grade
for the course with no grade and
the letter grade for the course with a grade

Change-Id: I1257f8aca525c77a2622ff88b3e8f36c2bb96732
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319047
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Alexander Youngblood <alexander.youngblood@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
2023-05-25 20:22:59 +00:00
Jonathan Guardado aad39d2e6b Add account calendar events to the student planner
- Include account calendar events in the api/v1/planner/item
endpoint
- Planner UI updates to support account contexts in classic and k5
modes

closes LS-3412
flag= none

Test plan:

1- As admin, create a sub-account
2- Create a course in that sub-account with an enrolled student
3- Go to the root account -> Account Calendars page
4- Check the sub-account and apply the changes
5- Go to the calendar and create an event for that sub-account
- In classic/normal canvas
6- Login as the student you enrolled in the course
7- Go to the dashboard and select the list view
8- Expect to see the calendar event you just created
9- Expect the event context to be the name of the account and the color
to match the one you set in the calendar.
10- As admin, hide the account in the root account -> Account Calendars
page
11- Login as the student again
12- Go to the dashboard and expect not to see the account calendar
event.
- In K5
13- As admin, enable the sub account again.
14- As student, validate that the account calendar events appear in
the k5 dashboard schedule tab
15-As student, validate that the account calendar events don’t appear
in the k5 course schedule tab
16-Login as observer and validate steps 7, 8, 14 and 15

Change-Id: I260c2c5978700153a24e59f95d65300cf902389c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317461
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
2023-05-24 19:08:43 +00:00
Juan Chavez 80d0c36da2 Use new PUT method for media tracks in RCE
fixes MAT-1206

flag=media_links_use_attachment_id

test plan 1:
- Navigate to a RCE instance.
- Embed a video/audio from user/course files.
- Click video/audio options.
- Add subtitles in the tray.
- Click save button from tray.
- Save RCE content.
> Verify that the captions are available in the
media player.
- Edit the content.
- Click video/audio options.
- Add other subtitles or remove some.
- Save RCE content.
> Verify that the captions are available in the
media player.
> You can also verify that we are using endpoint
PUT "<canvas>/api/v1/media_attachments/:attachment_id/media_tracks"
when clicking save inside tray.

test plan 2:
- Navigate to a RCE instance.
- Click in Upload/Record media.
- Upload a video to the modal.
- Select CC checkbox.
- Add some subtitle files.
- Submit the file.
- After it finishes loading, click Video Options.
> Verify that the respective subtitles are there.
- Add other subtitles or remove some.
- Click save button from tray.
- Save RCE content.
> Verify that the captions are available in the
media player.
> You can also verify that we are using endpoint
PUT "<canvas>/api/v1/media_attachments/:attachment_id/media_tracks"
when clicking save inside modal.

Change-Id: Ic0098e18c867905c79f917a7dbd5070691048890
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316615
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
2023-05-24 18:03:55 +00:00
Jonathan Guardado 1ba3900ad8 Remove accessibility check on page clicks
The accessibility check is already run every time the editor content
changes and when the editor is toggled, so it doesn't need to run
on page clicks

closes LF-21
flag = none

Test plan:
- Open the RCE and expect the accessibility check not to be executed
when clicking on the page.
- Expect the accessibility check to run when changing the content in
the editor
- Expect the accessibility check to run when toggling between the HTML
and rich content editors

Change-Id: I93859c4910d017c7b32aa75111830ecf3a9fc534
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318923
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: Jonathan Guardado <jonathan.guardado@instructure.com>
2023-05-24 17:27:45 +00:00
Matheus 8f05c18d05 Allow user or public course media to be viewable
fixes: LF-219
flag=media_links_use_attachment_id

Test plan:
- Upload a media file into the user’s files in Canvas
- Link the media file to a course RCE (like discussion topic replies)
- Verify you can access the media file as another student or teacher in the course

Change-Id: I8b884caf5ac9759815d4f64009489913df358670
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318963
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-05-24 16:32:47 +00:00
Ed Schiebel 153df00f59 Fix planner day failing specs
closes LF-331
flag=none

test plan: passes jenkins at 1am

Change-Id: Id97e24ea7b83eadad161252bde0836ddcfe97915
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319017
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: Ed Schiebel <eschiebel@instructure.com>
2023-05-24 14:33:45 +00:00
Charley Kline 0d61c40cec Get rid of Themeable in the planner, BadgeList
Refs FOO-3190
flag=none

This is a start to removing the dependency on the theme
engine in the planner. It replaces the use of ui-themeable
with a more simple retrieval of the theme variables in
effect, and then directly applies them to the HTML elements
in BadgeList instead of via CSS classes

Test plan:
* Examine the badges (pills) on a planner "to-do" list and
  verify that they still have the correct look and feel

Change-Id: I9ea0b4c788bb50c2c5017625921d78622d81e1e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318589
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-05-23 22:37:03 +00:00
Ed Schiebel fddfc7f339 Fix a spec that's flakey late in the day
closes LF-315
flag=none

test plan: jenkins passes arount 1:30am :)

Change-Id: Id7b4d74c02c7b989fc663df98842391240f5c688
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318877
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-05-23 15:33:44 +00:00
Jenkins c9ef47b631 [i18n] Update RCE translations.
Change-Id: I9dbd18cf8fc90000c4d09b7376ab18b1b00e3ac9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318828
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-23 04:52:32 +00:00
Jenkins 900e8b43e2 [i18n] Update package translations
Change-Id: I071c5bda76675afea59469e56937eada4ed60dae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318827
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-23 04:52:21 +00:00
Jason Gillett 68f32bb5dd Remove points from schedule view missing assignments.
closes VICE-3513
flag=restrict_quantitative_data

Test Plan
1. Create assignment with due date in the past
2. With RQD off check the schedule page for missing assignment
3. Verify points appear when opened
4. Turn RQD on
4. Verify that the points are no longer visible.

Change-Id: I508c5c635b3725faa6cf0497957325841e6e6f69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318543
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-23 01:03:06 +00:00
Jackson Howe 6b14dcf375 Remove rce_better_paste flag
closes LF-284
flag = none

Test plan:
 - Spot check that the test plan in commit
   13323b04ed still works as outlined

Change-Id: I76309969b8ef63368fc18896bc96f35bf93c6d0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318573
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-05-22 20:14:44 +00:00
jake.oeding 1c5b640d98 adjust copy in modules and edit course link tray
closes LF-295
flag=module_publish_menu
flag=rce_ux_improvements

test plan:
-turn on the flags
-go to a page with an RCE
-insert a course link (any type)
-click on link, link options, and you should
 see the new tray open
>confirm the copy change is reflected and makes sense
-next go to modules
-click on the publish all button, then continue
>make sure you have the correct copy for progress bar
 and stop button
-click on the button again and select unpublish, continue
>confirm you have the unpublish copy for the progress bar

Change-Id: Ida46fb2ce654032f4037083bd725b0b7c1edcb8d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318617
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-05-22 14:36:07 +00:00
Sarah Gerard 0f53984f80 Fix formatMessage imports
A few translations were not working due to import issues

closes LF-57
flag=none

test plan:
- put your course in another language
- in the RCE open the UploadMedia modal
- upload a media file
- ensure that 'File Name' is translated
 (look at screenshot on ticket if this is confusing)
- Attempt to upload captions with a srt file more than
  295000 bytes large
- ensure the message "The selected file exceeds the {maxSize} Byte limit"
  is translated
- ensure there is nothing else in the modal that needs to be translated

Change-Id: I9a7d5dddc511e87a7b4b95bdc5addbcfbc5707c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318444
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-05-18 21:27:22 +00:00
Jackson Howe ecff6e1ce9 Remove rce_improved_placeholders flag
closes LF-276
flag = none

Test plan:
 - Spot check inserting image, video, audio, and other file types
   into the RCE using copy/paste, drag-n-drop, and using the upload
   dialog
 - Expect content insertion to work as before
 - Expect the placeholder to look nice

Change-Id: Ifde85538dee72f957832595f666f0a436b1d16a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318442
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-18 17:21:00 +00:00
jake.oeding d89aa33d8d swap out npn bin with npx
npm bin was removed from npm in v9.0.0

refs LF-279
flag=none

test plan:
-run 'yarn build:all' and confirm that it succeeds

qa risk: low

Change-Id: I1fad82fd33a321ea4408260ed6917fa6b6e1e2c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318487
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-18 12:59:32 +00:00
Jonathan Guardado adec94d8c4 Remove buttons_and_icons_cropper flag
closes LF-31
flag=none

test plan:
- Passes Jenkins
- Confirm that the Icon image cropper works as usual

Change-Id: Id8b0e814b2f077cf9fa168b88e5b7098fd5a23b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318346
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-17 19:37:24 +00:00
jake.oeding 177367dc88 bump RCE version
closes LF-279
flag=none

test plan:
-specs pass

qa risk: none

Change-Id: I94eeb215484013e3bea972366b86deac3bb7f810
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-17 19:15:10 +00:00
jake.oeding 847963a93a make media placeholders use the correct file name
closes LF-270
flag=rce_improved_placeholders

test plan:
-make sure the flag is on
-upload some media in the RCE
-change the title in the upload modal before
 you hit 'submit'
>submit and then observe the placeholder uses
 the name that you changed to

Change-Id: I9da31f3a9692825b1812375918280e64da34af54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318322
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-17 18:49:30 +00:00
Charley Kline 3deed93ea7 Exclude node_modules from RCE tsconfig (for VS Code)
VS Code complains that the RCE is "a large project" and that
excludes should be configured. This just explicitly excludes
node_modules and dot-files in the RCE tsconfig.

Test plan:
* VS Code no longer whines about the project being large when
  opening a TS file in packages/canvas-rce/src

Change-Id: I99d1a766632aebbed1cac02fbf35f25fc838d04b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318340
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>
2023-05-16 23:32:12 +00:00
Isaac Moore a29ad0f7e0 Read JWT secrets from Vault instead of dynamic_settings
refs AE-45
flag=none

test plan:
- specify `canvas_security` values in `vault_contents.yml`
- confirm they're loaded correctly when calling `CanvasSecurity` methods,
  like `services_encryption_secret`, `services_signing_secret`, and
  `services_previous_signing_secret`

Change-Id: Ib088eb2c123bcc32cfd6d67729916a6d7c5c2529
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314607
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2023-05-15 18:59:18 +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
Caleb Guanzon c35efba464 make grouping view rqd aware
flag=restrict_quantitative_data
fixes VICE-3499

test plan:
- for this one make sure your package js is compiled
you can make sure everything is good to go by
running "bundle exec rake canvas:compile_assets"
- create an assignment due in the future
- as a RQD student go to list view of the dashboard
- verify you do not see points possible on the assignment

Change-Id: I4b9342edcf808e5f1ed2ccf338a23d480c0f463e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317874
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-05-13 19:11:40 +00:00
Caleb Guanzon fb4b4981f6 make opportunities respect rqd
flag=restrict_quantitative_data
fixes VICE-3500

test plan:
- create an assignment due yesterday
with points possible
- as an RQD student, go to home page
- go to dashboard list view
- click the bell on the top right
- verify that assignment does not show points
- dismiss the assignment
- go to dismissed tab
- verify assignment does not show points

Change-Id: I608bc232ef10bdceb37104d44f7529e9cdcb4eea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Jody Sailor
2023-05-13 19:11:24 +00:00
Jenkins 38f10de22a [i18n] Update RCE translations.
Change-Id: I4970e15c4178fa66bea852dabdf42f77b8eb6872
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318098
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-13 04:52:43 +00:00
Jenkins 0a775457c6 [i18n] Update package translations
Change-Id: I90650f26bfb0fec8eac7887dd211d1b44a1872b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318097
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-13 04:52:37 +00:00
Yona Appletree cee5a86ca2 RCE: Handle deviations in INST editorButtons type
Updates the new external tool dialog to handle unexpected shapes
of INST editorButtons

Fixes MAT-1354
flag=rce_new_external_tool_dialog_in_canvas

QA Risk low:
- behind feature flag
- well unit tested

Test plan:
- Navigate to a page with an RCE
- Put a breakpoint where ENV is defined in the page, and add
  an offending editorButton to INST. See ticket for details.
- Ensure the RCE loads without error

Change-Id: I747555f38774d6978ea0666ef0d38bd8a0aaf89c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317810
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-10 17:01:46 +00:00
Paul Gray 90a61e51af Convert deep-linking code to typescript
refs INTEROP-8003
fixes INTEROP-8038

flag = none

Test plan:

Launch the LTI 1.3 test tool, and return content items in the assignment
selection, and editor placements.

Change-Id: Ifaf98a4a6fc76a987c43cc1240e45d85ca02afda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2023-05-10 16:38:18 +00:00
Aaron Shafovaloff 6d6672991c Fix special characters in gradebook filters
Test plan:
  - Enable the enhanced_gradebook_filters feature flag
  - Create a student group with a name containing special characters
  - Go to the gradebook
  - Click "Apply Filters"
    - The student group name should be displayed correctly in the
      filter dropdown

flag=enhanced_gradebook_filters

Fixes EVAL-2936 (again)

Change-Id: I8d0ac8fa5f3326e7b108562d1376b923f391b115
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2023-05-09 19:33:21 +00:00
Sarah Gerard 2067bc6898 account for global ids in overlay
the regex expression which found the file id
was not accounting for the possibility of a
global id, causing some document previews to fail

fixes MAT-1345
flag=none

test plan:
- this bug is hard to recreate in local, so I think the
  test proves that it works, you can also do the following:
- go to an rce and add a user file using the document tray
- in html mode, change the href of the file to have a global id
  as the file id
- ex. href="https://canvas.docker/users/1/files/12~34560?..."
- make sure the file link is set to overlay and save
- open developer tools and go to network
- click on the file to preview it in overlay
- look for a network request resembling this:
  12~34560?include[]=enhanced_preview_url&verifier=ag… etc
- request will fail unless you have an attachment with that id
  (120000000034560) but that's ok
- ensure no other overlay file links are broken

qa risk: low

Change-Id: I4df7977ba711f4a13916a0e6d6bfbf4ab4f825eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317718
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-05-09 18:56:55 +00:00
Omar Gerardo Soto-Fortuño 0086d1762f Hide points from ToDoItem
fixes VICE-3497
flag=restrict_quantitative_data

test plan:
  - Specs pass.
  - As a teacher, create an assignment with due date.
  - As a student of the course, go to the dashboard.
  - Points shouldn't be shown.

qa risk: low

Change-Id: Ie7605ea080c76e52b33d7410070900e4dfc3e589
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317708
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
2023-05-09 17:45:43 +00:00
Aaron Shafovaloff ee6c9d4366 Remove deprecated use of React.FC
Test plan:
  - Existing tests pass

flag=none

Change-Id: I9edba9d33fce925d94b0ea73e2eb2e6471cd57c7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317573
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-05-05 23:02:06 +00:00
Yona Appletree ac34b669e1 RCE: Enable noImplicitAny for typescript
- Matches recent changes to canvas core tsconfig
- Enable noImplicitAny in packages/canvas-rce/package.json
- Remove canvas-rce pre-commit hook
- Add @ts-nocheck to files that have errors due to noImplicitAny

test plan:
  - existing tests pass

flag=none

Change-Id: I6540a42ba5089deaab851f113e5f665dcff2851e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317214
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-28 16:43:16 +00:00
Aaron Shafovaloff ce864bb5ff turn on noImplicitAny for typescript
also: remove tsconfig-strict.json

also: remove tsc precommit hook

test plan:
  - existing tests pass

flag=none

Change-Id: Ia2b30d9d77fdb55159de4fe16f3ee1826f43aad5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317197
Reviewed-by: Yona Appletree <yona.appletree@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-04-27 21:34:07 +00:00
Yona Appletree 871c8b253a Fix test that fails sometimes due to hard coded timezone
Closes MAT-1340
flag=none

QA Risk: low

Test plan:
- Automated tests pass

Change-Id: I8748670ad6fe7f4647198285eb001cd95480ea9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316779
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-04-27 19:40:14 +00:00
Yona Appletree e115c330ca Type safety and prop cleanup for RCE components
Closes MAT-453
flag=none

QA Risk Low

Test plan:
- automated tests pass

Change-Id: I615b91dd03fb865bf5b4390702d320e2b88feb39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316757
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: Yona Appletree <yona.appletree@instructure.com>
2023-04-27 19:39:52 +00:00
Aaron Shafovaloff 6d88ff833c remove need for html-escape from enhance_user_content.js
test plan:
  - existing tests pass

flag=none

refs EVAL-3088

Change-Id: I8cff040afa5f820b913813136ba6cdaa92dd0d57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317074
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-04-27 15:26:18 +00:00
Aaron Shafovaloff e570fbe97f remove need for html-escape in media_comment_thumbnail.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: Ic59d0002423772396ea3315294dc3b6ce36a9b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317068
Reviewed-by: Jake Oeding <jake.oeding@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-04-27 14:23:42 +00:00
Aaron Shafovaloff 3ffa985bcc remove need for html-escape in instructure_helper.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: If3ed9bee9f0b10b554a9fdf80415e88e3e77f97a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317067
Reviewed-by: Juan Chavez <juan.chavez@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-04-26 23:25:38 +00:00
Aaron Shafovaloff 548ba8ae52 remove need for html-escape in doc_previews.js
test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: I331a742462ebeefc6a501cc492dc92f95589e371
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317066
Reviewed-by: Juan Chavez <juan.chavez@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-04-26 23:25:05 +00:00
Aaron Shafovaloff 891e8927ed remove use of html-escape in instructure_equation/plugin.ts
was needlessly used

test plan:
  - existing tests pass

refs EVAL-3088

flag=none

Change-Id: I3e41220f24232b347cdb141a0e1f4dbd65f41acc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317070
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-26 23:19:08 +00:00
Yona Appletree 428b086c87 Rename some js -> ts before other changes
Refs MAT-453
flag=none

QA Risk Very Low

Test plan:
- automated tests pass

Change-Id: I3af4310a11edac2efa49504c049b24244475f221
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316975
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: Yona Appletree <yona.appletree@instructure.com>
2023-04-26 18:04:24 +00:00
Aaron Shafovaloff ea54d5cc3e move obj-select package to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I9f00ddb761c0ae6c46d7079d07fe11f48c604dd1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316705
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:32:13 +00:00
Aaron Shafovaloff fb484eac8b move jquery-tree to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: Ifc493c2b45a67f2f8208e36521d322aa9ca5af08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316708
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:29:04 +00:00
Aaron Shafovaloff e07e739eaa expose lodash-underscore types
removing the IIFE from lodash-underscore exposed the types

lodash is preferred, but this provides types for existing code.

bonus: flattenObjects was moved to a shared utility function
  it is only used once

test plan:
  - existing tests pass

flag=none

Change-Id: I7ec207f15a326bdefe75897f5c627dbd3d0d0c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316677
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-26 16:26:25 +00:00
Aaron Shafovaloff 0dff4122cd move make-promise-pool to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I983d985d6d81dc4ef77af98d3a647fa4a4d2eee1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-25 17:45:25 +00:00
Yona Appletree 9a34677f99 RCE: Improve placeholder removal jank
Improves (but doesn't totally eliminate) visual issues as RCE
placeholders are removed and images inserted.

Closes MAT-1337
flag=none

QA-risk low

Test plan:
- With and without rce_improved_placeholders enabled
- Insert a large image or video into the RCE
- Ensure that there isn't a long delay between the removal
  of the placeholder and the loading of the image

Change-Id: If6748bf317964c6a224ec1883620f17a7299c351
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316607
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: Yona Appletree <yona.appletree@instructure.com>
2023-04-25 16:34:50 +00:00
Jenkins c2bac09be6 [i18n] Update RCE translations.
Change-Id: I7900f94b17cbdae12e49e6a81c220e079e5102db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316810
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-25 04:52:32 +00:00
Jenkins 747a628905 [i18n] Update package translations
Change-Id: I81cd2caec0be7de4f747f3fb8f8e7f6a2d7943c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-25 04:52:25 +00:00
Aaron Shafovaloff e00f1bb4f8 remove compose package
test plan:
  - existing tests pass

flag=none

Change-Id: I9639333fec600678a3126b2f1ffb5fdd2d800d23
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316704
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-24 19:07:31 +00:00
Yona Appletree 930cee9132 Update @instructure/media-capture to 9.0.0
Update media-capture to fix issues with microphone selection in
RCE media capture modal.

Closes MAT-1310

flag=none

QA Risk: Medium
 - Updates dependencies used in the RCE and Canvas,
   potentially there may be side-effects

Test plan:
 - In the RCE:
   - Open the "Upload/Record Media" dialog, select "Record" tab
   - Compare the selected microphone option to the browser
     defined one (accessible from the video icon on the
     right side of the chrome address bar)
   - Make some noise and ensure the audio indicator responds
   - Refresh the page, and ensure audio still works

Change-Id: Ia4a653ae489c3fb1ec8233207d078fd209e9c5ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316209
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-24 19:06:39 +00:00
Aaron Shafovaloff 4555e54ca7 move escape-regex to ui/shared
test plan:
  - existing tests pass

flag=none

Change-Id: I5649a6a2f31cea974fac32e9bbff367e0e217007
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316714
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>
2023-04-24 15:57:07 +00:00
Jenkins 11a44ad8eb [i18n] Update RCE translations.
Change-Id: Ia71df339208210fcd1c38ebbb6d545d10bebaebe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316700
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-22 04:51:59 +00:00
Jenkins 32c18d704e [i18n] Update package translations
Change-Id: I969a45db727c5d33f9f3746c988934053a794600
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316699
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-22 04:51:53 +00:00
Yona Appletree 21bb658642 Improve rendering of errors in media embed iframes
- Adds the "embedded" param to new attachment-id based media URLs in
  the RCE to remove app chrome.
- Cleans up "embedded" mode:
  - Hide the mobile header as well as the regular header
  - Hide the masquerading chrome
- Improves the rendering of error pages so they work better when
  shown in the small iframes used for embedded media.

Closes MAT-1313

flag=media_links_use_attachment_id

QA Risk: medium
- Changes have been made to global css for embedded mode. These are
  consistent with existing behavior (hiding headers), but any change
  to global styling seems potentially dangerous.

Test plan:
- Enable the flag
- Have two courses and a teacher with access to only the second one
- Upload and embed a video into a page on the first course
- Copy the HTML for that embed into a page on the second course
- View the page in the second course as the teacher who only
  has access to the second course, using masquerading.
- Observe that the "Access Denied" within the media embed frame
  matches the design, and that no additional app chrome appears
  in the frame.
- Copy the URL used for the iframe and open it in a new tab in
  the browser. Remove the "embedded=true" query parameter.
- Ensure that access denied page now looks like a normal Canvas
  page, including side nav and the user masquerading chrome.

Change-Id: I49e92e0d3be50ae55ed9dd03ea380a2be1918273
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316439
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-21 21:54:23 +00:00
Yona Appletree 3cb0a7f4ef Support multi-file paste/drag-n-drop in the RCE
Extends the existing enhanced paste/drag-n-drop functionality
to support inserting multiple files at once. Also fixes a few issues
with the new placeholders that are related to the changes needed for
multi-file paste.

Closes MAT-1263 and MAT-1333
flag=rce_better_paste

QA-risk medium:
- Changes were made to the file upload dialog that
  aren't behind the feature flag.
  The file upload dialog should be checked to ensure it wasn't
  broken by these changes.

Test plan:
- Multi-file paste:
  - Copy multiple images in Finder, paste them into an RCE
  - Drag-n-drop multiple files from Finder
  - Ensure they all load correctly, and in the correct order
  - Repeat the above with copyright requirement enabled for the course
- Placeholder whitespace
  - Enable rce_improved_placeholders
  - Insert "something" into an RCE
  - Place cursor in the middle of the word
  - Insert an image, video, or file
  - Ensure that no additional whitespace is inserted

Change-Id: I0314276656765ff8a8f6308286cbfdaed60502ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315854
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: Allison Howell <allison.howell@instructure.com>
2023-04-21 17:05:18 +00:00
Jenkins 5d99576b33 [i18n] Update RCE translations.
Change-Id: I84378393c9da157d052185351a049479d7a36e80
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316620
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-21 04:50:35 +00:00
Jenkins aa79081151 [i18n] Update canvas-media translations.
Change-Id: I0bd17581a8d2e789ecd906c4aa1fcba7338a0741
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-21 04:50:28 +00:00
Jenkins 4503f4e050 [i18n] Update package translations
Change-Id: Ieca4816132b2eda685b61468ce27a375cfb3126f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316618
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-21 04:50:23 +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 ddf696d1f5 move convert-case to ui/shared
Change-Id: I465adfb221f922da133dbaa73cc9241198b9812f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-04-20 17:20:46 +00:00
Jacob DeWar a76d00d564 Make Closed Caption selection work in full screen
closes MAT-1322
flag=none

QA Risk: Low - just added new prop to several components

Test Plan:
- Go to an RCE
- Upload video/audio
- Make the RCE full screen
- Select the video/audio, select the options menu
- Select the closed captioning language dropdown
- Make a selection
* Verify selection can be made in full screen
* Verify selection also works in non full screen

Change-Id: Ibebbe1e00e7cd7c5d14e85c12eebe28b571395e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316242
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-20 11:54:25 +00:00
Aaron Shafovaloff 55d7e0ef1c move query-string-encoding to ui/shared
Change-Id: Ib0481bcabb66160e3e2f0a5fd45132725fe5d5fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316281
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-19 15:20:09 +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
Sarah Gerard 7322697811 change rce media insertion to use attachment links
there's a few more things we may need to change
once the canvas-rce-api is also updated to use
the attachment routes
but this should take care of insertion at least

closes MAT-1205
flag=media_links_use_attachment_id

test plan:
-make sure flag is on
-use the rce to upload media to a page
-switch to html editor
-ensure the src url is a media_attachments link
-test by uploading a new file, and by using the
 course files as well
-ensure when flag is off, uploaded media uses old
 media_objects links

Change-Id: I97c96a4a43b87202d9089a4b958d0710027747a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315412
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: Allison Howell <allison.howell@instructure.com>
2023-04-14 20:31:14 +00:00
Davis Hyer 2da8aa065a remove usage of getByRole in planner tests
flag=none

getByRole is super slow. To speed up our tests, this commit switches
to query selectors that are much quicker. See
https://github.com/testing-library/dom-testing-library/issues/552#issuecomment-625172052
for more details.

test plan:
  - tests pass

qa risk: low

Change-Id: I301ced09e99171496fffb92229746ac0cd45a860
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315805
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2023-04-13 16:27:59 +00:00
Davis Hyer 2082e77a77 provide required title prop in planner tests
flag=none

test plan:
  - tests pass

qa risk: low

Change-Id: I89605319e790bcab01701b187391b98811c72ead
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315720
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: Davis Hyer <dhyer@instructure.com>
2023-04-12 17:26:49 +00:00
Jenkins 8a4acb3ed7 [i18n] Update RCE translations.
Change-Id: I781bf6f9a03f47fce9327d230be1ae3c36993160
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315725
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-12 04:50:35 +00:00
Jenkins 161536cd4b [i18n] Update package translations
Change-Id: If2379cd5518264ff511fb8c5fad9760fa6a78ff9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315724
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-12 04:50:24 +00:00
jake.oeding c9665ea9d4 prevent drag resizing when SMO resize is false
previously you could click on studio media and
drag on the corners to resize when the tray
was enabled, even if resize was false

fixes MAT-1323
flag=rce_show_studio_media_options

test plan:
*pre-req: have your dev setup point to my studio
 beta instance
-embed a studio lti video in an RCE
-make sure you uncheck the 'display media tabs'
-go to the html editor view
-change data-studio-resizable from true to false
-swap back to normal view
>click on the embedded video and confirm that there
 are no drag handles on the corners, therefore
 preventing resizing

Change-Id: If64b15ea782a503055acd54e89ff70d0b67adda9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315542
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-11 20:38:25 +00:00
Yona Appletree 520b4e8620 Work around TinyMCE keyboard navigation bug
Adds a workaround for tinymce issue 8618, which causes strange
keyboard navigation behavior in the expanded toolbar.

flag=none
qa-risk=low

Closes MAT-541

Test plan:
  - Load an RCE with a small screen width
  - Expand the RCE toolbar
  - Put focus on the toolbar (Alt/opt+F10)
  - Use the tab and arrow keys to navigate the toolbar
  - Ensure that tab/shift+tab jumps between groups
    and arrow keys navigate between items

Change-Id: I4fd94ce6c5422bf18ffc48349525715aa88fa2c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315281
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-04-11 16:53:19 +00:00
Jenkins cf3d702514 [i18n] Update RCE translations.
Change-Id: Ia909a3a4630350e72e1365889603db8a471d531d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315557
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-11 04:50:17 +00:00
Jenkins c19eb8db96 [i18n] Update package translations
Change-Id: I131b438bc81a56660a21e31d32f88c946349e44a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315556
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-11 04:50:10 +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 aaf3ba9f37 remove obj-flatten package
it was only used once

test plan:
  - existing tests pass

flag=none

Change-Id: If6d5a8859622ab80ed5c0937d49f20e4b300d36c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315474
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-10 20:33:17 +00:00
Aaron Shafovaloff 2fdf0e692b move sanitize-url to ui/shared/util
test plan:
  - existing tests pass

flag=none

Change-Id: Icc42e7c5ccab58efd702615d232cc4f0801c10cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315479
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-10 20:22:33 +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 dc7704ca3c move prevent-default package to ui/shared/util
test plan:
  - All existing tests pass

flag=none

Change-Id: I61ba44f35ac506eb939af823c275357b945c5cd0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315472
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>
2023-04-10 17:40:23 +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 4eddb28fe6 Remove browser-sniffer package
Chips away at our dependence on old jQuery

Also: Remove IE and old-Safari detection

Test plan:
  - Load Canvas in Safari
    - document.body should have 'safari' className
  - Load Canvas in Chrome
    - document.body should have 'chrome' className
  - Load Canvas in Firefox
    - document.body should have 'ff' className

flag=none

Refs FOO-87

Change-Id: I27547cce9d6feaaa44c442590962476345229173
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315224
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2023-04-07 16:11:14 +00:00
Aaron Shafovaloff 91705094b9 Mitigate margin shift in Gradebook when using RTL
Test plan:
  - Change language to Arabic
  - Go to Gradebook
  - Scroll all the way to the total column
  - Verify that the margin is shifted to the right
    less than it previously was

flag=none

Refs EVAL-2396

Change-Id: I084707e87baeb941f6ef5f254ac61cb836172dc1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284758
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-06 19:45:35 +00:00
jake.oeding b9736daa19 move SMO button registration to it's own plugin
originally the button was only available when
the user has canvas media uploads enabled,
however, the studio media options tray should
be available regardless of that setting status

fixes MAT-1316
flag=rce_show_studio_media_options

test plan:
*pre-req: have your local canvas set up with studio lti
 pointing to my studio beta
-go to your account settings at:
 http://canvas.docker/accounts/<id>/settings#tab-settings
-enable 'Disable uploads to Canvas Media from the
 enhanced rich content editor'
-find an RCE and insert a studio embed
>confirm that you can still click on the iframe and launch
 the tray
-now disable the feature flag and try to launch the tray
 from your studio embedded iframe
>confirm that you can't launch the tray while the flag is
 disabled

qa risk: low

Change-Id: I05bc712c797701b0f193a316cd8e02443ce1704d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315237
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-06 15:01:21 +00:00
jake.oeding 7aa37798d6 mount size select appropriately
also fix same issue in a11y checker

fixes MAT-1317
flag=rce_show_studio_media_options

test plan:
-have your local set up to hit my studio LTI
-embed a video from studio, make sure you
 de-select 'display media tabs'
-switch the rce to fullscreen mode
-launch the studio options tray
>confirm you can interact with the size select
 and choose different values
-double check the select still works when not
 in fullscreen mode
-perform similar checks to confirm that select in
 a11y checker works in fullscreen and normal mode

Change-Id: Ifb22311668e48b1f56a03a47398e0e92d6897c95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315147
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: Allison Howell <allison.howell@instructure.com>
2023-04-06 14:33:49 +00:00
Jenkins 9039241d01 [i18n] Update RCE translations.
Change-Id: I63b873a48525f9221253a90a666ffce68647fd42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315318
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-06 04:49:26 +00:00
Jenkins 0ee957cbe4 [i18n] Update package translations
Change-Id: I1ab5217463de9ab32c7d8838136d28ade2ef9fd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315317
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-06 04:49:20 +00:00
Aaron Shafovaloff c21f969ca1 Removes strip-tags package
Test plan
  - Existing tests pass

flag=none

Change-Id: I3f036cc3ef65a7853b4c1e313e883b6c2c788f0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315235
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-04-05 16:31:07 +00:00
Yona Appletree 066621fcf8 Use sliding toolbar in RCE
Changes how the RCE toolbar expands to use the 'sliding' method
instead of 'floating' to improve UX and a11y.

flag=none

Closes MAT-1063

Test plan:
  - Load an RCE
  - At several different window widths, desktop, tablet, mobile:
  - Ensure the toolbar expands and is accessible both with mouse and
    keyboard
  - With the focus in the editor, try click other fields on the page
    and ensure focus moves correctly
  - With focus on another field, try opening the toolbar, ensure
    that behaves normally.
  - Do a quick sanity check of the equation editor and ensure
    toolbar buttons work right (focus goes to the editor)

Change-Id: I10b427a7078b4dca5b7833e775aa0ec526c6f7f7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314876
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: Allison Howell <allison.howell@instructure.com>
2023-04-04 23:18:14 +00:00
Jenkins 38d2516c98 [i18n] Update RCE translations.
Change-Id: If14868b684d37bf4a7b2ac7ca535cefae8285bc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315027
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-04 04:50:49 +00:00
Jenkins a980af44f7 [i18n] Update package translations
Change-Id: I562fff548df671c47a4dd2aa4e83b14a0dc860f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315026
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-04 04:50:44 +00:00
jake.oeding ecfdd2842d update studio media options tray copy
closes MAT-1309
flag=rce_show_studio_media_options

test plan:
-embed a studio video in the RCE via the lti tool
-make sure to uncheck 'display media tabs'
>open the tray and confirm it has the updated copy

qa risk: low

Change-Id: I778c426026024b0cd84f08606ef637540945012d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314988
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-03 20:16:22 +00:00
jake.oeding bf4dfc24bb stop running testcafe tests in builds
closes MAT-1308
flag=none

test plan:
-spec pass

qa risk: low

Change-Id: Id62887db99620c0ce0b93271614c6e499a5fdba0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314943
Reviewed-by: Charley Kline <ckline@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-04-03 18:33:30 +00:00
jake.oeding 24125dbf66 implement studio options tray
closes MAT-1253
flag=rce_show_studio_media_options

test plan:
*pre-req: need studio LTI set up
-embed a studio video in the RCE (make sure to
 uncheck 'display media tabs')
-launch the tray from your studio video
>expect it to not be the standard video options tray
 anymore; it should be tailored to studio
>play around with the sizing controls and link embedding,
 ensure they work as expected
 **Note: there's a bug with percentages so that sizing
   won't actually work and will be addressed separately
-change the boolean value for the resizable attribute
 on your video in the html editor
>re-launch the tray and confirm the size controls don't
 appear
-change the boolean value for the link conversion attribute
>re-launch the tray and confirm the dispaly options controls
 don't appear

Change-Id: I3e5b433bc265ad7466584ea85e692167a85d90aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314312
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-04-03 18:08:59 +00:00
Aaron Shafovaloff d91009ff9f Move round to ui/shared
Test plan:
  - Existing tests pass

flag=none

Change-Id: I47e30a7e373bf3f28029f2118df0471e889e348b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314751
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-03-30 23:13:46 +00:00
Aaron Shafovaloff c3cf2ba6fa Move str-pluralize to ui/shared
Test plan:
  - Existing tests pass

flag=none

Change-Id: I375337124b50c4fb15288928e7f0cd6193a5d366
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314767
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-03-30 23:00:33 +00:00
Aaron Shafovaloff 54e33a7e8e Move array-erase to ui/shared
Test plan:
  - Existing tests pass

flag=none

Change-Id: Ia2a87888b9a2c004c17a40fc6e14571326047cbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314749
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>
2023-03-30 21:36:54 +00:00
Aaron Shafovaloff c53647ff92 Move shortid package to ui/shared
Test plan:
  - Existing tests pass

flag=none

Change-Id: Ic01d0dc548b7126cb97caf9ea3923cc5b9585908
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314747
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: Charley Kline <ckline@instructure.com>
2023-03-30 21:27:54 +00:00
Aaron Shafovaloff 1de3a05341 Harden Gradebook dependencies
Removes some ts-nocheck

Test plan:
  - Existing tests pass

flag=none

Change-Id: Iaa7b53a62f11d15a61291bc9ab74f61acce64989
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314622
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@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>
2023-03-30 18:46:36 +00:00
Yona Appletree 1c720a4729 Clean up RCE content before loading editor
Adds logic to the RCE that, on initialization:

- converts absolute URLs referencing canvas to relative urls
- removes some extraneous data attributes
- handles URLs with query and hash correctly (Fixing MAT-1226, which
  originally caused this change to be reverted)

flag=none

Closes MAT-1070

Test plan:
  - Test MAT-1070:
    - create some RCE content with links and images to the
      current canvas, along with some links to other places, along
      with some elements that have 'data-api-endpoint'
      and 'data-api-returntype' attributes
    - save and reload the RCE
    - ensure that the URLs remain relative
    - ensure that the data attributes were removed
  - Ensure that MAT-1226 is fixed:
    - Use the RCE to create content with elements that reference the
      local canvas with a URL that has query parameters, such as LTI
      launches.
    - Save the content
    - Load the content again
    - Ensure the URLs are unmodified

Change-Id: I9eb20c81815989df16b0b697581c1257adc9674e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311170
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-03-29 22:23:54 +00:00
Davis Hyer c298abb6a6 ensure tests provide required uniqueId prop
flag=none

test plan:
  - specs pass

qa risk: low

Change-Id: I3e71cfc07cda94eeb41e85ff80fa3056454d57b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314525
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: Davis Hyer <dhyer@instructure.com>
2023-03-29 15:17:34 +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
Yona Appletree ee45bfb3bb Update RCE typescript to 5.0.2 to match canvas
Closes MAT-1295

flag=none
qa-risk=low

Test plan:
 - automated test pass (this is just a build change)
 - quick smoke test that the rce loads

Change-Id: I043056e09584af57513284958c30963515a285d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314321
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-28 19:14:50 +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
Jenkins c77ed5b997 [i18n] Update RCE translations.
Change-Id: I2ca3547f737191adee412fcec720ad952b168e52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314330
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-28 04:50:53 +00:00
Jenkins b6169da02c [i18n] Update package translations
Change-Id: Ie8e9ee7161b406cef0ce1720c274ffb0cc5eff56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314329
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-28 04:50:47 +00:00
Yona Appletree 80256cffee RCE: Add typescript checking pre-commit hook
- Adds support for packages/ to have their own pre-commit hooks.
- Adds a pre-commit-hook to the RCE that checks typescript

Fixes MAT-1290

flag=none
qa-risk=low

test plan:

- change a typescript file in canvas, stage, commit
  - ensure that tsc is run in the root of canvas, but not in the rce
- change a typescript file in packages/canvas-rce, stage, commit
  - ensure that tsc is run in packages/canvas-rce, but not in the root
- make a commit without changing typescript anywhere:
  - ensure no tsc is run

Change-Id: I997818a84bdcdac1d5e03680fc91d0a94a630b6e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314023
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-03-27 18:50:23 +00:00
jake.oeding a9fc759aeb Revert "reconfigure supported mathjax delimiters"
This reverts commit 72c4f226c5.

People rely on these delimiters and we broke lots of stuff

Change-Id: Ib201868168f831a75493f1b44b314f829df0c5cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314217
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-03-27 17:08:54 +00:00
Ed Schiebel a8c7966b7e Add CSS to RCE to fix sloppy css
I would lloved to have fixed this in the rules that caused the problem
in the first place, but it's hard to create a selector that's selective
enough.

see:
app/stylesheets/pages/quizzes/_quizzes.scss
  input[readonly] {

and:
app/stylesheets/bundles/assignments_edit.scss
  @include readonly-input;
}

for the offending rules

closes MAT-1181
flag=none

test plan:
  - edit an announcement
  - open the CanvasContentTray (e.g. course documents)
  - notice the "Course Files" "Documents" and "Date Added"
    styling
  - click the fullcreen button
  > expect the styling to remain the same

  - repeat editing a classic quiz
  - you can try any other page with an rce and it should be good too

Change-Id: Ia39f1a906230b302c1b1fa7be9849d38e92ab3a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-03-26 15:50:25 +00:00
Jenkins 67b229e456 [i18n] Update RCE translations.
Change-Id: I17ac2b15b57fe8cf4acb526669d3a8f8f6d16437
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314238
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-25 04:50:46 +00:00
Jenkins d7075b0d33 [i18n] Update package translations
Change-Id: Ibb7aef251d3041c8ba05c78574a0809c08ed733d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314237
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-25 04:50:41 +00:00
jake.oeding a1eb4f2c10 add studio media options toolbar
when the flag is enabled and studio sends the
appropriate attributes, clicking on studio
embedded media will now present the user with
a button that, when clicked, will launch a
tray for resizing, etc.

closes MAT-1272
flag=rce_show_studio_media_options

test plan:
*pre-req: have your dev instance of canvas working
 with my studio lti beta
1. with the flag off
   -navigate to an RCE and launch the studio lti
   -embed a video and uncheck 'display media tabs'
   >should be no option to launch the tray when
    clicking on the video in the RCE
2. with the flag on
   -embed a video and uncheck 'display media tabs'
   >should have the option to launch the studio
    media options tray now when clicking on the
    embedded media
3. with flag on again
   -embed another video but keep the 'display
    media tabs' checked (the default)
   >should again not have the option to launch
    the tray

qa risk: low

Change-Id: Ied0e85a57acba6c58c4ea52b95190ab0777e232f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314010
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-03-24 20:35:55 +00:00
Jenkins 76eed3e61e [i18n] Update RCE translations.
Change-Id: I7278566458732ec6dc45ec10f4107942f54f2e86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314154
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-24 04:50:31 +00:00
Jenkins 35728af44e [i18n] Update package translations
Change-Id: Ie402350172e00a5373066b9e5316a0d32c6ec9fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314153
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-24 04:50:26 +00:00
Ed Schiebel 02dc2c792e Include .ts and .tsx files in the i18n:extract step
closes MAT-1292
flag=none

test plan:
  - from packages/canvas-rce, run yarn i18n:extract
  - look at locales/en.json
  > expect to see strings from .ts and .tsx files in the output
    that were missing before

Change-Id: I721e797dbfe975cbac603a1a72ec6a599e75be7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314121
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-23 22:21:47 +00:00
Ed Schiebel 490a847c0c Sort MRU external tools by name, not id
closes MAT-1023
flag=none

test plan:
  - add some external apps but do it in a way that the tool
    names are not in alpha order
  - open the rce
  - select external tools, view all and open a tool
  - open another tool
  - open the external tools menu from the rce's toolbar
  > expect the MRU tools to be listed in alpha order
  - open the menubar > tools > Apps
  > expect the tools to be listed in alpha order

Change-Id: I3c444ea9810a24a9fc82fb88ab247d67c771000b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313612
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-23 20:08:26 +00:00
Ed Schiebel f190dcd1d4 package-translations update
The package-translations build would fail to commit the changes resulting
from `yarn wsrun installTranslations`. I believe this was caused by wsrun
starting multiple jobs in parallel and git would fail.

While I'm not 100% sure this completely fixes the issues we were having,
this makes it better.

refs MAT-1178
flag=none

test plan: n/a

Change-Id: I333a1de8fdf6dc97e69fa0072d343a2ac2d7b553
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314059
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-23 15:14:24 +00:00
Jenkins 6debafcea4 [i18n] Update package translations
Change-Id: I95965c6365c3651d99ef2ddf9d279e5e747e5dfb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-23 04:50:40 +00:00
Ed Schiebel f68f00338d Fix para that starts with a link and has text-indent
closes MAT-1286
flag=none

test plan:
  - in an rce, have some couple paragraphs of text
  - have an external link as the first word of one of the paragraphs
  - have a course link as the first word of a paragraph
  - have a course file link as the first word of a paragraph
  - using the html editor, set style="text-indent: 3em;" (or similar)
    on all the paragraphs
  - save
  > expect the external link icon and file download icon to be adjacent
    to their associated text link (and not indented an extra 3em)

Change-Id: I6ac496e87d301785ec8b0ce080b713bc7cfe3be4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313956
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-03-22 20:11:05 +00:00
jake.oeding 306fa86342 decorate studio media with resizing attributes
parse the studio LTI content item custom json blob
and decorate embedded media with the required data
attributes for resizing

closes MAT-1252
flag=rce_show_studio_media_options

test plan:
*pre-req: set up your local canvas to work with my
 beta studio instance
1. with the flag off
  -embed some studio media in the RCE
  -make sure you uncheck 'display media tabs'
  -look for the request to:
   courses/<id>/external_content/success/external_tool_dialog
  -confirm you're seeing the data passed from studio in
   the custom json
  >check the iframe in the html view of the RCE and confirm
   the data attributes are not added
2. with flag on
  -embed some studio media in the RCE
  -make sure that you do check 'display media tabs'
  -look for the request and confirm you aren't seeing the
   extra data passed in the custom json from studio
  >check the iframe has data attributes and values of 'false'
   for resizable and tray-enabled
3. again with flag on
  -embed studio media in the RCE once again
  -make sure that you 'uncheck display media tabs'
  -confirm the extra data is passed from studio in the custom
   field
  >check that the iframe has data attributes and values of 'true'
   for resizable and tray-enabled

qa risk: low

Change-Id: If7cccfe0aced18c732707a3efb892d9b9a1cb1dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313615
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>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
2023-03-22 19:22:43 +00:00
jake.oeding cddc38a2e8 NEE: add equilibrium button
closes MAT-1288
flag=none

test plan:
-find an RCE and open the NEE
-navigate to the arrows tab
>confirm there is an equilibrium button
-turn on VO
>confirm that you there's an announcment
 when you get to the equilibrium button
 explaining what it is

qa risk: low

Change-Id: I507a6749a1ddb5177dc42ddfedafdd28d824313a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313349
Reviewed-by: Deyvison Penha <deyvison.penha@instructure.com>
QA-Review: Deyvison Penha <deyvison.penha@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-22 14:50:03 +00:00
jake.oeding 6b00141b0e add support for iWork files in RCE and files UI
closes MAT-1269
flag=none

test plan:
*pre-req: might be helpful to have .docx, .pptx, and
.xlsx files also uploaded for referencing the icons
1. Files UI
    -navigate to the files interface and upload a
     .pages, .key, and .numbers file
    >look at the icons they receive in the file UI
     and confirm that you get a doc, ppt, and xls
     icon respectively
    -for each of those, launch the previewer and then
     click on the info button
    >confirm that 'Kind' aligns with the file type
2. Attachments model
    -open up a rails console
    -find the attachments corresponding to the files
     you uploaded
    >check the content_type on each and confirm it is
     the corresponding 'application/vnd.apple.*' type
3. RCE
     -find a page with an RCE
     -open the file upload modal
     >for a .pages, .key, and .numbers file, choose the
      file for upload and confirm it shows the correct
      icon type
     -now go to the course document insertion tray
     >confirm the files you've uploaded have the proper
      icon
     -switch from 'documents' to 'all'
     -navigate to the folder where you uploaded the files
      in the tree browser
     >confirm they have the appropriate icon

qa risk: low

Change-Id: Ie39b0070398982e10e7ef47d7b395450c0af2bc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313247
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: Allison Howell <allison.howell@instructure.com>
2023-03-21 15:46:27 +00:00
Ed Schiebel 59abb02ecf Move tinymce-a11y-checker to the rce's plugins dir
- because this is where it belongs.
- deleted all the translation files because translated strings
  will come from the rce now
- deleted demo.js because there's no demo any more

closes MAT-1282
flag=none

test plan:
  - in an rce with a11y violations
  - open the a11y checker
  > expect it to work
  > expect the violation to get the indicator box around it

Change-Id: I33858a9ed1e81aaaceca0a4861a884aebbabaae6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313578
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-21 14:36:22 +00:00
Ed Schiebel ec60fdbc87 Format a11y checker header to be compliant with canvas standards
closes MAT-1130
flag=none

test plan
  - have an a11y violation in rce content
  - open the a11y checker
  > expect the close button to be on the right
  > expect the tray to be a little wider so the title
    fits on 1 line (in English, it may wrap in other languages)

Change-Id: I88c43d7421390baf79e5e18ab44543fbe425240c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313340
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: Ed Schiebel <eschiebel@instructure.com>
2023-03-17 13:26:09 +00:00
Ed Schiebel 61919e61fe Fix bug with image and video options tray not closing
a thrown exception was interrupting the logic that closed
these trays when the RCE is closed.

closes MAT-1273
flag=none

test plan:
  - reply to a discussion
  - add an image
  - open the image options tray
  - click the Done button w/o closing the tray
  > expect the tray to close
  - there is a similar recreate scenario in the ticket
  - the same bug was fixed in the video options tray
    which you can try if you have notorious working

Change-Id: I9c574e631b86ae3cbcc083ab24dfc7aae03697e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313367
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: Ed Schiebel <eschiebel@instructure.com>
2023-03-17 12:47:05 +00:00
Ed Schiebel 39ce7c5429 commit rce translations
flag=none
test plan: n/a

Change-Id: I143320cc694700b08fedb7b72ce9cacdfa5dbb94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313442
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: Ed Schiebel <eschiebel@instructure.com>
2023-03-16 17:24:48 +00:00
Jenkins 677c06935e [i18n] Update package translations
Change-Id: Iac535ec27990f98d4c5be524f943810e5fa25dc2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313420
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-16 04:50:48 +00:00
Ed Schiebel df5c55e83b Merge tinymce-a11y-checker's translations into the rce
closes MAT-1281
flag=none

This happens in 2 places
1. packages/translations/lib is where the string tables sent to and
   received from trnsifex go. We merge the strings in here so they
   are part of the next package we sent out
2. packages/canvas-rce/src/translations are where the package-translations
   build puts the result of canvas' translation process and is the source
   for the rce build process. We merge the strings in here so we don't
   have to wait for another translation cycle to test

test plan
  - change your user's language
  - create some content with a11y violations
  - open the a11y checker
  > expect the tray to be translated

We should eventually make sure the translations make the round-trip
as part of the packge-translations build, but that can't be done
until this is merged.

Change-Id: I0e7ca7554fb153142c5bf890c2d3397cccdca25a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313280
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-15 22:41:46 +00:00
Yona Appletree 85394c5e39 Improve RCE loading placeholders
New placeholders:

- Are nicely styled
- Don't allow user interaction
- Have a loading spinner
- Include the filename of the object being inserted
- Are size-restricted to nicely fit in the editor

Closes MAT-1262

flag=rce_improved_placeholders

Test plan:
  - With rce_improved_placeholders enabled:
    - For these object types:
      - Image, Video File, Audio File, Other File
    - And these insertion methods:
      - With copy and paste
      - By dragging from filesystem
      - From the Upload dialog:
        - from filesystem
        - from URL
      - From the Course/User dialogs
    - Ensure that insertion works, and that the placeholder looks nice
    - Realistically, a spot check of the above cases is sufficient.
  - With the flag disable:
    - Spot check that inserting content into the RCE works

Change-Id: I9fdd8c8be9dae2c3374105179c6a8dbd778415dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312363
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
2023-03-15 16:05:11 +00:00
Davis Hyer c1b0c9f32f provide required toggleMissing prop in planner specs
flag=none

test plan:
  - tests pass

qa risk: low

Change-Id: I29b77bd6dbf2be787c69bfd54769611a97577731
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313308
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2023-03-15 15:29:49 +00:00
Davis Hyer 4effafe372 provide required deregisterAnimatable prop in planner tests
flag=none

test plan:
  - tests pass

qa risk: low

Change-Id: I462a41538b54d15b6173a8d844e62350bfbaac7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313307
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2023-03-15 15:29:06 +00:00
jake.oeding 3fa3072bcd skip flakey spec blowing up post merge builds
flag=none

test plan:
-specs pass

Change-Id: I586b8c498c462d1a65445a7cfce1b49ca5cfa124
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313296
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-14 22:01:55 +00:00
jake.oeding 0c8df4d7af add studio media options FF
closes MAT-1251
flag=rce_show_studio_media_options

test plan:
-specs pass
-check the ff value is propagated correctly
 to RCEGlobals if you're really curious

Change-Id: Id88daed220e2a064ce9302aebea40fd4a2204672
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313278
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-03-14 20:48:39 +00:00
Ed Schiebel 94014d3648 build the RCE with the internal a11y checker
update the merged tinymce-a11y-checker files so that the RCE
build with them as the new source for the a11y checker

closes MAT-528
flag=none

test plan: the a11y checker still works

Change-Id: I33618306f474b95ee095d37acacaa5253413c2f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313131
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-14 19:35:47 +00:00
Ed Schiebel b5d61991fc Commit new RCE translations
flag=none

test plan: n/a

Change-Id: Icdb67d7c4021a42def1ff157ad824dd4d495bebc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313144
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-03-13 22:11:36 +00:00
Jenkins d77dbf14f8 [i18n] Update package translations
Change-Id: Ia927489702e17864aed3f0984e7e93f46917fda3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313046
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-12 04:50:57 +00:00
Jenkins 45a19f0663 [i18n] Update package translations
Change-Id: I4f98041c9f8cd0f06a18c9a28f8e8e720d3a19d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313034
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-11 04:51:28 +00:00
jake.oeding d56440f617 keep NEE advanced preview working when ELT is on
closes MAT-1173
flag=explicit_latex_typesetting

test plan:
1. confirm we didn't break anything when flag
   is off
    -create a page with some math on it
    >save and confirm that mathjax processes the
     math
2. test the new behavior
    -enable the flag
    -create a new page with title "\(\LaTeX\)"
    -edit the page and open the NEE
    -switch to advanced mode
    >enter some math and make sure the preview
     gets processed by mathjax
    >confirm that your page title isn't processed
     by mathjax

Change-Id: Ic73186327a4f62bc0a6ccf73b4b6a80b3297e317
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312835
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-03-10 21:04:23 +00:00
Roland Beres 0cbef45e33 Prevent preview expand's click event propagation
It caused trouble in new quizzes where the parent reacts to click event

flag=none
fixes: QUIZ-10578

Test plan:
  - Create a New Quiz
  - Upload a document
  - Click on the link, select Link Options
  - Select Preview Inline option along with the Extend preview by default options
  - Try to click outside of the input area in the quiz, like modify the answers
  - Note that the input switches to renderer and there is no error

Change-Id: Ib711a75fec1c14063a4ed5c450d495265867c409
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311547
Reviewed-by: Rajmund Csehil <rajmund.csehil@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Rajmund Csehil <rajmund.csehil@instructure.com>
Product-Review: Rajmund Csehil <rajmund.csehil@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-10 19:36:10 +00:00
Ed Schiebel 938036e443 Replace $(npm bin)/command with npx command (#139)
because my version of npm doesn't have `npm  bin`
2023-03-10 14:03:29 -05:00
Jacob DeWar 9da682a35f Fix bug where checker could be opened twice and delete nodes (#138)
* Fix bug where checker could be opened twice and delete nodes

Prevents opening the checker while it is already open, which could cause nodes to be deleted

closes MAT-1106

Test Plan:
- Open an RCE and create content that causes an a11y violation
- Click the a11y checker icon to open the a11y checker
- Check the box to apply formatting changes
- Click the a11y checker icon to Open the a11y checker again (without closing it)
- Verify RCE content is not changed, RCE can be edited and used as normal
- Verify a11y checker can be opened again, used as normal

* Update version and changelog

* Update CHANGELOG for real
2023-03-10 14:03:29 -05:00
Ed Schiebel 01aedf4c3f Update how violation highlight is rendered (#137)
* Update how violation highlight is rendered

- replace requestAnimationFrame approach with vanilla css. This
  has the benefit of being simpler and handling multi-line text
  much better.
- bump the version number

closes MAT-1134

* bump package version

and update changelog

* update package version

* Updates in response to review comments.

* Update indicate.js

fix a typo
2023-03-10 14:03:29 -05:00
Ed Schiebel 5fb862a150 Update to cope with the RCE in native browser fullscreen (#126)
* Update to cope with the RCE in native browser fullscreen

The primary change is to checker.js where it forwards the mountNode
prop to the Tray. This gets the a11y checker on top of the RCE
while in fullscreen.
Adjacent to that we position the indicator so it's correct and
visible whether in fullscreen or not.

Also fixed a bug where adjust() kept tracking indicators even
after they were removed from the DOM, and throttled the work
adjust does to just once every 10ms.

Moved the es build output from lib/modules to es and added
jest.config.js to ignore anything in either directory.

Updated the yarn "test" script so you can now execute
yarn test path/to/test/file.js
and jest will execute just the given file.

Added a yarn "test:debug" to facilitate debugging specs.

Updated the version number and changelog in preparation for
publishing the updates.

closes MAT-1115

* Update to cope with the RCE in native browser fullscreen

The primary change is to checker.js where it forwards the mountNode
prop to the Tray. This gets the a11y checker on top of the RCE
while in fullscreen.
Adjacent to that we position the indicator so it's correct and
visible whether in fullscreen or not.

Also fixed a bug where adjust() kept tracking indicators even
after they were removed from the DOM, and throttled the work
adjust does to just once every 10ms.

Moved the es build output from lib/modules to es and added
jest.config.js to ignore anything in either directory.

Updated the yarn "test" script so you can now execute
yarn test path/to/test/file.js
and jest will execute just the given file.

Added a yarn "test:debug" to facilitate debugging specs.

Updated the version number and changelog in preparation for
publishing the updates.

closes MAT-1115

* Update to cope with the RCE in native browser fullscreen

The primary change is to checker.js where it forwards the mountNode
prop to the Tray. This gets the a11y checker on top of the RCE
while in fullscreen.
Adjacent to that we position the indicator so it's correct and
visible whether in fullscreen or not.

Also fixed a bug where adjust() kept tracking indicators even
after they were removed from the DOM, and throttled the work
adjust does to just once every 10ms.

Moved the es build output from lib/modules to es and added
jest.config.js to ignore anything in either directory.

Updated the yarn "test" script so you can now execute
yarn test path/to/test/file.js
and jest will execute just the given file.

Added a yarn "test:debug" to facilitate debugging specs.

Updated the version number and changelog in preparation for
publishing the updates.

closes MAT-1115
2023-03-10 14:03:29 -05:00
Kevin Bell 57dc0cf96e Create code of conduct (#125) 2023-03-10 14:03:29 -05:00
Jake Oeding f9f3b23f0a update dependencies and bump version (#123) 2023-03-10 14:03:29 -05:00
Jake Oeding 2ad40beec1 New rule for flagging H1s (#122)
* add new rule that flags H1 headings

can be disabled by passing in the appropriate
configuration

* bump version to 4.1.0
2023-03-10 14:03:29 -05:00
Jake Oeding f16a7045d8 Prep for MAT-823 (#120)
* remove TinyMCE v4 support

* change additional_rules to additionalRules

* fix bug preventing config from being applied

openAccessibilityChecker command didn't propagate config
and other Checker props/args, thus providing an inconsistent
experience when using a non-default setup

* Bump version to 4.0.0
2023-03-10 14:03:28 -05:00
Weston Dransfield 48756b3252 Add a changelog (#117) 2023-03-10 14:03:28 -05:00
Juan Chavez fcca04350a Adding Vietnamese translations and dump version. 2023-03-10 14:03:28 -05:00
Weston Dransfield 801fd83e51 Make the max heading length 120 chars (#112)
* Make the max heading length 120 chars

Change-Id: Idbd5fc55871c32e2edd9ca17fca23a43d951928a

* Bump version

Change-Id: Ib856849be168b2408ac02bb84490609e727b2053
2023-03-10 14:03:28 -05:00
Jake Oeding bf10f81753 Version Bump 3.3.3 (#111)
* limit ordered list rule violation flagging

stop flagging arbitrary length text at the
beginning of a paragraph followed by a
period or closing parenthesis as a rule
violation; limit flags to items of four
characters or less

fixes MAT-531
flag=none

test plan:
-open up the RCE
-type 5 characters of the same class (lowercase,
 uppercase, or digits) followed by a period or
 closing parenthesis, a space, and then arbitrary
 text
-observe this is not flagged by the a11y checker
-remove one of the 5 initial characters
-observe this is now flagged by the a11y checker

* correct test description

* Version bump 3.3.3
2023-03-10 14:03:28 -05:00
Jon Scheiding b588d6bb80 Version bump 3.3.2 (#109)
flag=none
    refs MAT-533

Co-authored-by: Jon Scheiding <jon.scheiding@instructure.com>
2023-03-10 14:03:28 -05:00
Jon Scheiding bdc1ee40cd Add translations for es-ES and th (#108)
flag=none
refs MAT-533

Test Prep
- run `yarn build` within this repo
- copy or symlink this repo to `canvas-lms/node_modules/tinymce-a11y-checker`
  - If you're using mutagen, you may have to down/up everything
    to sync the node_modules changes into your containers
- restart your webpack container to ensure it rebuilds the vendor bundle

Test Plan
- Change your Canvas language to Thai (ไทย)
- Navigate to an RCE and launch the a11y checker
- Ensure that the message is in Thai
- Repeat above steps with language Castilian Spanish (Español (españa))

Co-authored-by: Jon Scheiding <jon.scheiding@instructure.com>
2023-03-10 14:03:28 -05:00
Weston Dransfield 2e9dd8504c Bump version 2023-03-10 14:03:28 -05:00
Juan Chavez 3fc9b31c31 Version 3.3.0 bump 2023-03-10 14:03:28 -05:00
gpenaranda021 7e8b382b87 Modify pattern for filename to skip whitespaces (#100)
fixes MAT-464
flag=none

Test plan:
- Navigate to an RCE instance
- Upload an image (jpg, png mainly) and assign an alt attribute
as a filename with spaces (i.e this image.jpg)
- After upload and preview, click the accesibility checker.
It must warn of a filename not allowed as an alt attribute
- repeat the process with a different alt value, this time
use a normal sentence. Click the accesibility checker again.
this time there must be no alerts or messages
2023-03-10 14:03:28 -05:00
Juan Chavez 83eea8366a 3.2.0 version bump 2023-03-10 14:03:28 -05:00
Juan Chavez 04ab985dab Adds command to support getting editor a11y errors without UI 2023-03-10 14:03:28 -05:00
Juan Chávez b6c3a8220d 3.1.0 version bump (#96) 2023-03-10 14:03:28 -05:00
Juan Chávez d779bb018d Removing data-decorative tag usage (#95) 2023-03-10 14:03:28 -05:00
Guilherme Baron a7a66fb3cd 3.0.0 version bump (#92) 2023-03-10 14:03:28 -05:00
Guilherme Baron 0b2c0012f1 Upgrade to instructure-ui@7 and react@16 (#91)
- upgrade instructure-ui components to v7
- switch from `Select` to `SimpleSelect`
- remove axios/moxios as they were not used anywhere
- remove support to react v0.14 and v15
2023-03-10 14:03:28 -05:00
Guilherme Baron 8a2d00f1b8 Add "decorative" option to img-alt-filename rule (#90)
* add decorative option to img-alt-filename rule

* format with prettier

* set role="presentation" for decorative images
2023-03-10 14:03:28 -05:00
Guilherme Baron da5f413512 Bring code up to date with npm 3.0.0-rc2 version (#88)
* Bring code up to date with npm 3.0.0-rc2 version

This change aims to reflect the changes made on the npm 3.0.0-rc1 and
3.0.0-rc2 published versions.

Note: the cypress tests are disabled and the demo app is not building
properly because RCE still not fully independent from canvas code.

* downgrade to canvas-rce@5.0.3 since none of them are working

* downgrade package version while we don't publish it

* update version to match npm
2023-03-10 14:03:28 -05:00
Clay Diffrient 55b3e7169d v2.3.0 (#66)
* v2.3.0

* Configure caching properly for travis
2023-03-10 14:03:28 -05:00
Ed Schiebel 914f9a5001 Do not automatically focus the editor on closing a11y checker
This seemed like a good idea at the time, but makes it impossible
to implement any other desired focus handling scheme (like returning
focus to the button that launched the a11y checker).
2023-03-10 14:03:28 -05:00
Ed Schiebel 915c828b1b Improve focus management 2 (#65)
* Improve focus managemenet

This makes three changes to help improve focus management
1. if the editor associated with an a11y checker is removed, close the checker
2. when the checker is closed, focus the associated editor
3. add the data-mce-checker attribute to the checker's Tray component.
   Consuming applications may use this to detect that even though focus
   may have left the editor, it is still within a component that can be
   considered a part of the editor's ecosystem.
2023-03-10 14:03:28 -05:00
Clay Diffrient 087d126361 Force node version on travis to 12.4
It seems that jest --coverage never exits when run
on node 12.5.0 so we'll pin to this working version for
now and re-evaluate in the future

Test Plan:
  - Tests pass
2023-03-10 14:03:28 -05:00
Clay Diffrient 0dcdc9005e Update Dockerfile to Node 10
The previous image for Node 8 was removed.

Test Plan:
  - Build dockerfile
  - Everything runs and works like normal
2023-03-10 14:03:28 -05:00
jwillesen 37d04e0477 fix done callback checking for tinymce version 5 2023-03-10 14:03:28 -05:00
Brent Burgoyne 720d0f8af4 fix broken multi editor support
Change-Id: I7799cf334d79c362fbfee13694e0350a57159a95
2023-03-10 14:03:28 -05:00
Clay Diffrient 1ac87db778 update locales with new translations (#53) 2023-03-10 14:03:28 -05:00
Brent Burgoyne 0a8955ca85 make the demo match cypress spec expectations
Change-Id: I710d35d4fce0a7e44e2b3aa168e8896111eea4ce
2023-03-10 14:03:28 -05:00
Brent Burgoyne 40f3823b74 base img alt filename rule on regex pattern
closes CORE-1747

test plan:
- run the demo
- the img alt filename example should still fail
- it should be fixable by makeing it not a filename

Change-Id: I47a0cc3346936ce50ff66ef5e09364c929071412
2023-03-10 14:03:28 -05:00
Brent Burgoyne 952b891850 v2.1.0
Change-Id: Ida8290c05464632bdaf536c1d551fc8247fb46db
2023-03-10 14:03:28 -05:00
Brent Burgoyne f0ec9e7e13 fix formatting issue
Change-Id: I925c0ccaf4e7bff713762f7cf70022981d185951
2023-03-10 14:03:28 -05:00
Brent Burgoyne 32596d2700 move focus to close button after applying a fix
closes CORE-2847

test plan:
- open the demo
- open the a11y checker tray
- fix an issue
- focus should move back to the close button

Change-Id: I17e6263952c43dc48923f4914e613ac2091bb6b9
2023-03-10 14:03:28 -05:00
Ubuntu c55bbb2c52 update locales with new translations 2023-03-10 14:03:28 -05:00
Ryan Shaw ae46d33f31 2.0.0 2023-03-10 14:03:28 -05:00
Ryan Shaw 20ac366ed2 make it work with tinyMCE 5
tinyMCE 5.x changed some method namespaces. See:
https://www.tiny.cloud/docs/migration-from-4x/#changedmethods


This will work with both tinymce 4 and 5

We can remove the old codepath when everything is on 5.x
2023-03-10 14:03:28 -05:00
Ryan Shaw 164715ae93 Upgrade to babel 7 & ui-babel-preset 2023-03-10 14:03:28 -05:00
Willian Tenfen fc26df3958 Don't combine words when merging links (#11)
AdjacentLinks: Do not remove spaces between words
when combining links.
2023-03-10 14:03:28 -05:00
Clay Diffrient 85b36b47a2 v1.11.0 2023-03-10 14:03:28 -05:00
Clay Diffrient 7e11152300 Make links for more information underlined
This also updates using InstUI to 5.37

closes CORE-2097

Test Plan:
  - yarn start
  - Run the a11y checker
  - Click the (?)
  - The "Learn more about..." link should be underlined
2023-03-10 14:03:28 -05:00
Clay Diffrient b166e07306 Update start-sever-and-test to 1.7.11
This removes flatmap-stream as a dependency
2023-03-10 14:03:28 -05:00
Clay Diffrient 035bd7dc9f v1.10.0 2023-03-10 14:03:28 -05:00
Clay Diffrient 8e945a6ee2 Add ids and linkText
This makes it so we can uniquely identify each rule within the
code.  It also provides a mechanism for saying more detailed
text for the "Learn more" links.

refs CORE-2115

Test Plan:
  - Open up the dev environment
  - Run the a11y checker
  - You should see errors show up.
  - Click the (?) hint button
  - The tooltip should contain a link for most rules
    that is descriptive (e.g, learn more about xyz)
2023-03-10 14:03:28 -05:00
Clay Diffrient 4bfd31bcf6 1.9.2 (#42)
closes CORE-2101
2023-03-10 14:03:28 -05:00
Clay Diffrient ead872e293 Enhance support for Internet Explorer 11 (#41)
This makes the development "demo" environment work properly in
IE11.  This is probably only useful for testing stuff out in that
environment.

It also fixes an issue that only cropped up in IE11 where a forEach
was being called on a NodeList improperly.

refs CORE-1972

Test Plan:
  - yarn && yarn start
  - Open the up the demo environment in IE11
  - Run the a11y checker, it should work.
2023-03-10 14:03:28 -05:00
Ryan Shaw dcae7f2ac7 1.9.1 2023-03-10 14:03:28 -05:00
Ryan Shaw 4eb9bffbd8 Handle react 16’s async rendering
this is a workaround for react 16 since ReactDOM.render is not 
guaranteed to return the instance synchronously (especially if called
within another component's lifecycle method eg: componentDidMount). see:
https://github.com/facebook/react/issues/10309#issuecomment-318434635

Test plan:
* when rendered into canvas-lms using react16, it shouldn’t throw errors
2023-03-10 14:03:28 -05:00
Clay Diffrient 2ea11fa20f Make text node check more robust (#38)
* Make text node check more robust

closes CORE-1825

Test Plan:
  - Add something like:
    `<h2 style="color: #ffffff;"><span style="background: #000000;">[Course Title Here]</span></h2>`
    to the a11y checker tinymce instance
  - It should not be flagged as an issue when the a11y checker runs

* Fix formating errors
2023-03-10 14:03:28 -05:00
Clay Diffrient 762bf4b858 Fix z-index to be the right key 2023-03-10 14:03:28 -05:00
Ryan Shaw 94c056a688 1.9.0 2023-03-10 14:03:28 -05:00
Ryan Shaw 52ab194834 upgrade to canvas-rce 4.0.1 & allow react 16 (#35) 2023-03-10 14:03:28 -05:00