This change aims to fix tree-shaking issues introduced in InstUI 7 by
the addition of `"type": "module"` to the packages' package.json
files. It updates the following major versions to their latest minor /
patch versions:
* 7 -> 7.4.4
* 6 -> 6.27.0
It also updates @instructure/ui-icons from v6 to v7, since nothing has
changed between those versions except the addition of new icons and a
slight tweak to the "add" and "x" icons to make them more closely
match product designs.
It also updates @babel/core, @babel/runtime, and
@babel/runtime-corejs3 to latest (7.13.10) to fix this babel issue:
https://github.com/babel/babel/issues/12854.
The dependency changes also shuffled around the webpack build a bit--
the assignment_edit bundle is now (slightly) over the max asset size
limit, while quizzes_bundle and screenreader_gradebook are not any
more.
fixes LS-2016
flag = none
Test plan:
- Ensure everything in canvas still works and looks the same
Change-Id: I262012c9b752cec617f425c57e8c276bc7870b21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260391
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>
Fixes FOO-1674
flag = none
Update webpack-cli dependency to pull in a bugfix which was
preventing the webpack:analyze tool from working.
Test plan:
* yarn webpack:analyze works again
* nothing else broke (major version number changed!)
Change-Id: I5f6ee48ea7b24bda9e13e73f44cee8cf23abfc22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260189
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: Charley Kline <ckline@instructure.com>
because simply asking it to run yarn-deduplicate is no longer good
enough, you must now be polite when doing it[1]:
To prevent security and user-experience problems from mistyping
package names, npx prompts before installing anything. Suppress
this prompt with the -y or --yes option.
we will also be updating npm to the latest to catch such issues in the
future
== test plan
running "rake canvas:compile_assets" using npm > 7 completes
without hanging indefinitely at the "install dependencies" stage
[1]: https://docs.npmjs.com/cli/v7/commands/npx#compatibility-with-older-npx-versions
Change-Id: I81e044d20143991cf6103084f44ce8d4c9011f5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259662
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Most of the upgrades were backwards-compatible, but I made a few
changes:
* Replaced usages of wait, waitForElement, and waitForDomChange with
waitFor as recommended here, since they are deprecated:
https://testing-library.com/docs/dom-testing-library/api-async/#deprecated-methods
* Replaced '@testing-library/react-hooks' imports with
'@testing-library/react-hooks/dom' as recommended here:
https://react-hooks-testing-library.com/installation#being-specific
* Fixed some issues with @testing-library/jest-dom's toBeDisabled
matcher not checking for the disabled attribute on parent elements--
e.g. changing this:
`expect(getByText('Button Text')).toBeDisabled()`
to this:
`expect(getByRole('button', {name: 'Button Text'})).toBeDisabled()`
closes LS-1831
flag = none
Test plan: tests pass in Jenkins
Change-Id: Ia549950dade5fd5b2597a3002b11f4f0a6f740f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258923
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>
refs OUT-4237
flag=none
Test-plan: > yarn install
> yarn storybook
- Look through outcomes stories in storybook quickly,
verify everything loads
> yarn test-storybook
- Verify everything passes, if something doesn't pass,
verify that that corresponding story is also broken in
storybook
> echo $? # should return 0 and jest results should say 0 failures
- Change one of the stories so that it doesn't render,
For example: undo the changes made to ManagementHeader.stories.js
in tis PS
> yarn test-storybook
- Verify that it fails
> echo $? # should return 1 and jest results should say 1+ failure(s)
Change-Id: I492f50d861dccdfdf4a958fd007da44041f9dd49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258297
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Pablo Gomez <pablo.gomez@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
[fsc-timeout=30]
closes LS-1792
flag=none
I had to add ignore_js_errors:true to some of the selenium specs
because the global nav is generating a react "can't update state on
an unmounted component" errors. FOO-1541 was created to look into
that.
test plan:
> it passes js and selenium specs (this is the biggie, I think)
I changed 404file upload, and grade_summary pages
- go to /foo
> expect the "sorry" page to look the same as before
- go to file upload
> it works
- go to /courses/:id/grades/:stud_id
> expect the "Arrange By" Select to work as expected
(I couldn't figure out how to get any other of the Selects
to show up, but looking at the selenium specs provides clues.
I'm sorry that I'm not more help.)
Change-Id: I8eceb721b17e2cb1aec17de56a0145610b11d6ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256767
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
fixes FOO-1527
flag = none
test plan: you can install node modules and run webpack
Change-Id: I33347d791b0923f4471b555c6fac303b098b1ef4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257333
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs FOO-1331
refs LS-1657
flag = none
test plan: canvas-rce mocha tests work after upgrading to inst-ui 7
Change-Id: Ibe8d94fdd5a994fda2c7b9703dccfb77a62415ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256766
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: Simon Williams <simon@instructure.com>
fixes FOO-1409
flag = none
no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about
logical changes:
- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev
:: test plan ::
- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
answers
at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this
- go to /courses/:id/quizzes/:id/submissions/:id/log
- verify it looks OK
- click on a specific question in the stream and verify the question
inspector widget works OK
- go back to stream and push "View table"
- verify the table and its controls are OK
- go to /courses/:id/quizzes/:id/statistics
- verify it looks OK
- click on ? in the discrimination index chart and verify it displays
a dialog with help content
- click on "X respondents" in one of the charts and verify it displays
a dialog with the respondent names
- verify the interactive charts do interact as expected (no logic
changed here so just a quick glance)
- link to "View in SpeedGrader" for essay-like questions works
Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes FOO-1435
flag = none
instead of the bundler inferring the source file that an extension is
meant for based on filepath, a plugin is now expected to explicitly map
each source file to the extension file in its package.json manifest
{
"canvas": {
"source-file-extensions": {
"path/to/a.js": "path/to/extension-to-a.js"
}
}
}
this allows extensions to continue working even when the path of the
source file no longer matches that of the extension inside the plugin
== test plan
- visit a page that contains an extended module and verify the extension
is still applied
Change-Id: Ida7d75b87aedc519502c969e6912a335af69abc0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256222
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs DE-397
De-duplicating yarn.lock is necessary for some future InstUI upgrade work. In order to do this, we need to patch karma-webpack to avoid watching too many files within our JS job. We also need to pin babel-plugin-dynamic-import-node to the latest to work around a breaking change that causes “request of a dependency is an expression”.
Both of these version pins are work arounds and will be addressed by our efforts to upgrade webpack to v5.
Test Plan:
1. Ensure that “yarn dedupe-yarn” does not produce any file changes.
2. Ensure that the “JS (Karma)” job does not produce any warnings like “request of a dependency is an expression”
3. Ensure that the “JS (Karma)” job does not produce any warnings like “System limit for number of file watchers reached”
4. Ensure that Canvas front-end builds & behaves properly
Change-Id: I94d77bd775bc12f9f96ac44640c862ff3e3dee79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256674
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>
flag=none
this commit also removes the phantomjs docker-compose service which has
been broken for years, ever since PhantomJS was removed from
karma.conf.js in https://gerrit.instructure.com/c/canvas-lms/+/102169
test plan:
- follow the docs to ensure you can run a targeted JS test in docker
Change-Id: Ifa1647897a7a9605e097aeaf89e718c167d379fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256179
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
closes LS-1609
flag=rce_enhancements
Had to nohiost tinymce so it remains w/in canvas-rce
where RCEWrapper.js can require tinymce's stylesheets, but it
still needs to be a dev dep. of canvas-lms because there are
specs that import tinuymce.
Moved the matchMedia jsdon polyfill into jest-setup where it can be
used by everyone. Need it there since the new tinymce calls it.
test plan:
- specs pass
- the RCE still works and looks the same
Sorry, I don't know what else to say
Change-Id: I8c956664176b7c25995a55e0c6fea4dafad3970f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255604
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
refs FOO-1116
flag = none
test plan: we can install `yarn install`
Change-Id: I0e78958130368a11eb007d1ffddbd075f27d9380
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254937
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes FOO-1116
flag = none
this upgrade was problematic mostly because of Node's support for ES
modules (ESM) that is still fairly recent and introduces some complexity
around packaging. This is also the reason for the considerable hack
related to @instructure packages (see inline documentation) that can be
removed once we fix things upstream
| test plan |
| --------- |
- install node 12 if needed (e.g. not on docker)
- purge your node modules:
rm -rf {.,client_apps/*,gems/*,gems/plugins/*,packages/*}/node_modules
- make sure you can still build locally (native/docker)
bundle exec rake canvas:compile_assets
Change-Id: If9605ac428f0ff228f8852f0becb9fbac750f1f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
This is the message collection on the left hand side of the Inbox.
Test Plan:
- Run Storybook
- Verify that the MessageListHolder story is rendering as expected
-- Unread converstaions should have an unread badge
-- The number badge should show the total number of messages in the
thread
-- The checkbox should fire the onSelect action
-- Mousing over a conversation should show its star button
-- Clicking the star button on a conversation should fill in the icon
and make the button persist even when moused out of the conversation
-- Clicking the star button should fire the onStar callback
closes VICE-844
Change-Id: Ia554f8fe9717934dcb72569360a7b180537583c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253560
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>
refs FOO-1116
flag = none
this has been a controversial upgrade since, on the one hand, node-sass
is deprecated and we need to move to dart-sass, but then doing that will
require some work as i've seen a few major visual regressions caused by
the transition (see patch for dart-sass)
we can get node-sass unto the latest (that does compile under node12+)
by changing our use of :not() with a selector list:
:not(.a, .b)
to:
:not(.a):not(.b)
see this gist for a more thorough explanation and rationale: https://gist.github.com/amireh/867a00a36588fc6490c38813cf2558c3
:: test plan ::
- we are able to install dependencies on BOTH node10 and node12
- we must make sure there are no regressions to SIS-3125
Change-Id: If8c396e6404cb6d868997b399007a06e8d1e9548
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253764
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This story contains work to move Canvas Inbox and Storybook to `app/jsx` inside our Monolith. Storybook should now be enabled for all of `app/jsx` and works with our existing I18n code after updating webpack to load translations correctly.
Test Plan
1. Install node modules with `yarn`
2. At Canvas-LMS root, run `yarn storybook`
3. Storybook should open, test that Canvas Inbox components work as expected
Change-Id: Iccd2b103164a2da4e37b5746f4d9d2b5faf5f29d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253024
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
refs FOO-1116
flag = none
verified contents of public/dist/ are intact across versions with a cmd
like this:
find ./public/dist -type f -exec md5sum {} + | awk '{print $1}' | md5sum
== TEST PLAN
run "npx gulp rev" and verify it still works
== BONUS TEST PLAN
wipe out node_modules/, run "rake canvas compile:assets" and verify that
still works.
Change-Id: Ie072e415a89478e58a98b04b7826f974ba63f904
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253041
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes LS-1621
flag=none
Strictly speaking, the bug this fixes was addressed by updating
the <Select> in the RCE's Filter component by changing it to
<SimpleSelect>, but there was a bug in an earlier version that
had me update instui v7 components in canvas to the latest versions.
You need to run yarn (canvas:compile_assets does this for you), or
maybe even nuke_node before moving forward.
test plan:
- in the RCE, open the content tray (e.g. Documents > Course Documents)
- use the keyboard to navigate thru the filter area
- use arrow keys to open the various dropdowns and make changes
> expect it to work, and for the tray not to unexpectedly close
Change-Id: Id48441ef51ca2053b2b4b4cae27b90fcab6f4308
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252965
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
This commit covers the teacher/admin view of editing user
groups. Need to look into removing the old code in a followup
change.
closes FOO-909
flag = none
test plan:
- Verify the test plan in the following gerrit still plays out:
- https://gerrit.instructure.com/c/canvas-lms/+/247628
- You'll need a student created group set and an admin created
group set to test all the angles
- Student Group Set
- Create a group and remember its state
- Go to edit said group
- Verify the Group Name field is populated
- Verify the Joining select is populated with prior choice
- Edit the Group Name and Joining select dropdown
- Verify the group collection is refreshed with your newly
updated group
- Go to edit the group and verify your changes saved
successfully
- Admin Group Set
- Create a group and remember its state
- Go to edit said group
- Verify the Group Name field is populated
- Verify the Group Membership Limit is populated
- Verify as you did with the Student Group Set
- Ensure the group has a member count
- Edit the group and set the Group Membership Limit lower
than your member count
- Verify you get a descriptive error
- The updated group modal should behave as it did before and
be accessible and keyboard navigable
Change-Id: I6bd4c6983239c9ed779fa41d297dab81c364fcbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250185
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes LS-1377
flag = immersive_reader_wiki_pages
Test Plan:
- Enable immersive reader.
- Because there doesn't seem to be a way to run this locally
(without consul), I had to temporarily modify the
immersive_reader_controller.rb and added
prod creds to get this to test. see me for more details
Change-Id: Ifaa7edfa94ff29856ae6b474548e0f450b9d4c6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245869
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
refs DE-209
[change-merged]
[build-registry-path=jenkins/canvas-lms-de-209]
Test Plan:
1. Ensure that `docker-compose build` works locally
2. Ensure that yarn is cached on Jenkins when run on a separate node
Change-Id: Icadf02b9e999eafd14f493ae1c0649ed0ffe58bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245336
QA-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This change bumps the ui-media-player from v5 to v7.
I also found a bug in the logic for retrying fetching the video sources
that's fixed here so we don't call fetch unneeded extra times. Learned
a lot about the interaction between useEffect and timers used to retry
actions.
Updated the @testing-library components in canvas-rce. waitFor in the new
version uses a mutation observer, not just a timer which helped make specs
more reliable.
Also did some significant rework of CanvasMediaPlayer.test to get it to
pass, especially without a bunch of react or testing-library warnings.
With PS13, I finally figure out how to listen for the onLoadedMetedata
out of <MediaPlayer> without having to reach under the hood and grab
the <video> element
closes LS-1077
flag=none
test plan:
- audio and video still works, but with the new player
- record a longish (30s+) video
> expect to see the
"Your media has been uploaded and will appear here after processing"
message, and for the video to eventually play.
- record or insert a portrait oriented video
> expect it to be letterboxed in the player
- record or insert audio
> expect it to be loaded in the player
Change-Id: I797e6f16e763d7029eaf19149439e973590e978c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
refs SAS-1540
* adds an audience setting to developer keys, so a key can be set to
target external audiences with its credentials grants
* when a key with an external audience grants credentials, the token is
signed with an asymmetric key instead of the internal symmetric key
* external audiences can retrieve the corresponding public keys from
/login/oauth2/jwks
* credentials issued by developer keys with an account id include the
account's guid in a custom claim
includes a refactor of key storage and rotation in consul, which had
already been done for LTI. but it wasn't really a feature of lti, just
something used by LTI, and we needed the same for key management for
this. moved it to be part of Canvas::Security
Change-Id: Ie5c0fcee6fc21687f31c109389a3bcc1ed349c5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243606
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
It also allows editing other a11y features, like making
the image presentational or embedding it as a link.
It splits out the Image Options form from the editor tray
to avoid copy/pasting too much. The logic and state are
still separated between the upload and edit forms, since
they don't overlap super well.
It also edits the logic around uploading and embedding
images to support the extra attributes.
A few Jest tests were added to check for appropriate
attributes being added.
Test Plan:
With RCE Enhancements enabled, visit an RCE page
Open the image upload modal and choose an image
Notice the image attributes form underneath.
Add alt text. Adjust the other attributes as desired.
Upload the image
Open the Raw HTML Editor.
Notice that the alt text is added to your image, along
with whatever other attributes you changed.
Decoration Images are given the `role="presentation"`
attribute; Display As "Link" embeds the image as a
link.
Fixes LS-445
flag = rce_enhancements
Change-Id: I462e2c322a3b39fc4fa9f47b675426c581c3a398
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242736
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Test Plan:
-inspect avatar on inbox message is rendered from inst-ui
fixes VICE-17
flag=none
Change-Id: I92941e079b63a3a60468e1e894059c20e15b1251
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241435
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
closes LA-729
flag=rce_enhancements
The original intent for the audio player was to size it so the buttons
just fit. This ignored the fact that it's rendered w/in an iframe,
so popup menus are clipped. This change sizes the player to leave
room for those popups.
While the ticket was written against the audio player, the same issues
may occur in the video player, either for portrait videos or videos < 400px
wide when closed captions are present. The original code for
sizing the video player shrank the width to fit
thea video's size, which clipped the buttons. This change sets a minimum
width for the player and letter-boxes the video.
test plan:
- in the new rce
- add an audio file
> expect it to be wide enough to show all the buttons and
tall enough for the speed and volume popups
- add a vertical video
> expect the video sized to fit in the available space in the Computer
tab of the Upload Media modal
- Submit to upload
> expect the player to be wide enough to show all the buttons
- click the fullscreen button
> expect the video to be the height of the screen and letterboxed
- restore to windowed size
> expect the video to return to its letterboxed size
- click the video, then the Options button
- change the video's size
> expect the video to remain letterboxed
- add a horizontal video
> expect the video sized to fit in the available space in the Computer
tab of the Upload Media modal
- submit to upload
> expect the player to be sized to the size of the video
- fullscreen
> expect the video to be letterboxed in the fullscreen player
(if the aspect ration of the video !== that of your monitor,
or fill the screen if they match)
- for the horizontal video, select Opitons and
change the size to be "medium" or "custom" and < 400px wide
and add subtitles
> expect the video to be letterboxed in a 400px wide iframe.
Change-Id: Ib5d08dbd7796985d00f656e38a642ab92939d614
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238432
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LA-995
flag=none
1. unify the instui ui-babel-preset options across sub-packages
2. include "@instructure" as part of each sub-package name
3. unify the commonjs and es module directory structure
4. use index.js to export anything needed to be imported from
outside the package. This removes any dependency on the
package's internal directory structure and makes importing
independent of commonjs vs es module simple
5. move canvas-rce's main entry from async.js to index.js
(I'm 98% sure index.js was an artifact of the old rce)
test plan:
- canvas-lms builds locally and in docker. (Jenkins builds
the docker image, so I presume if it passes jenkins,
the docker build wasn't broken)
- sniff test the result, esp. student planner and the new rce.
- yarn build:watch from canvas-rce, canvas-planner, and
canvas-media packages should work, and yarn build:watch
from canvas-lms should pick-up any changes.
(I've verified this by finding a console.log statement
and changing the message then use devtools to see it's in
the new source after refreshing the browser)
Change-Id: I5f242d06ad655597cd416057d4b740d4bd86003b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes OUT-3593
flag=outcome_alignment_non_scoring_content
Test plan:
- with quiz_api, outcomes, canvas running,
provision outcomes for account
- in canvas rails console:
Account.first.provision_outcomes
- in a course, create some outcomes and groups
- sync canvas outcomes to outcomes service
- following instructions in outcomes-service canvas.rake
re: canvas docker-compose config, run in outcomes-service:
dc run --rm api bundle exec rake \
canvas:dump_canvas_data[outcomes.docker,db.canvas.docker]
dc run --rm api bundle exec rake canvas:sync[outcomes.docker,true]
- enable "Outcome alignment to non-scoring content" FF
- create canvas course with wiki page
- on wiki page show page, add outcomes to the page
- verify that outcomes are retained on reload
- in another course without outcomes, verify that outcomes widget does
not appear
Change-Id: Ie3af07642d818eaa529bff76b1ac7d81e575622b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235665
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
Refs USERS-549
flag=none
This will be used in places where responsive components
may have performance issues due to complexity.
Test plan:
* build passes
Change-Id: Icce432352b5eb5118fc258b7c2f0e3c730eaae86
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236255
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Closes: CCI-351
flag = none
Test Plan:
- no behavioral changes
- build passes
Change-Id: I2e6bfa46b56ee2b59b8289fc90ef9c319757fc34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235566
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Fixes: CCI-352
This resolves an issue with a plugin which includes it explicitly and
then changes the yarn.lock. This gets both package.json files in sync.
Test plan:
- yarn.lock does not change with or without plugins present
flag = none
Change-Id: I48452b2c542476b42cf1aae80605e267d0c62819
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235769
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
instui -> 6.24.0
@instructure/media-capture -> 7.1.0
the update to @instructure/media-capture is necessary to
fix the audio recording bug described in LA-859. This change
required a bump to INSTUI's version. Both updates are rolled
into this change.
closes LA-595
flag=none
test plan:
For the audio recording part:
prereq: have notorious running. you must be loading canvas
from localhost unless using https in order to enable
the mic and webcam.
- create or edit something with the rce
- select Media > Upload/Record media
- change to the Record tab
- click on the "WebCam" button and select "No video"
- record some audio and save
> expect the audio to be uploaded and appear in the RCE
- go to the speedgrader for a graded object
- click on the Media Comment button
- click on the "WebCam" button and select "No video"
- record some audio and save
> expec the audio comment to be uploaded and playable
For the instui upgrade part:
- make sure everything still works as expected
- check with instui changelog for changes since 6.21 for guidance
This commit reverts commit 7ede798549,
which reverted 81d493b722
which was prematurely merged.
Reason for revert: get the oritinal patchset back in the queue,
but hold off merging until after beta is cut from master. This
will give the INSTUI change a chance to soak in dev for longer
than the weekend before being deployed
Change-Id: Iada67ee10a796e4b4b967b27a64f3e527e78249a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233037
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
instui -> 6.24.0
@instructure/media-capture -> 7.1.0
the update to @instructure/media-capture is necessary to
fix the audio recording bug described in LA-859. This change
required a bump to INSTUI's version. Both updates are rolled
into this change.
closes LA-595
flag=none
test plan:
For the audio recording part:
prereq: have notorious running. you must be loading canvas
from localhost unless using https in order to enable
the mic and webcam.
- create or edit something with the rce
- select Media > Upload/Record media
- change to the Record tab
- click on the "WebCam" button and select "No video"
- record some audio and save
> expect the audio to be uploaded and appear in the RCE
- go to the speedgrader for a graded object
- click on the Media Comment button
- click on the "WebCam" button and select "No video"
- record some audio and save
> expec the audio comment to be uploaded and playable
For the instui upgrade part:
- make sure everything still works as expected
- check with instui changelog for changes since 6.21 forguidance
Change-Id: I322b57f4addca16c989feeb9b74a1fc3f8c775e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234155
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LA-898
flag=assignment_bulk_edit
test plan:
- Edit many dates and save
- The job should start and a progress bar should be displayed next to
the cancel button
- The job progress should be polled and the progress bar updated
- When the job completes, polling stops (see network tab), the progress
bar should be at 100%, and a success message should be displayed.
- There should be appropriate screen reader announcements.
- If there are any errors during the job, polling should stop and the
error messages should be displayed.
Change-Id: Ifd9ec6224318a003317a66ce2460ccf3e9d45efa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233136
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
closes LA-847
flag=assignment_bulk_edit
test plan:
- Assignments and their overrides should be displayed with their dates
- Each date input should function and work independently
Change-Id: Ia2206bcae8b462535e3bcc99bf024bfaae39bc3e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230953
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Since instructure-ui has published version 6.22, any developer who runs
`yarn` will result in a modified `yarn.lock` file. To prevent accidental
upgrading from 6.21 to 6.22, it would be prudent to pin these
dependencies in the `package.json`. This also is a good idea to help
reduce any confusion around _why_ the yarn.lock is being changed locally
as well.
Fixes: CCI-302
Test plan:
- manually verify no changes to the `resolved` fields of each
git-changed package. Since this pins all instui deps, they should all
be exactly the same.
- manually verify there are no @instructure prefixed packages that are
version 6.22
Change-Id: Id1c061bc60f1922d330cfafab00b4ddc9e09f9ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232255
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
The thrust of this commit is to implement a CanvasDateInput on top of
instui's DateInput field. The bulk editing table is just an instance
of it to test with.
closes LA-835
flag=assignment_bulk_edit
test plan:
- go to the assignment bulk editing page
- play around with the single date input component
- selecting dates from the calendar
- typing in dates
- typing invalid dates
- blank line
- keyboard navigation
- screen reader
- play around with your user locales and timezones and expect correct
behavior showing the proper dates
Note that VO reads the date twice when you navigate with the keyboard. I
believe this is because it is reading the input value change and the
selected calendar date. I don't know that there's much to do about this.
The demo on instui's page does the same thing.
Change-Id: I9c66ccaa746fb91fecd20362e00a927c57f491b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230609
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Refs UXS-49
Refs USERS-459
It will be generally useful to be able to use the InstUI
Responsive component to deal with browser breakpoints in
React. The immediate use case is something I'm working on
in multiple-root-accounts but it needs to be in core
Canvas.
Test Plan:
* You agree that the changes here, especially what happened
to yarn.lock, are kosher.
Change-Id: Icad7db3de7fef94dd1eb292b02b30014a0facbd4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Uses the "Product Tour" feature flag to selectively load
the bundle. It also grabs the user's role to only show
the tour to teachers. Admin and Student tours coming
soon.
To properly facilitate communication between the Navigation
component and the Tour component, I created a
simple PubSub engine which allows components to pass
messages between each other in an efficient and clean way.
This allows the tour to open the nav trays at certain
points in the tour.
Whether the tour shows is determined by a localStorage
key, set on the users browser. When they close the tour
if turns the flag on and uses that to now automatically
show the tour again.
The key is "canvas-tourpoints-shown-teacher"
This patchset also includes an update to the help links.
If the user is a teacher, it shows the "Show Welcome Tour"
link, allowing the tour to be re-opened from the help tray.
Test Plan:
Log into Canvas as a teacher
The tour should appear. Navigating through the tour properly
opens and highlights items in the navigation trays.
Reloading the page after closing the tour completely should
cause the tour not to appear. Removing the localstorage
key should cause the tour to reappear.
It should look like the designs linked below.
https://www.figma.com/file/BzfJcEbBaccu5lMsaZ08zK/Canvas-COVID19-Tourpoints?node-id=8%3A33
Refs UXS-22
Change-Id: I1164bc1fbe55fa5cbb5f4a9df271a0dcd772f045
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230614
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Laura Leavitt <lleavitt@instructure.com>
flag=none
closes UXS-8
Adds new content (copy and links to Canvas Guides), as well as
updated images for each of the existing new user tutorial trays.
Test Plan:
Verify that the trays work as follows:
- All links should correctly resolve to the Canvas Guides page
they name
- All trays should feature a Panda image
- All tray should open and close, and should be able to be
dismissed permanently (no regressions from existing functionality)
Check the following index pages for trays: Announcements, Assignments,
Collaborations, Conferences, Discussions, Grades, Course Home Page,
Course Import page (under Settings), Modules, Pages, People, Quizzes,
Settings, Syllabus. There is a tray for Files, but it seems to be removed
from the Files index page on page load (not a result of this commit).
Change-Id: I873fdf9ceb6097d987f3e7da38e5fd615c1d98ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230372
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Closes USERS-336
flag=none
Test plan:
* should be wrung out in beta
* can someone please test the CanvasMediaPlayer in the RCE?
I saw some weirdness there and had to skip a test.
Change-Id: I1663466aa411fc5e98e2a5e4f7384eb151364817
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
closes OUT-3401
flag = none
test plan:
- check out/update canvas plugins needed for sharding:
* multiple_root_accounts
* demo_site
* canvas_geoip
- check out/update canvas plugin needed for provisioning:
* uuid_provisioner
- check out/update quiz repo:
* quiz_api
- check out/update outcomes service:
* outcomes-service
- add the following to the postgres container section
of your docker-compose.override.yml in canvas:
===
ports:
- "5432:5432"
environment:
VIRTUAL_HOST: db.canvas.docker
===
- update canvas configuration by adding example
dynamic_settings to existing config/dynamic_settings.yml
and by copying example uuid_provisioner.yml
- in canvas rails console, enable the auto provision setting:
> Setting.set('auto_provision_outcomes_service', 'true')
- start up canvas, outcomes-service and quiz_api
- create a new root account from canvas siteadmin
http://canvas.docker/accounts/site_admin/root_accounts:
* account name: outcomes
* account domain: outcomes.canvas.docker
- after a few minutes, verify in the outcomes rails console that a new
shard has been created and registered for the second account, but
not the first
> ap AccountRegistry.all
- create a course with outcomes in outcomes.canvas.docker
- in the outcomes api docker container, dump canvas data and sync
into the provisioned outcomes shard:
> bundle exec rake canvas:dump_canvas_data[outcomes.outcomes.docker]
> bundle exec rake canvas:sync[outcomes.outcomes.docker,true]
- enable the outcome alignment feature flag:
- http://canvas.docker/accounts/site_admin/settings
- Feature Options tab
- Find "Outcome alignment to non-scoring content" feature flag
- Switch to "ON"
- return to course created in new canvas account
- create a canvas page in the course
- load the newly created canvas page
- confirm that an outcome alignment widget appears, and that
it opens a side tray with course outcomes when attempting to align
Change-Id: Ide6891493ea3c926d155d4aea9bc7aff5bdaa6fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
refs KNO-265
flag=confetti_for_assignments
Moving Steven's POC (https://gerrit.instructure.com/c/canvas-lms/+/224811)
to the original assignments implementation.
A followup commit will introduce the screenreader text as this commit
is already getting large, and there has been a few difficulties on
adding that behavior already.
test plan:
- with confetti_for_assignments flag disabled
- turn in a submission for an assignment before the due date
- you should be redirected to /courses/:id/assignments/:id
- no confetti should display
- visit /courses/:id/assignments/:id?confetti=true
- no confetti should display
- with confetti_for_assignments flag enabled
- turn in a submission for an assignment before the due date
- you should be redirected to /courses/:id/assignments/:id?confetti=true
- confetti should display
- turn in a submission for an assignment after the due date
- you should be redirected to /courses/:id/assignments/:id
- no confetti should display
- while confetti is displayed
- you should be able to clear by pressing either `space` or `esc`
- confetti should clear itself after 3 seconds
qa risk: low
Change-Id: Ie7743af9e2341eab26fbc3055e90bb0658463018
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/225929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Johnny Le <jle@instructure.com>
Product-Review: Johnny Le <jle@instructure.com>
QA-Review: Johnny Le <jle@instructure.com>
Closes USERS-205
flag=none
Also had to make a slight tweak to a Canvas Planner file to reflect
a change in ui-forms -> ui-checkbox
In addition, several imports from InstUI had to be changed from
their legacy locations to their currently-documented ones, in
order for all the tests to pass. Using the old import sources
apparently causes two components of the same name to be rendered
which breaks assumptions in some tests that there will be only one.
Eventually we'll have to fix up all the imports which will be a
bit of a slog.
INST-UI changes notes for 6.16.0:
---------------------------------
Bug Fixes:
ui-a11y-utils: fix ui-a11y-utils dependencies
ui-docs-client:
remove unnecessary import of ScreenReaderContent
ui-modal: update deprecated lifecycles in modal
ui-tooltip: uncontrolled example broken
Features:
instui-cli,ui-scripts,ui-template-scripts:
add a new ui-template-scripts package
instui-cli,ui-upgrade-scripts:
add a new ui-upgrade-scripts package
ui-badge: add ui-badge package
ui-buttons: add a CondensedButton component
ui-buttons: add an IconButton component
ui-byline,ui-layout: add ui-byline package
ui-checkbox: add ui-checkbox package
ui-docs-client:
make content within docs pages navigable via linking
ui-docs-client: updates to compileMarkdown for id generation
ui-drawer-layout: add ui-drawer-layout package
ui-elements: add isWithinText prop to ui-element Link
ui-elements,ui-truncate-text: add ui-truncate-text package
ui-expandable: add ui-expandable package
ui-forms,ui-radio-input: add ui-radio-input package
ui-forms,ui-text-area: add ui-text-area package
ui-navigation: remove experimental pill from AppNav
ui-range-input: ui-range-input package
ui-responsive: add ui-responsive package
ui-spinner: ui-spinner and design updates
ui-themeable: update deprecated lifecycles in themeable
ui-tray: ui-tray package
Test plan:
* Review changelog above
* Test on master thoroughly.
Change-Id: I9f4552f18b2a48a626e7bb2102f8b3def46eb775
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221466
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Refs USERS-205
flag=none
The InstUI folks are splitting up packages so to allay
future compatibility problems, and to get tests to pass
on future upgrades of InstUI, we should follow these as
they move rather than rely on the old locations. This
takes care of the Canvas Planner package.
Note that I cheated a bit here and brought CanvasSelect
over from the main Canvas app into this package. At
some point that should probably become a package of its
own, I guess.
And I had to add another test file because the tests
for CanvasSelect dragged the test coverage below 85%.
Sigh.
Test plan:
* tests pass
* canvas planner works
Change-Id: I40bbbe559f4928318b8ac1444649d97b09a281c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/221741
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
fixes LA-292
flag=direct_share
Test plan
- Load the content shares and ensure the
SR announces the load
Change-Id: I828c4ad23d5ebaf0879a7e3df56d2584b715c508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220774
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
closes LA-95
flag=none
test plan:
- go to any course settings page
- click "Choose Image"
- drag an image file into the drop area
> expect a spinner while it uploads
> expect the image chooser modal to close
> expect the image to show as the course image
- repeat, but try to drop an image outside the drop area
> expect nothing to happen
- repeat, but try to drop a non-image file into the
drop area
> expect it to be rejected and the message
"File must be an image"
Change-Id: I7c94a02090b2b806610637d6329cf301ca1d5237
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
fixes LA-325
flag=direct_share
Test plan
- In the direct share import tray
select a course and then a module
for that course
- Then search for a different course
and select one from the searched list
- Verify that you don't get the "something
went wrong" picture
Change-Id: I70b7614da7d9003c76bf3ebe3ff1290e4de98575
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219207
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
this fixes the following error that is showing up in the console
when using student view:
Warning: [Heading] `ellipsis` is deprecated and will be removed in
version 7.0.0. Use `<TruncateText />
Test Plan:
* when using A2, go to an assignment page and confirm that the
warning is no longer showing
flag=assignments_2_student
fixes WOKE-90
Change-Id: I9fea740c04d9b4029d01a688a8b2f98c94d3fd8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215964
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
temporarily using a fork of bigeasy/timezone since it does not build
with the latest releases of eggert/tz
fixes COREFE-308
test plan:
- set user timezone to brazilia
- create an assignment with a due date after 2019-11-03
- save the assignment
- the time should not be off by an hour on the details page
Change-Id: I7a15e92def90a5d83f8be079657a58894bd13822
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215065
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes COREFE-315
test plan:
- load a page with the RCE and have a video in it
- click on the video
> expect the Options popup toolbar button
- click it
> expect the video options tray to open
> expect the title to default to the video's file name
> expect the default size to be Large (400px on the long side)
- delete the title
> expect the Done button to be disabled
- set a new title
- change the size to Custom
- delete the width or height
> expect an error message and the Done button to
be disabled
- enter a new size, or select one from the dropdown
- click Done
> expect the video to be resized to the new size
- if you're using a screenreader, expect the video
to be announced as "Video player for {your title}"
Change-Id: Id7e29520cc91c02645b92d666216e64f6619bbbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211355
Product-Review: Lauren Williams <lcwilliams@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
because it prevents preventDefault on file links (sometimes)
then use it explicitly where we need it, on the left/right
preview buttons
test plan:
- go to user files (/files)
- have multiple image files in a folder
- reload the page, then click an image file
- it should preview, not download
- clicking the left/right arrows at the
side of the preview window should go to the
previous/next image without reloading the page
fixes ADMIN-2923
Change-Id: Ib97d25d51e7c94fb962e5d24d3c763554e7fcdd4
Reviewed-on: https://gerrit.instructure.com/212876
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Test Plan:
- Enable Immersive Reader Feature flag
- Go to a wiki page with content
- Click the immersive reader button
- Immersive reader should open
closes COREFE-265
flag = immersive_reader_wiki_pages
Change-Id: I015fbbd72adf05177f3941890b5a04a7aa067ee2
Reviewed-on: https://gerrit.instructure.com/211546
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
closes COREFE-268
test plan:
- open a page with the rce
- from the media toolbar button menu, select upload
- pick a video from your computer
> expect a preview to appear
> expect the video to be about 75% the width of the modal
and as tall as it needs to be for the video
- click Submit
> expect the modal to close
> expect the video to show up in the rce
> expect it to be 400px wide, and however tall it needs
to be (try both portrait and landscape videos)
> expect the grey placeholder while it's being uploaded
> expect the yellow flash indicator when it's loaded
> expect to see a "Loading..." message until the video player
renders
- from the documents toolbar button menu, select upload
and upload a video
> expect the video file to show up in the media>course media
tray list
- click on the video file
> expect the video to show up in the rce
> and for all the same constraints as the uploaded
video to be true
- you should try this with the video appended to the end of
content and right in the middle
- click on a video and delete.
- if you loaded the page via http, there will probably be
no fullscreen button
Change-Id: I934ad486b74689e81941e1fcf0cf6efd18e5f426
Reviewed-on: https://gerrit.instructure.com/209296
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Closes: COREFE-302
This will actually start executing the JS as soon as it comes in
the <head> instead of waiting until after the </html> for it to start.
What this means is that for any page that is streamed, we will start
running our javascript sooner, as soon as the <head> is sent to the
browser. So we can begin executing code while the server is still
working on sending back the rest of the document.
Note: this change makes it necessary for any endpoint that is streamed
to have a check for DOMContentLoaded before doing anything that assumes
elements will be there. I added this `@instructure/ready` helper do to
that in all the places I could see. If the DOM is already loaded,
`@instructure/ready` run the callback immediately (not in a setTimeout)
so theoretically load/execution order should be _exactly_ the same for
any response that is not streamed, even if it is wrapped
in a “ready(…)” callback
QA test plan:
* click around in prod mode, especially on pages that are streamed
make sure there are no thrown javascript errors or pages that
fail to render
* try both on a fast network as well as simulating a slow network with
browser caching turned off (if you don’t know how to change your
network speed simulation settings in Chrome, I can show you)
* specifically look at pages that are streamed
(like courses/x/discussions/y, /courses, courses/x/modules)
Change-Id: I49a74ab480095e50cfa08dca8e074848dce12012
Reviewed-on: https://gerrit.instructure.com/203198
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This does not mandate anything or -1 or anything like that, it just
makes it so if you hate figuring out how to format ruby code like I do
you can have prettier do it for you.
Test plan:
* First checkout this commit & run yarn and make sure you are using
Ruby 2.5 or newer
To test on command line:
* `yarn prettier --write path/to/any/ruby/file.rb`
To test in vscode:
* After you checked out this commit and ran yarn, restart vscode
* Open a ruby file in vscode
* open the command pallet (command-shift+p)
* type “Format” so the “Format Document” command appears. Hit enter
* it should pretter format that ruby file
* or alternatively, trigger the “Format Document” command directly
By typing “Shift+Alt+F”
Change-Id: Ifd0272f2c1bed3263473a1e7d5df13547e10dec4
Reviewed-on: https://gerrit.instructure.com/209982
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes ADMIN-2839
flag=direct_share
test plan:
- as a user with course management permissions (such as a teacher) go to
the discussions index page and select "Send To..." from a discussion's
kabob menu.
- this should open a modal where you can search for and select other
course users who have course management permissions.
- clicking on the "Send" button only does a console log at the moment.
Change-Id: I67f823d0820283fd90e2aa6e3ae3ea5fe54d9b3d
Reviewed-on: https://gerrit.instructure.com/205967
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Per https://github.com/tc39/proposal-optional-chaining
Test Plan:
- Jenkins passes
flag = none
Change-Id: I7b9fde7e91a9bd00a85397bcf791b8eccd528a5b
Reviewed-on: https://gerrit.instructure.com/209826
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
see: https://github.com/ryankshaw/jquery/commit/ce59a7f0b3c4fc6ff9a2176
for the diff of the actual changes
Copying from that commit message:
All of these checks only ever returned false in older browsers that
We no longer support. By getting rid of them, we can get rid of this
Chunk of javascript execution that happens on every page right before
The domcontentloaded event fires: https://cl.ly/d368d5c9388 which ends
Up being non-trivial because it causes a couple recalculate-styles
(As seen by the purple in that screenshot)
Test plan:
jQuery should work the same as before
* domcontentloaded should end 15-200ms sooner which means all pages
Should load a little faster
Change-Id: I3efa8752708b9043107e9123d31cd509536e9993
Reviewed-on: https://gerrit.instructure.com/208606
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Note: There appears to be an issue with VoiceOver not announcing the
aria live updates. Going to ignore this for now and see if it is still a
problem when InstUI 6 lands. Another ticket will be created to check and
fix.
refs ADMIN-2811
flag=direct_share
test plan:
- should be able to search by name for courses you manage in the direct
share course selection tray.
- copy button disabled until you select a course
- after selecting a course, the copy button just logs to the console
- cancel button closes the tray
- generally accessible, except for VO reading alerts.
- could check the flash_screenreader_holder div in the inspector if
you want to watch the DOM changes that should trigger the alert.
Change-Id: I5c102b25d277204a9929f780adbe94b9d3e46bcb
Reviewed-on: https://gerrit.instructure.com/205371
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
This moves eslint, stylelint, and xsslint to be part of our
JS build pipeline. It does not account for other linters that
are more general like tatl_tael linters and commit messages or
non-frontend language specific linters like rubocop.
Test Plan:
- The linters-and-js build on New Jenkins should run and actually
run the linters specified above.
closes COREFE-220
flag = none
Change-Id: I8f633caf9af025c83bbe68fbd1536276a838c159
Reviewed-on: https://gerrit.instructure.com/206106
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Trying to get the karma tests to have less flaky failures,
let’s see if running all the gradebook related specs isolated from
everything else helps solve anything
Test plan:
* the karma part of linters and js build passes
Change-Id: I2f25464129f71c019fe27267d1b0cfa5472a6481
Reviewed-on: https://gerrit.instructure.com/207700
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: COREFE-209 COREFE-207 COREFE-230
this should help bugs, spec flakiness, and bundle sizes
test plan:
* make sure that the pages that are still using the old 5.x one from
@instructure/ui-core still work, namely:
app/jsx/account_course_user_search/components/CoursesToolbar.js
app/jsx/blueprint_courses/components/CourseFilter.js
app/jsx/grade_summary/SelectMenu.js
* make sure themeing of instUI components still works and picks up
theme editor settings
* make sure bundle sizes are smaller, not bigger
* check tinymce-a11y-checker that it still works the same
(With the rce-enhancements feature both on and off)
Perf test plan:
* make sure tree shaking is working
load it up in one of the webpack bundle visualizers to see
* make sure we are not loading *all* of the icons
this commit also updates the instUI6 version we use from 6.9 6o 6.10
which has fix for <Alert> unmounting that ed fixed:
Test plan:
* you should see less console arrows about react unmounting nodes
Associated with the CanvasSelect component
Change-Id: Ied2ff1d1521b0900126136170f103dea27bc554a
Reviewed-on: https://gerrit.instructure.com/204545
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
…since we use it.
This way, once I start upgrading other things to instUI 6, it won’t
Break by giving canvas-lms proper ui-a11y 6.x instead of 5.x
Test plan:
* if this is merged, the commit to update MRA to instUI 6 g/207102
should pass
Change-Id: I30d1cce751635fb861feba12ea9649901887ebb9
Reviewed-on: https://gerrit.instructure.com/207135
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
The only change is that some things that it actually used weren’t
In it’s package.json and they were added.
See
https://diff.intrinsic.com/@instructure/canvas-rce-old/4.1.4/4.1.5
For the differences
Test plan:
* when we upgrade canvas’s instUI to 6.x we shouldn’t get failures
about not being able to find
@instructure/ui-alerts/lib/packages/alert.js
Change-Id: Icff6d120bff55697defc73c092b2ca9782fc44e2
Reviewed-on: https://gerrit.instructure.com/207063
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
I did this first for canvas’s jest tests, but this does it for
karma/qUnit, canvas-rce, canvas-planner and dev mode too.
test plan:
* run `yarn test`
* you should see a lot less react deprecation messages
Change-Id: I5f5cee08d705b749526be87fd79cfc937c015145
Reviewed-on: https://gerrit.instructure.com/206879
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test plan: graphiql works
flag = none
Change-Id: Ia8bd7100024cab45746a27f370d5423e6c5fa9e6
Reviewed-on: https://gerrit.instructure.com/206853
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
my last thing fixed it in one spot but it fails in another now
lets see if we just give it more memory if that will work
Change-Id: Ia4a5aef21f3a07ac2d383682de1cfc4fe2d71f73
Reviewed-on: https://gerrit.instructure.com/206869
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes COMMS-2316
TEST PLAN
-------------------------------
all tests pass
Change-Id: I0c270bb7a8d5dfa166641648841e619a1a21c0f4
Reviewed-on: https://gerrit.instructure.com/206348
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Jenkins
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
If you ran yarn on master it would create a dirty yarn.lock
Test plan:
* after this is applied, if you run `yarn` it should not make any
Changes to yarn.lock
Change-Id: I0303e6e9ca0032771b95497df4b39a3e26e2eed3
Reviewed-on: https://gerrit.instructure.com/206700
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
note: this will start logging a lot of deprecation warnings from
React about stuff like componentWillMount and componentWillReceiveProps.
Teams should update their code to not use those things so those
Deprecations go away
Test plan:
* automated builds should pass
Change-Id: I42a340dacdb43d410c7246945c025e0eb83220fa
Reviewed-on: https://gerrit.instructure.com/205772
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
here are 2->3 changes from immutability-helper
Huge thanks to @jedmao for converting the library to typescript!
New: TypeScript definitions are now generated from TypeScript source.
meaning they will always be 100% in sync w/ the source code.
New: exported Context class.
Deprecated: stop using const myUpdate = newContext().update and start
using const myContext = new Context(); myContext.update(...).
Deprecated: stop using update.extend and start using import { extend }
from 'immutability-helper' or const { extend } = new Context().
test plan:
* the only thing that uses immer is the assignments_2 teacher stuff,
that should still work
* discussions, gradingPeriods, and the CreateOrUpdateUserModal use
immutability-helper, those should still all work
Change-Id: If6b62788be5d3929b5a0ddd64e1b63aa09916b84
Reviewed-on: https://gerrit.instructure.com/205773
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This includes some general utilities
Note: There is a bug in the instui Tray that mounts the contents of the
Tray twice, which results in multiple fetches for the managed courses.
We're going to ignore this for now since the right fix is to fix Tray
and not work around it.
flag=direct_share
refs ADMIN-2811
test plan:
- On the discussions index page, click on the kabob menu for a
discussion and choose "Copy To...".
- A tray should open and load a list of the courses you are allowed to
manage. There is no other functionality in the tray yet.
Change-Id: Ic0f5e841f61cd3cdaef7b681db2907089c561665
Reviewed-on: https://gerrit.instructure.com/204331
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Test plan:
* use the media capture stuff from the new RCE
* it should look the same but use instUI 6 components
Change-Id: If5e41b75652898c0d2a4d51eedb4fc437d68f7d2
Reviewed-on: https://gerrit.instructure.com/205695
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
The previous commit makes it so i18nliner can understand <> instead of
<React.Fragment>, so this turns back on the eslint rule we had to turn
Off
Test plan:
* run bin/rake i18n:generate_js (or let the Jenkins builds run)
* it should pass
Change-Id: Ia3204cd6c3147eb52ca612adbb3b20b2df8c6921
Reviewed-on: https://gerrit.instructure.com/205378
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
instead of having our own eslint in canvas-rce, and maintaining all
future rules like react hooks and stuff we can just use the same one
that the rest of the repo uses.
test plan:
* cd packages/canvas-rce
* `yarn lint` should run
Change-Id: Idbe8af533f7a19035d1998538d2d6fd1a711f164
Reviewed-on: https://gerrit.instructure.com/204998
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Test plan:
specs pass
flag = none
Change-Id: I8e816e4ff46148b586037aa2b6eb36b9e50a958f
Reviewed-on: https://gerrit.instructure.com/205109
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
whoops, I didn't notice that this was dependent on something
that is not merged yet. I had some stuff that depended on this
so I too-eargly merged it. I'll revert it until we get the
validated apollo stuff figured out
This reverts commit 27b6085218.
Change-Id: Ib6439daa8f26663ecd473bb4bb71f8dda2231eec
Reviewed-on: https://gerrit.instructure.com/205000
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
we need to get on an up to date version, but this at least fixes some
bugs i was running into while writing specs for GQL-60
Test plan:
* pages using graphql still work (assignments2, gradebook, context
cards)
flag = none
Change-Id: I4b384c3724fc843132c9db34f044cd88aba227bb
Reviewed-on: https://gerrit.instructure.com/204276
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
when the kb shortcut dialog or the a11y checker tray close,
return focus to the button that opened it.
closes COREFE-108
test plan:
- in rce, click on the kb short cutton in the status bar
- close the kb shortcut dialog
> expect focus to return to the button
- repeat for the a11y checker
- tab until the show-on-focus kb shortcut button above the RCE
appears, click it, then close the dialog
> expect focus to return to the button
Change-Id: I27ea79930e643d9908a784fbcb89900918d3be01
Reviewed-on: https://gerrit.instructure.com/204283
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
`axios-cache-adapter`’s “browser” field in package.json says to use
A “dist” file that is prebuilt with webpack to handle old browsers
(github.com/RasCarlito/axios-cache-adapter/blob/master/dist/cache.js)
That means it has a copy of `regenerator-runtime` in it for the async
functions it uses. That is wasteful and is bytes that our users
shouldn’t need to download.
Test plan:
* the CSP stuff on the account settings page should work the same
* but the webpack js bundle should be smaller
Change-Id: I671f2eb60b57c43e002b9a62fd92feb5c96cd00b
Reviewed-on: https://gerrit.instructure.com/204252
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
this is to get it to work with how browserslist/autoprefixer/babel/
@instructure/ui-babel-preset expect things to work.
We had to change the name because
https://github.com/browserslist/browserslist#shareable-configs
Says:
For security reasons, external configuration only supports packages that
have the browserslist-config- prefix. npm scoped packages are also
supported, by naming or prefixing the module with
@scope/browserslist-config, such as @scope/browserslist-config or
@scope/browserslist-config-mycompany
And we have to add:
"browserslist": ["extends @instructure/browserslist-config-canvas-lms"],
to all of our package.jsons that use @instructure/ui-babel-preset
because that by default will use
"extends @instructure/browserslist-config-instructure—ui" which would
still do all the stuff for IE11
Test plan:
* run `yarn`
* all those errors about browserslist and postcss should not show uo
* look at the code in public/dist for canvas-planner,
* It should not include regenerator-runtime and you should see native
`async` functions
Change-Id: Ic84c13ac59d58963c12b8365b3068b5da3ee618d
Reviewed-on: https://gerrit.instructure.com/204251
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-3175
based on our browser support documentation
(https://community.canvaslms.com/docs/doc-10720) "On August 3, 2019,
Internet Explorer 11 will no longer be supported as a Canvas browser."
and since any code being merged to master now won't hit prod until after
august 3rd, we can safely drop IE11 support now
test plan:
* look at the code generated by webpack
* you should see things like "class" and arrow functions "() => {}"
* if you go to canvas in IE 11, it should not work
* if you go to canvas in the next oldest browsers we support (which
would probably be Edge 42 or Safari 11) it should still work the same
as it did before
Change-Id: Ifc7f64902a333fd0f662ff6a68eb8f4353f01130
Reviewed-on: https://gerrit.instructure.com/197827
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Replace Select with CanvasSelect
Replace legacy TextInput with the new TextInput
fixes ADMIN-2771
test plan:
- go to account courses page, /accounts/self
- click the "+Course" button
> expect the 2 TextInputs to accept input
> expect the subaccount and term selects to work as expected
> expect some nice screenreader messages as you interact with the
selects
> expect the course to be created with the right data
when clicking on the "Add Course" button
- try it again, but do something to make it fail (I set a breakpoint
at courses_controller.rb line 791 and set @course=nil)
> expect to get an error flash message
- click on the "details" button
> expect the details popup to be above the Modal's overlay and you
can dismiss it.
Change-Id: I8612b086a8812660c82c9d243746ed211deb5a59
Reviewed-on: https://gerrit.instructure.com/202575
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
We made this change in @instructure/ui-themeable in g/203714
but that is for the current master on instUI 6, we need it now even
though we are still on instUI 5 so this will back port it in so we can
use it now.
Test plan:
* Things that use `themeable` should work both with and without the
“Drop ie11” commit applied.
Specifically:
bin/rspec ./spec/selenium/dashboard/planner/student_planner_assignments_spec.rb:88
Should not fail with
TypeError: Class constructor Yr cannot be invoked without 'new'
Change-Id: I7ef8ef9eda1057badabbb08fcdd6875ad8064e89
Reviewed-on: https://gerrit.instructure.com/203950
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
this commit add the new CanvasSelect which wraps the new controlled-only
INSTUI Select (single select only) to provide a nearly drop-in
replacement for the deprecated INSTUI Select used in canvas.
This new CanvasSelect is then used in people_search.js and
TimeZoneSelect/index.js to resolve the
deprectation warnings.
changes include an upgrade to ui-select 6.8
closes ADMIN-2775, COREFE-186 COREFE-184
test plan:
- nav to a course's people page
- click on the +People button
> expect the Role and Section selects to work as expected
- nav to the account's people page
- click on the pencil icon to the right of a user
> expect the Time Zone select to show a blank line, then 2 groups
of time zones
> expect the select to work as expected
> expect screenreaders to tell you interesting things as you
interact with the select
Change-Id: I5dcfb2c1c8ca64071ce9dbf0a194777f10c711cf
Reviewed-on: https://gerrit.instructure.com/202508
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
See:
github.com/testing-library/dom-testing-library/releases/tag/v4.0.0
For the reason behind why the specs had to change to findAllByText
Test plan:
* js tests should pass
Change-Id: Idc5b217a0923cf7d702f94dfd4f3393beaa14a19
Reviewed-on: https://gerrit.instructure.com/202009
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Utilizing https://www.apollographql.com/docs/graphql-tools/mocking/
Benefits of this new approach:
- Query, propTypes, and mocked data all exist in the same location, so
it becomes much easier to modify.
- You can easily mock data nested deeply in data without needing to
manually drill down into it.
- The mocked data comes from a FRD graphql query, so you cannot
accidently put invalid fields into the testing data (for example,
null for a string that is marked as not null).
- Can save complex overrides into reusable pieces (graded submission)
Fixes COMMS-2224
Test Plan:
- Jenkins passes
Change-Id: Ib6c3c6f3b3c16b8829d89061b41d8a4d308eb0ed
Reviewed-on: https://gerrit.instructure.com/201591
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
closes: CORE-3187
AKA:
Revert "Revert "don’t count unread_count or dashcard indicators
against newRelic load time""
This reverts commit d754ff5ed1.
Test plan:
* the little badges that show unread discussion counts and stuff
on each dashcard should work the same as before
* the badge on the global nav that shows how many unread inbox messages
You have should work the same as before
* if you have newRelic set up, neither should count against page load
metrics
Change-Id: I3b869e7fb650f40f16f514db9d8b9f558443db5b
Reviewed-on: https://gerrit.instructure.com/201202
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This reverts commit aa977ecd2a.
Reverting based on belief that this is surfacing errors in the build:
"something went wrong updating unread count" TypeError: Failed to fetch
Change-Id: I842ad732d75c6ca83f31e140ddf5edb6f10e45fe
Reviewed-on: https://gerrit.instructure.com/201108
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
closes: CORE-3084
Test plan:
* the little badges that show unread discussion counts and stuff
on each dashcard should work the same as before
* the badge on the global nav that shows how many unread inbox messages
You have should work the same as before
* if you have newRelic set up, neither should count against page load
metrics
Change-Id: I03f81c30223355ce3e1a2632ba17bfd6f1ae658f
Reviewed-on: https://gerrit.instructure.com/197823
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes ADMIN-2742
there are challanges
- RCEWrapper keeps track of whether it has focus. This is true if
anything w/in its outermost div is the activeElement
- since the previously active element blurs
before the new element becomes active. we need a timeout to wait and
see where focus lands. this is true when:
- focus moves to a tinymce popup, like a menu
- focus moves to one of RCE's dialogs or trays
- the user interacts with content in the CanvasContentTray. This
is because a new instance of the CCT is created every time it
renders as the user interacts with it. (An artifact of how it's
wired into redux).
This also addresses a bug where the html-view textarea was the wrong
size when flipping between rich text and html views.
NOTE: if you close any of the Trays or Modals by typing "esc", it will
blur the RCE. This is a known bug that I'm hoping will be fixed
via INSTUi-2201. If not, then via another CORE ticket
test plan:
- not necessary, but if you test in assignments2, you'll know it's
working because the RCE will go away if it loses focus,
so enable assignments2, create an assignment, then
edit the assignment (you can't create an a2 assignment yet)
- insert and edit an external link
- insert and edit a course image
- upload an image
- insert and edit a course document
- upload a document
> in each case, expect focus to return to the RCE, and if applicable,
the yellow indicator box is correctly positioned.
- in any of the above cases, click on the yellow indicator while it's
visible
> expect focus to stay w/in the rce
resizing:
- click the "switch to html view" button
> expect the textarea to fill the avaiable space
- resize it and click the button to switch back
> expect the rce to be the same (or really close) size
Change-Id: If85c5644558fbce27530e43bb71c2bdb7e91eb12
Reviewed-on: https://gerrit.instructure.com/199273
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Test Plan:
- Given a quiz in a locale with different number formatting
- Change the points of a question to '1234.5' in that locale
- See it accept and format points correctly on the question and the
header
Closes QO-442
Change-Id: I75c353716718377bb26c1088a4db58aaa7c8f721
Reviewed-on: https://gerrit.instructure.com/198543
Tested-by: Jenkins
Reviewed-by: Jonathan Holt <jholt@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Update the react dependency to 16.8 since we're starting to use react
hooks, which requires that version at minimum.
test plan:
- linting still works
- intentionally create a violation of rules-of-hooks. Linting should
find and report the error.
Change-Id: I0baccd64397b31118b96eb390462acf56daeca96
Reviewed-on: https://gerrit.instructure.com/199053
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Test plan:
* the docker image should pass
* if you want to test locally, run:
`RAILS_ENV=production bundle exec rake canvas:compile_assets`
* that should work
Change-Id: I800a4ee035ec3f853c924a6f520ae061fccb4b56
Reviewed-on: https://gerrit.instructure.com/195856
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-3020
Doing these feature detections takes my chrome browser on a fast
MacBookPro 21ms. See: https://cl.ly/868790d66a8f
I hate to actually make any changes here but these are all things
That no browser that we support doesn’t support. And getting a flat
21ms boost on every pageload I think might be worth it.
To see the actual changes, look at this commit on GitHub:
https://github.com/ryankshaw/jquery/commit/dadf794ebc4c4dcf94c344dab7d9
Change-Id: I836f0ac19ae234fc789423d833a20b760fd42dc7
Reviewed-on: https://gerrit.instructure.com/195704
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-2922 CORE-2951 CORE-2950 CORE-2952
Also, since we are using the new @instructure/ui-icons we can pull
In the latest icons that design wants us to use for the toolbar buttons
test plan:
* canvas-rce build should pass and canvas webpack should consume it
as a “harmony export”
* check the “text color” button in the toolbar, it should
Update it’s color to match the color you picked
* the bulleted list icons in the toolbar should use instUI icons
* run `yarn webpack:analyze`, the canvas-rce chunk should be a lot
Smaller than it was. and everything from @instructure/ui-whatever
Should be coming from the /es dir.
Change-Id: I13c670bdd174a9bc10aca4a7f9c5bc9208883ac9
Reviewed-on: https://gerrit.instructure.com/192569
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Closes: CORE-1143
Test plan:
* load canvas in prod mode in a non-English language. Click around
And make sure everything works
* in prod mode, do a test to compare load time to what’s on beta.
* page load time and js bundle size should be smaller
* click around in the quizzes client apps and the ember grade book
And make sure those things work
Change-Id: I93c28c4a6d22db95cd1c7e59cd3f5221d46fe1ed
Reviewed-on: https://gerrit.instructure.com/143422
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
This is so other people can generate that webpack chunk webpage that
shows how big all the chunks are and what is in them
Test plan:
* either run script/nuke_node.sh or compile_assets or in some other way,
make sure your public/javscripts/translations files are up to date
* then run `yarn webpack:analyze`
* it should work for a few minutes then open a page that shows cool
webpack chunk stats in your browser
Change-Id: Ia070e373d81aaeec2131e8e299f82515cff57fa4
Reviewed-on: https://gerrit.instructure.com/193087
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Closes: CORE-2868 CORE-2869
This is needed because without
Doing that, our bundle sizes are going to blow up from the things we
Import from InstUI
Test plan:
* the result of a dynamic export will now give you a object grab bag
That has a “default” property. Not just the thing of whatever the
“default" export was.
* so to test this, go to some page that does a dynamic import (like
the dashboard page) and make sure that still works\
* run a prod build
* make sure that translations still work as before
Change-Id: I3dd1b32216052afd5fbc5d6cec40ea18264f65e9
Reviewed-on: https://gerrit.instructure.com/191578
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
fixes CORE-2871
Test Plan:
- go to a2 student view
- have a video comment added to the submission
- view the comments tab
- notice the new video player
Change-Id: I58a947fb2b5b31dd7fcb1fc63ae582b7e1038201
Reviewed-on: https://gerrit.instructure.com/191671
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
...Because it has NOT fixed the bug we needed it to
Closes: CORE-2817
This reverts commit e7c110f88a.
Test plan:
* open any page in canvas
* in the dev console, type $.flashError(“whatever”)
* the error message that appears should be styled correctly
Change-Id: I748b0f4607f671ba22ec0a38f9422e6179be24ab
Reviewed-on: https://gerrit.instructure.com/191538
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
These tools allow unit tests to validate that the graphql queries being
run using Apollo are valid according to the server's schema. This
includes validating the variables.
This commit includes a fix that the validator found with overrides where
a Section requires a name (String!), but a Group does not (String). To
fix the validation error, we have to have separate names for these
fields and handle the possibility that the group might have a null name.
closes ADMIN-2561
test plan:
- specs pass
- can still display the "Everyone" override (when there are no overrides)
- can still display the "Everyone Else" override
Change-Id: Ic19605e5ee12075e9abb5bb089e0285639957b69
Reviewed-on: https://gerrit.instructure.com/188602
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
closes: CORE-2746
THis is an attempt to make loading our Lato font faster for our end
users. From talking to @pam, it is our understanding that at the time
we introduced this, google did not have all the extended latin
characters, and that is why we served it ourselves.
But now google *does* include the extended latin characters so
it should be fine?
The good thing about loading it from google is that there is more of a
Likelihood that our users will already have this cached.
Also, to be honest, I still think we should just not download a webfont
and rely on system fonts that users already have. But this is my attempt
to try to see if we can make it faster before resorting that. Because I
know design really likes it :)
Test plan:
* the Lato font on pages should show up the same as it did before but
page
* load speeds should be faster as reported by lighthouse or our real
user monitoring
Change-Id: Ibcf75c74f569b6b457fe42d3be91cf6006e560fa
Reviewed-on: https://gerrit.instructure.com/188464
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
This approach solves the same xss vulnerability, but by doing it a way
we can guarantee that what we are trying to .html() onto the page is
safe (and not just arbitrary user content) instead of having to load the
_huge_ sanitize-html npm package and all of it’s deps
(like postcss, source-map, htmlparser2, buffer, and a bunch of others)
On the frontend so we can use it to sanitize all the untrusted
data-mathml content.
closes: CORE-2748
refs COMMS-1846
Test Plan:
* Go to the calendar, click on a day to add an event, and click on the
"More Options" button.
* Switch to the html editor, and add the following:
<img class='equation_image'
data-mathml='<img src=x onerror=prompt(document.cookie); />'>
* Save the event. Go back to the calendar and click on the newly saved
event, and notice that you don't get XSS'd
* Create another event in the calendar, and this time add the
following via the html editor:
<img class="equation_image" title="(-\infty,\infty)"
src="/equation_images/(-%255Cinfty%252C%255Cinfty)"
alt="Infinities: (-\infty,\infty)"
data-equation-content="(-\infty,\infty)" />
* Save the event, and load it in the calendar. Notice that it still
properly displays this mathml image properly.
* Test the same calendar event with a screen reader, and notice that
it is still accessible
Change-Id: I5fc1e17ecfc8576dfeaffacff8efcb08873bdd5e
Reviewed-on: https://gerrit.instructure.com/188609
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CORE-2770
we don’t need timezone data from before canvas was created (pre 2011)
or, realistically, 15 years from now. by using this
moment-timezone-data-webpack-plugin we can strip them out of our webpack
bundle and our common vendor JS file will be smaller.
and smaller js bundles = faster page loads
test plan:
* try to think of a compelling reason why we would need to properly
handle timezone weirdness that is either older than 2011 or more than
15 years from now
* if you can think of something, then we can’t do this
* run the prod webpack build, the vendor file should be smaller
Change-Id: I1823fb48cc14bc0687f5222d7f4344118825698e
Reviewed-on: https://gerrit.instructure.com/188810
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
closes: CORE-2749
Now that we use babel-transform-runtime, we can also do this to improve
performance over the existing React.createElement calls by inlining the
result of what it would have returned.
see https://github.com/facebook/react/issues/3228 for why this improves
runtime perf
so for an example, say you have:
const foo = <div className="bar" style={{color: 'red'}}>The Text</div>
normally babel would transform that to:
var foo = React.createElement("div", {
className: "bar",
style: {
color: 'red'
}
}, "The Text");
but this will transform it to:
var foo = _jsx("div", {
className: "bar",
style: {
color: 'red'
}
}, void 0, "The Text");
That React.createElement is a lot more complex and slower at runtime,
This should make things faster at runtime
TEST PLAN:
* bundle sizes should stay the same but js runtime for react “render”ing
Should be faster in production mode
Change-Id: I075d249b9effd0af1b16b9e35c1ddd27696c6955
Reviewed-on: https://gerrit.instructure.com/188865
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes ADMIN-2510
test plan:
- on the students tab of teacher view:
- type in the search field, at least 3 characters
- the search should happen after a short delay and display results
- the name, score, and submission date columns are sortable in ascending
and descending order
- sorting causes another load
- enter less than 3 characters in the search field
- after a short delay, a message should be displayed about needing
3 characters
- clearing the search field should go back to original search of all
students
Change-Id: Ibaaeff175089003a4a5fcbb27db32c9510330e25
Reviewed-on: https://gerrit.instructure.com/186995
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Closes: CORE-2727 CORE-2728 CORE-2729
This version works with both 5.x and 4.x of tinymce, so it will be fine
To use for both the old code and the new code
Test plan:
* smoke test to make sure that the a11y checker works just like it used
to
* in my following commit that upgrades to tinymce 5, you should not see
Errors about the a11y_checker plugin not working with tinymce 5
Change-Id: I220e79a5c5e04fc589d906adde83ab4c7ebb5794
Reviewed-on: https://gerrit.instructure.com/188187
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes: CORE-2588 CORE-2591
This completely removes the legacy RCE codepath. So you will need to
Have an https://github.com/instructure/canvas-rce-api running to use
sidebar in any Rich Content Editors.
Test plan:
* smoke test to make sure that the editor and sidebar work as it did
When you had the RCS feature flag on.
* there should not be any more settings or feature flags around turning
on the RCS service
Change-Id: I1c3e7f5a45eed5e010d8e425ae561e45f739fd3a
Reviewed-on: https://gerrit.instructure.com/186525
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
closes: CORE-2699 CORE-2700 UIDEV-99
This commit gets canvas-lms itself upgraded to babel 7. To do that we
also had to upgrade jest to v24. We had already got canvas-rce and
canvas-planner on jest24/babel7 but now this gets everything to babel 7.
so you will see a lot of things removed from yarn.lock since we don’t
don’t have to have different versions of everything for babel and jest
The other major thing this does is make it so any JS file in canvas
can become an @instructure/ui-themeable themeable component. This means
you no longer should have to put your css in app/stylesheets for any new
react components that you are writing.
Test plan:
1. Make sure that the perf of `yarn build:js` is on-par with what it was
before. We pass everything through the themeable babel transform now
so there is a chance it is slower. If it is majorly slower, we’ll have
to figure something out.
2. run a production weback build. The common (or any bundle for that
matter should get output exactly the same as it did before)
things to manually qa check:
* in a NODE_ENV=production enviornment, go to
/accounts/site_admin/developer_keys
* click the "+ Developer Key" button, it should open the modal.
(there are selenium tests that do this, but it was one thing that had
to be fixed to get jenkins to pass)
* on a course that is set up as a master course, click on the thing that
opens the blueprint courses tray.
* verify that when you click "Associations" and "Sync History" links in
that tray, that they dynamically load the webpack chunk for the
modal contents for that thing and then the modal is shown
(again, there are selenium specs that test that exact thing but it
is always good to manually test it too)
Change-Id: I802584228962b54480a500f8fe422f45c2dcac4c
Reviewed-on: https://gerrit.instructure.com/183965
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Change-Id: I52bfa14af7caa1c71449546c50b07d13d036b47a
Reviewed-on: https://gerrit.instructure.com/187716
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
Test plan:
* if you rebuild your docker image it shouldn’t complain about
A node version that is not compatible with this module
Change-Id: Ieef58139be7a913a9aa3b5156937e01752dd1537
Reviewed-on: https://gerrit.instructure.com/186683
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes CORE-2329
There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.
Test Plan:
- check to make sure that the assignments 2 availability dates
component produces markup exactly as it did before
- Automated tests pass
- Build canvas locally, everything passes.
- Build canvas with docker, everything passes.
Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes COMMS-1867
Test Plan:
- In old assignments/submission works flow
add a couple comments that are either video
only or audio only
- in A2 as a student visit the comments tab
- notice the videos show up in the new player
and work as expected
Change-Id: Ibbb87dd6e264fe49431045e3365771b21111134c
Reviewed-on: https://gerrit.instructure.com/185633
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
This gets canvas planner and canvas-rce on babel 7, which is a
prerequisite to canvas doing the same. Also, by not depending on the
Kitchen sink of ui-presets, it cleans a ton of unused stuff from our
node_modules/yarn.lock. It was originally 2 different commits but
in order to get the yarn.lock right, we have to do them all as one.
This also made it so we needed to have less “resolutions” in our
package.json since the newer versions of those things work fine with
the newer version of babel
So there are 2 test plan areas:
1. Canvas-planner
Closes: CORE-2575
Test plan:
* smoke test to make sure everything in canvas-planner still works/looks
like it used to in the canvas ui
* make sure the translation task (yarn check-transifex) still works
canvas-rce: upgrade to babel 7 & @instructure/ui-babel-preset
2. canvas-rce
Closes: CORE-2576
Test plan:
* smoke test the RCE editor
* theming should still work/look exactly as before
* make sure all the various build tasks (eg yarn test, test:coverage,
debug, lint, extract, etc) all still work as before
Change-Id: Id896687e3905f4df4627b181cad3f67ffe4417a5
Reviewed-on: https://gerrit.instructure.com/183877
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Since node-sass has fixed the bug that was causing this issue, we can
let it upgrade like normal and don’t need to pin it to a specific
version.
refs: SIS-3125, COMMS-1328
Also see: g/157921
Test plan:
QA:
* go to courses/x/assignments
* add a new assignment group
* the green little notification that appears should be styled correctly,
Exactly as before
DEV:
* ensure that the output from this code in g_instructure.scss:
…
li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
…
doesn’t erroneously get output as:
...
}
Change-Id: I0bd7a42ee4026faea7327270df7413036f77c809
Reviewed-on: https://gerrit.instructure.com/183688
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>