Refs FOO-3190
Refs FOO-3708
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]
[pin-commit-multiple_root_accounts=03b5f961bbaa28af3d43b0a6a2ab072654cc6468]
Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.
NOTE:
This is an amalgam of g/314136 and g/326557 which will get abandoned
once this passes Jenkins and is merged.
It builds against the commit of MRA that will have to merge
concurrently with this.
Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.
Test plan:
* cross your fingers
* (this will need some extensive review before merging)
Change-Id: I860c3dc04d34237e32aeaa138f6c377a016ceeae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Also removes UploadDropZone component (plus its spec file and css
resources) since it was only used when the flag was disabled.
closes LF-272
flag = none
Test plan:
- Go to /files
- Drag a file from your computer into the files list
- Expect it to be uploaded
- Drag the same file again
- In the modal that appears (since you're uploading a duplicate file),
expect to see a "Skip" button
Change-Id: I325f69fbaad0a40b411fa94189bfb89f1e267055
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318334
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Update some eslint packages removing the need for
some eslint-disable directives.
Changed react/no-unknown-property to warning since
we have several instances of it already in the
codebase.
Refs CFA-5
flag=none
Test plan:
- Automated tests pass
Change-Id: I4967d53477de7c4effe8861ee71e735be33f6b14
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317894
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>
this removes annoyances when decaffeinating files
test plan:
- all tests pass
flag=none
Change-Id: Ie3af0faf13d64a4701bb917fbcae29cb10474df1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315484
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LS-3841
flag = none
Test plan: specs pass
Change-Id: I6f47afe056909d6b6e0803c6c9385e839ffadccf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314488
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Also uses triple-=equal for `.length === 0` checks
I do not use triple-equal for comparison with empty strings
or variables on the right hand in this commit.
This improves type safety and reduces eslint warnings.
Test plan:
- All existing tests pass
flag=none
Change-Id: I38a9dafa8a45cab28cfb04217325802695448939
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302645
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
test plan:
- all tests pass
flag=none
Change-Id: I50e858039081b8bd0c5a497cdf9e697710a54dc5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287364
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
stops adding sort order message to flash_screenreader_holder
every time ColumnHeaders is rendered. now only adds when
user changes the sort selection
fixes MAT-653
flag=none
test plan:
- go to courses/:id/files
> observe in the DOM that there is no message
added to the flash_screenreader_holder div
- enable VoiceOver
- sort by one of the columns, for instance, by
name descending
> observe that a single message reflecting the chosen
sort is added to the flash_screenreader_holder
- force the ColumnHeaders to re-render multiple times
by navigating back and forth between them and the
file tree several times rapidly with kbo navigation
> observe in the DOM that no new sort messages are
added into the flash_screenreader_holder
> throughout the steps, listen and hear that VO
does not bombard you with sort messages
Change-Id: I82fe7b677f7b37d42837140b0d64c023c7e4e5dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286412
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
refs FOO-2696
flag = none
see the related patch for javascripts for context, this is the same but
for coffeescripts
Change-Id: Ia672b95445ee5c1a4db28f625f18e65fdf60ce0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286663
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-2696
flag = none
applied by the codemod found here: https://github.com/instructure/canvas-i18n-loader-rewrite
this won't pass in isolation, see the mega patch that cherry-picks them
all for the status
~ test plan ~
do a cursory glance over the changes and verify we didn't miss anything
Change-Id: I9bc7dad55c7aba9053ab69c9bb477cb4ee3e78bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286661
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
move from QUnit to Jest. prep for
another patch
refs MAT-653
flag=none
test plan:
-specs pass
Change-Id: I6be413f687359c3295fabdc03f07173e46a29cb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286598
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>
renames 'Move' option to 'Move To...' for
consistency and only populates the screen reader
warning when user has permission to move files
[skip-crystalball]
fixes MAT-651
flag=none
test plan:
-prerequisite: have a course with a teacher and
student with default permissions and a
published file
-do the following for the teacher and for the
student:
1. navigate to /courses/:id/files
2. check for existence/abscence of warning
message in the DOM
3. now search for your published file in the
'search for files...' input
4. again, check for the existence/abscence of
warning message in the DOM
-the warning should appear for teachers (who
have the ability to move files by default)
-the warning should not appear for students
(who by default do not have the ability to
move files)
Change-Id: I3dac4b853400105f7def6c431aa8074761b23a75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286501
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gonzalo Penaranda <gonzalo.penaranda@instructure.com>
QA-Review: Gonzalo Penaranda <gonzalo.penaranda@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
renames 'Move' option to 'Move To...' for
consistency and only populates the screen reader
warning when user has permission to move files
fixes MAT-651
flag=none
test plan:
-prerequisite: have a course with a teacher and
student with default permissions and a
published file
-do the following for the teacher and for the
student:
1. navigate to /courses/:id/files
2. check for existence/abscence of warning
message in the DOM
3. now search for your published file in the
'search for files...' input
4. again, check for the existence/abscence of
warning message in the DOM
-the warning should appear for teachers (who
have the ability to move files by default)
-the warning should not appear for students
(who by default do not have the ability to
move files)
Change-Id: Ia210d3df488c9d3cca8b946c6747840cd9bc30e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286353
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gonzalo Penaranda <gonzalo.penaranda@instructure.com>
QA-Review: Gonzalo Penaranda <gonzalo.penaranda@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
refs FOO-2645
flag = none
this applies the first two codemods: updatePropNames and updateV7Props.
We can still remain on v7 at this point.
To reproduce this:
- clone github.com/instructure/instructure-ui
- activate node 14 and run "yarn install"
- apply the first mod with this command:
npx jscodeshift \
-t packages/ui-codemods/lib/updatePropNames.ts \
--config=packages/instui-config/codemod-configs/v7/propNames.config.json\
~/src/canvas-lms/ui
- apply the second mod with this command:
npx jscodeshift \
-t packages/ui-codemods/lib/updateV7Props.ts \
-fileName updateV7PropsWarnings.txt \
~/src/canvas-lms/ui
substitute ~/src/canvas-lms with the path to ur canvas installation
~ TEST PLAN ~
~~~~~~~~~
not sure if it's reasonable to be spot-checking all the affected sites,
we should be able to rely on the test suite for that, but it won't hurt
to look and click through things
Change-Id: Ie120b773550633f418fae5635d1943083a65005e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
This change causes the files UI to wait
for all DOM content to be loaded before
initializing the router and listening
for LTI messages
flag=none
Test Plan:
Navigate to /courses/:id/files and verify
the Files UI loads and functions as before
Change-Id: Iee3b5579db889f455353184fd6c39a2716d42003
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280800
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes MAT-504
flag=none
Test Plan:
- Enable JAWS or NVDA before accessing Canvas
- Go to Courses > Files. Upload a new file if
there isn't any
- To locate the VO(VoiceOver) Assistant on the
table in order to describe every element of the
file upload table, click on the link with the
title of the course, on the left side of the
file upload table. Then click on 'name' header
- Once located, push Up or Down buttons on the keyboard
to navigate through the descriptions of every element
with the VO. The descriptions of the headers now relate
with their corresponding elements on the table
ADDITIONAL NOTES:
- The test was done on Chrome and Mozilla Firefox and
using NVDA. It should work either with NVDA or JAWS.
Change-Id: Iade3344d6d2dab14899892d7954917cd03a646f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279590
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
fixes MAT-486
flag=none
test plan:
- In a course add a number of files.
- Navigate to course files page.
- Select the three dots in a file row and
observe the available options (Download, Send,
Copy, Rename, etc.).
- Search the same file using search bar.
- Select three dots again.
- Verify that the same options are available.
Change-Id: I2adde2596cf97f50eb296d7501855fef01bfcf1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
refs LS-2763
flag = none
Test plan:
- Specs pass and Canvas still works; check these areas in particular:
- Files page direct share
- Syllabus immersive reader
- Wiki page immersive reader
- K5 schedule pages and Important Info pages
- Modules page
Change-Id: I2585e2479938a44237ef0cc859baa6cc8e6e8651
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276179
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
The code for handling Send To and Copy To are in the
courses_controller, so let's only show the menuitems
when in course Files and not user files (or group files,
if that's a thing).
Also converted the QUnit specs to jest.
Changed ItemCog string refs (which were only used in specs
except for 1 case) to data-testid
closes LS-2724
flag=none
test plan:
- Send To... and Copy To... work as expected in course files
- Neither menu item is available in user files
(you find the menu in the kabob menu to the right of a file
on the files page)
Change-Id: I89f3d3706645c183381523d07956e692069dc0cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275792
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
refs INTEROP-7086
flag=none
why:
* to prepare for further refactoring, including the deletion of
handleLtiPostMessage
test plan:
* webpack build works
* specs work
Change-Id: Ia75763f84dafa51cf2c4203d7d9032e37e83aa5c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
closes MAT-187
flag=none
Test Plan
- Have two courses.
- Have two teachers, one enrolled in the first course and the other
enrolled in the second course.
- Create a course file at the root level in the first course.
- Create a course file nested in a folder in the first course.
- Send the two files from the first course to the second teacher.
- Verify that the content shares appear for the second teacher.
- Verify that the content shares can be previewed with a Common
Cartridge viewer.
- Verify that the content shares can be imported into the second
course, with the folder hierarchy preserved.
- Delete the two imported files from the second course.
- Copy the two files from the first course to the second course.
- Verify that the two files are imported into the second course, with
the file hierarchy preserved.
Change-Id: I8fa74f0fe175498f2fb73583ae06181356b684a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270708
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Gary Mei <gmei@instructure.com>
Creates a helper in the application_controller called `k5_user?` which
returns true iff the user is associated with any k5 accounts. Also sets
a JS_ENV variable called :K5_USER with the value of ks_user?. Renames
other JS_ENV variables to :K5_HOMEROOM_COURSE and :K5_SUBJECT_COURSE for
clarity. Also removes references to 'k5_mode', replacing with calls to
k5_user? or calls on the Course model for clarity.
use_k5? is cached since it is frequently referenced. The cache key is
cleared for each user in the account when k5 mode is toggled by an admin
or when enrollments are adjusted. It is also set to expire after 1 hour,
which might not be necessary. Cache is not invalidated when the k5 flag
is toggled since the flag is being removed.
The user dashboard and global nav states are dependent on use_k5? Shows
`Subjects` instead of `Courses` and `Homeroom` instead of `Dashboard` in
the global nav when k5 is on. Also filters homeroom courses out of
course list when k5 is on.
closes LS-1827
flag=canvas_for_elementary
[fsc-max-nodes=20]
[fsc-timeout=40]
Test plan:
- Login as a teacher enrolled in at least one course in a k5 account
- Expect to see k5 dashboard
- Expect to see `Subjects` and `Homeroom` (with home icon) in the
global nav (and in the mobile global nav)
- Toggle the courses/subjects tray in global nav and expect to see
only references to Subjects
- Open /courses/ and expect the page heading to be `Subjects`
- Browse through the course and expect it to look normal (w/ Balsamiq)
- Switch to a student and expect the above to be true, plus the courses
list should not include homeroom courses
- Disable k5 for the account and return to teacher or student
- Expect to immediately see classic canvas nav, dashboard, and courses
again
- Test caching by placing a log statement (i.e.
`p "K5 Cache: uncached"`) in ApplicationController#uncached_use_k5?
- Run `redis-cli FLUSHDB`
- Navigate around canvas; expect to see the log statement only once in
the logs until toggling k5 mode or adding the first k5 course to a
user
Change-Id: Iec970c939b976d10eee13d40b7bf68f601d8178e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
This change removes the sidebar and breadcrumbs from show and index
actions in course controllers to simplify the views.
fixes LS-2063
flag=canvas_for_elementary
test plan:
- Enable Canvas for Elementary for the account
- Navigate to the course settings page
- Navigate to all pages listed in the left nav
- Verify the left nav and breadcrumbs are missing on all course pages for
students but not for teachers
Change-Id: Id8e448ee2b3bd981f4376de5cf827d728da15763
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>