Test plan:
* automated tests should pass
* check this changelog https://instructure.design/#CHANGELOG
and see if you can see anything that might have broke
Change-Id: I97024e87d5e8af6715b68da7010da140af049335
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218787
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
whenever canvas-lms is updated, we get a new yarn.lock with a
subtly different node-sass entry. Let's finally check it in
closes: LA-243
test plan: n/a
Change-Id: I76de33c59aef5380d85df290132be86fac8b2660
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218133
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
- depends on COREFE-325
- remember values in each tab when user changes tabs
- disable Submit button when current tab does not have complete data
closes LA-106
AKA COREFE-376
test plan:
- open a page with the RCE
- click on media > Upload/Record Media toolbar item
> expect the Submit button to be disabled
- select a file in the computer tab
> expect the Submit button to be enabled
- switch to the Embed Tab
> expect the Submit button to be disabled
- enter text in the embed code textarea
> expect the Submit button to be enabled
- switch among the tabs
> expect the Computer and Embed
Tabs to retain their data (subtitles are not
retained in the computer tab and recorded video is
not retained in the record tab. see COREFE-377)
> expect the submit button to be enabled where there is
data
> expect clicking Submit to do insert the corresponding
media into the rce
Change-Id: I6833bb99f66ef7e4b738531dd34d4411b54d2dd2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214263
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
See https://github.com/ryankshaw/jquery/commit/3a48a84c for the
Actual changes
If this jQuery code was initialized after the DOMContentLoaded event
But before the window.load event, it would wait until the window.load
Fallback to run everything that was using $.ready() (aka $(fn))
this change make it so it executes all those callbacks now instead
Of waiting for window.load
Test plan:
* turn streaming on
* profile a page
* you should notice that jQuery is initialized as part of main.js
Sometime after DOMContentLoaded
* but you should see all the callbacks run then instead of after the
Window.load event
Change-Id: Ie75f3475f21ac9e7f7503c91e9c5d5700ff28b11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215873
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@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>
closes LA-109
formerly COREFE-325
test plan:
- load up the RCE
- click on Media > Upload/Record medoa
- select the Embed tab
- enter some embed code in the textarea
I copied this from youtube:
<iframe width="560" height="315" src="https://www.youtube.com/embed/Nuzi7LlSDVo"
frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
> expect the Jon Oliver video in the RCE
> expect the yellow box highlighting the video to be the right size
- you can actually put anything in the textarea and it will show up in
the RCE, as if you typed it in the HTML view. You should test typing
in the textarea too, since there is some bad interaction between
the TextArea and the Tabs I worked around.
Change-Id: I3225ae192ca054becb03f570e34d30817c06faec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211690
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ed Schiebel <eschiebel@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>
closes: COREFE-387
See this for the actual changes:
https://github.com/ryankshaw/jquery/commit/1529762158a452fecdeb31b826
Test plan:
* jQuery should work the same but the main bundle should be smaller
Change-Id: I246a34ee67e4c90caef5a9dc99ca87f58baa757d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214806
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: COREFE-365
this version of InstUI no longer appends the data-cid attributes from
instUI's testable when NODE_ENV===production. that is because it slows
things down in produciton. and since our selenium build runs with
NODE_ENV=production when it runs webpack we can't use those in our
selenium tests. you need to use semantic stuff or data-test-ids or
something else to find things instead.
test plan:
* automated tests should pass
Change-Id: Id346d6c4e25d8b7b148ebf9ad9fd09cbab6e7dfb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/213301
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@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:
* see the commit msg from the pull request
https://github.com/instructure/mediaelement/pull/52
* that forced RecalculateStyle should not happen anymore
* media element should work the same as before
Change-Id: I779d9aa193841bfe6e6f27004c3e0c85e0b734ea
Reviewed-on: https://gerrit.instructure.com/213061
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@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
In a future commit, we need to see why the tests in CanvasContentTray
In canvas-rce are so brittle and fix them
Change-Id: I890f47a0cae2758f2f91a3366066fe409c5ce056
Reviewed-on: https://gerrit.instructure.com/211956
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
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>
Fixes: ADMIN-2950
See: https://github.com/ryankshaw/jquery/commit/637babee7ed47a532c962d
For the actual fix
Test plan:
* root cause check:
Open your browser devtools:
Type: $(window).is(':hidden')
That should return `false` and not throw this error:
Uncaught TypeError: Cannot read property 'defaultView' of undefined
Type: $(window).is(':visible')
That should return `true` and not throw this error:
Uncaught TypeError: Cannot read property 'defaultView' of undefined
Manual check for the jira
- have analytics plugin configured
- have more than 10 students enrolled in a course
- scroll down in course analytics
- students beyond the first 10 should appear as you scroll
Change-Id: I0e6e3ae2f8b5758f02611273018b751b9e20f758
Reviewed-on: https://gerrit.instructure.com/211192
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Test Plan:
- Go to the RCE and click the plug toolbar icon
- This won't appear if you don't have some
tools installed
- The LTI tool window should appear
- Search for items in the search box and it will
filter to them.
closes COREFE-254
flag = rce_enhancements
Change-Id: Ifc9844f4a2db21b7217c3df615d0c478faa28806
Reviewed-on: https://gerrit.instructure.com/210331
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Lauren Williams <lcwilliams@instructure.com>
Closes: COREFE-301
Test plan:
* all the instUI things should still work
* specifically check to make sure that bowser is no longer in prod build
And that objectSpread thing is fixed so it uses babel helpers
Change-Id: Ie30edddba6ff7c9f37852ea13a65dddc42f93d65
Reviewed-on: https://gerrit.instructure.com/209745
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@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>
closes COREFE-203
Adds ability for a teacher to switch between course and user files.
Changes the images query logic to piggyback on the /documents api
so docuents, media, and images will all share the same query logic
test plan:
- have a course with some images
- have a teacher and a student with personal images
- go to the course as a teacher
> expect rce images toolbar button menus to
show Upload, Course images, and My images
- upload an image
> expect it to succeed
> expect the new image to appear in the Course images
tray
> expect the images to appear in the course's upload media folder
- select My Images from the toolbar menu
> expect my Images to be shown in the tray
- use the filter to switch to Course Images
> expect course Images to be shown in the tray
- repeat, starting with Course Images and flipping to My Images
- go to the course as a student
> expect rce Images toolbar button menus to
show Upload and My Images
- upload Image(s)
> expect it to succeed
> expect the new imsges to appear in the user's file page's
My Files (/files).
> do NOT expect the imsges to show up in the course's Files page
(/courses/:id/files)
- click on Images > My Images
> expect to see Links and My Images in the top select of the tray
> do NOT expect to see the Course Files option in tray
Change-Id: If7f4e6b6f90b445e497be81b9cb940da71a8cf74
Reviewed-on: https://gerrit.instructure.com/206788
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Just making sure there’s not something fixed in a package we use
That could help with build flakiness
Test plan:
* builds should pass
Change-Id: I67d738063dd1170612846673623455b7c62f71d5
Reviewed-on: https://gerrit.instructure.com/207712
Tested-by: Jenkins
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>
add cleanup for spec_results folder on nodes.
add jasmine-pretty-html-reporter to get html reports
for i18n tests.
refs: CORE-3254
Change-Id: Ifa1724e368c5c91dc69e854ae98a1a13abe33aa0
Reviewed-on: https://gerrit.instructure.com/207203
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@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>
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>
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>
closes CORE-2654
Testing Notes:
* Max dimensions per size are as follows
* Small: 200 x 200px
* Medium: 320 x 320px
* Large: 400 x 400px
* Extra Large: 640 x 640px
* Images must be at least 10 x 10px
test plan:
1. Add an image to TinyMCE
2. Select the image
3. Click the "Options" button in the popover
4. For each of the preset sizes:
a. Select the size
b. Click the Done button
c. Verify the image fits that size
5. For the Custom size:
a. Enter a width
b. Verify the height maintains the aspect ratio
c. Enter a height
d. Verify the width maintains the aspect ratio
e. Verify the image cannot be saved when:
* The image is too small
* The dimensions are not numbers
6. Integration with tinymce
a. add an image
b. click in it, then on the Options button
to open the tray
c. resize and click Done
e. Verify the Options button/toolbar realigns
itself with the newly sized image
Change-Id: I1c1456b33c355d2d17a5430cd3d6d1687ff6ecdc
Reviewed-on: https://gerrit.instructure.com/198540
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
This is the rest of the npm deps except for the ones we know we have to
hold back like the graphql/apollo stuff and canvas-rce’s tinymce
Test plan:
* builds should pass
Change-Id: I985cf8915540af8377d5b83bb3c114a58ccfce4d
Reviewed-on: https://gerrit.instructure.com/206060
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@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>
the entry to ui-focusable unexpectedly changed.
Change-Id: Iba491ab95d415d5bb37677da8ebeae9aeb36dffc
Reviewed-on: https://gerrit.instructure.com/205624
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This also upgrades it to babel 7 so it should be able to handle other
Modern features that it used to not.
I will try to get jon to merge the pull request for this
https://github.com/jenseng/i18nliner-js/pull/27
And use the official version but for now we can just use it directly
From my pull request branch.
Test plan:
* with the next commit applied (which changes all the <Fragment>s to <>)
* Run bin/rake i18n:generate_js
* It should work
Change-Id: I2752ff4c18c8e71b8b0530e0572596fa7da9ea8e
Reviewed-on: https://gerrit.instructure.com/205377
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
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>
fixes COMMS-2290
flag Assignments 2
Test Plan:
- create a media upload assignment
- in a2 as a sutdent go submit an assignment
- notice a video upload button
- click button
- notice the modal is shown and you can drag and drop video files
or record yourself
- close modal
- notice no console errors or crashes
Change-Id: I9a6184efb99aa05d0d634d2744cca00abf5ae26e
Reviewed-on: https://gerrit.instructure.com/204375
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@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>
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>
closes COREFE-193
test plan:
- the RCE still works and the tests pass
- in particular, be sure trays and dialogs open (this was
broken by instui 6.8.0)
Change-Id: Ic4bc52686adbe1ae182f706e2146d7cae57ffb98
Reviewed-on: https://gerrit.instructure.com/203461
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
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>
Test plan:
* automated tests should pass
Change-Id: Iedbf82c5addaa0842b1bb83f9baa71dbcf6e3d55
Reviewed-on: https://gerrit.instructure.com/201476
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Steven Burnett <sburnett@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>
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
…instead, just use the default config for the rest of the repo
Test plan:
* cd packages/canvas-planner
* yarn eslint src/components/BadgeList/index.js
* you should not see an error about not being able to find flowtype
Change-Id: I48c4ab3ac20a60352c20c489addb4d4b4a32e83a
Reviewed-on: https://gerrit.instructure.com/199060
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Closes: CORE-3076
Test plan:
* verify that the “View with the focused prop” mentioned in the jira
ticket is in this release
Change-Id: Ic0d1763d408341ac395f9b23c61b381c6ae59cda
Reviewed-on: https://gerrit.instructure.com/198067
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 requires an update to the tinymce-a11y-checker package for it to
actually work.
closes CORE-2638
test plan:
- click the a11y checker button in the rce status bar
- the a11y checker tray should open up and run
Change-Id: Ic5afc94e14869e58976e67ba71023ccbc4347f5e
Reviewed-on: https://gerrit.instructure.com/197336
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
refs CORE-2626
Test Plan:
- Start RCE API using the proper ENV variables, I can provide
those upon request
- Go to the Upload Image dialog
- Click the Unsplash Panel
- Type in a search phrase
- You should be able to do a search and get results back
- NOTE: At this point, you can't select an image and have
it be inserted into the RCE
Change-Id: I06832be6ef1c2e299c531c68a8d34782c3cebee0
Reviewed-on: https://gerrit.instructure.com/195273
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes CORE-2903
test plan:
- load a page with the rce
- TAB into the RCE and into the StatusBar
> expect right/left arrows to move focus from one button to
the next.
> expect focus to cycle back to the other
end when you go too far
- tab out of the status bar
- click one of the buttons to give it focus
- use the arrow keys again
> expect focus to move right|left from the starting point
- give he drag handle focus
> expect up/down arrows to resize the RCE w/o scrolling the page
- fire up a screenreader
> expect the button area of the status bar to be announced as a
toolbar
Change-Id: I00e5a761ebc25ae784267c57bb5a653b68ccacba
Reviewed-on: https://gerrit.instructure.com/197059
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
One technical issue was the rce's iframe would swallow mouse events if
the mouse was dragged fast enough to wind up over the iframe before it
was resized. The solution was to temporarily add a div that covers the
window so that iframes won't take over mouse events.
closes CORE-2882
test plan:
- Find the new drag handle in the lower right corner and drag it around.
The editor should resize vertically.
- Quickly drag into the RCE window. The resize should continue to work
and not get stuck.
Change-Id: Id915f013737d98f0bf5e2b54a7e856a060d0c7e3
Reviewed-on: https://gerrit.instructure.com/194118
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@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>
fixes CORE-2505
fixes CORE-1747
fixes CORE-2847
test plan:
- create a new quiz
- enter an image without alt text in the rce
- run the checker, it should find the issue
- go to questions and add one
- enter an image without alt text in the rce
- run the checker, it should find the issue in the correct editor
- add an additional error to the editor
- run the checker, fix the error and click "Apply"
- focus should move to the close icon
- add an image by clicking on a thumbnail in the images sidebar
- run the checker, it should have an alt text filename error for the
image
Change-Id: I3c81251c0fa11fa0637d59b01ef2b40e670eae01
Reviewed-on: https://gerrit.instructure.com/195733
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
This also replaces our old react-tinymce package with the official
@tinymce/tinymce-react package.
closes CORE-2836
test plan:
- typing in the rce should update the word count in the status bar
- the html path of the current cursor position should also be shown in
the status bar
- generally test all the rce things because of the package replacement
Change-Id: Ibe2b182ff55ba2dc77988dcd4c1865a28667db95
Reviewed-on: https://gerrit.instructure.com/193154
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@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>
closes CORE-2630
test plan:
- does the rce look like the mockup with the default theme?
- does the rce look like the current custom canvas theme?
- does the rce look right in high contrast?
- do all the toolbar buttons work?
- does kb nav among the toolbar buttons work?
1. tab between toolbar button groups
2. arrow between buttons in a group
you may ask "Why am I testing that buttons work?" Because simple changes
like adding a background to a button breaks kb nav.
Change-Id: Ie36335b36ac3a27a0d49314310fe7e338bef411f
Reviewed-on: https://gerrit.instructure.com/192410
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Laura Leavitt <lleavitt@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>
Some things in yarn.lock got out of sync. This fixes that.
Change-Id: Ib9b9415bbca6de1f0c28aa11361fe9740cfaa838
Reviewed-on: https://gerrit.instructure.com/191471
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
refs CORE-2627
Test Plan:
- Click images toolbar button
- Select upload image
- Click the URL tab panel option
- A box should allow entering a URL
- NOTE: It should not submit or embed the URL at this point
Change-Id: Ib1022198a23d291dff990cb0b91cefe163229702
Reviewed-on: https://gerrit.instructure.com/190035
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@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-2599
Test plan:
* with the rce_enhancements feature flag turned off, nothing should
change
* turn on the rce_enhancements feature flag
* go to an editor
* it should load without throwing any errors
- note, you will see some “bomb” icons that we will need to update
And the formatting/styling of the toolbar will need some work.
But that is ok for this commit because it is all behind the feature
Flag and we will get address those in a future commit
Change-Id: If28167731b5b285005143861e19fdb2fc0c34def
Reviewed-on: https://gerrit.instructure.com/187179
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@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>
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>
Nothing major here. They just released a couple new versions so while we
are pretty current I want to stay up-to-date
Test plan:
* I am comfortable saying if the builds pass, shipit
Change-Id: I955dce0e74f7b86710f9a5956c12ad5a244a0c21
Reviewed-on: https://gerrit.instructure.com/186130
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Fixes: CORE-2527
dfxp captions can be used to create an xss attack. so the mediaelement
that the arc team maintains removed that functionality. By pulling in
The new version we prevent the xss attack vector too.
Note: looking at the wording on the page where you can add captions
We have always said:
“Once you have a subtitle track in either the SRT or WebVTT format,
you can upload it here.”
And the api docs say:
“The contents of the track, in SRT or WebVTT format”
So we have never “officially” supported dfxp files.
Test plan:
* prepare a SRT file as explained in SEC-2176
* either upload/record a new video or find a page with one on it already
* try to upload that as a subtitle track to that video
* you should see an “Oops, something went wrong” error.
* if you had malicious TTML/dfxp caption tracks (like something as
explained in SEC-2176) added to that video, they should not show
Up as options in the available tracks to show for that video.
and you should not see the malicious javascript alert like it did
before
Change-Id: Id55e6b999c209bf8fa505c60aa459d60e9326ee9
Reviewed-on: https://gerrit.instructure.com/184843
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@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>
Closes: CORE-2560 CORE-2569
Refs: ADMIN-2453
Test plan:
* general spot check to make sure things look the same
(Specifically check the publish/unpublish button on the modules page)
* verify that the total size of the vendor & common production webpack
bundles is smaller
Change-Id: I734e9723917c14778cdc5fc4e22dcd1011b5e77e
Reviewed-on: https://gerrit.instructure.com/184911
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@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>
closes ADMIN-2343
test plan:
- load an assignment in the A2 teacher view, add #edit to the url and
refresh the page
- change each field on the page (modules, group, name, points,
description, submission type, attempts allowed. others are not
wired up yet since the UI for these either isn't built yet, or has
changed recently)
> expect the Cancel/Save/Publish foot er to appear. buttons on the
right
> on clicking cancel, expect the changed value(s) to revert and the footer to disappear
> on clicking save, expect the footer to disappear
> on clicking publish, if previously unpublished expect footer to
disappear and the toggle to flip to published
- flip the publish toggle
> expect the footer _not_ to appear
- flip to rtl
> expect the footer buttons to be on the left, even in Edge
- enter an invalid value for Points
> expect an error message, and for the field to remain in edit mode
- delete the assignment's name and TAB
> expect an error message that the name is required
Disabling the Save and Publish buttons when there are invalid fields on
the page is left to ADMIN-2443
Change-Id: I016af6dc6e0e18d9aed1c364a328f9107a4d2762
Reviewed-on: https://gerrit.instructure.com/180831
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
The graphiql-explorer makes it easy to explore the schema and build
queries simply by checking the boxes next to fields from the schema
test plan:
- /graphiql still works as expected, but includes the explorer panel
- canvas features that leverage graphql still work as expected
(since the version of the graphql js client was updated)
Change-Id: Ief625c6fb59e4e32e23a177f3b566aae271ab108
Reviewed-on: https://gerrit.instructure.com/181586
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
test plan:
- tests pass and everything still works
Change-Id: I73540f1b5e4647c19f3446ce558bce7e4dfde684
Reviewed-on: https://gerrit.instructure.com/180736
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
refs COMMS-1844
Test Plan:
- Click on comments on an A2 student view
- notice there is a loading indicator then
the comments load
Change-Id: I43ed778b826153b5cb4e58b9365a0016dec10897
Reviewed-on: https://gerrit.instructure.com/180618
Tested-by: Jenkins
Reviewed-by: Aaron Hsu <ahsu@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
waiting on an instui release. without it
1. the Points edit has the wrong font size
2. you cannot delete a module
closes ADMIN-2303
test plan:
- create an assignment, open it, click the assignments 2 button,
then add #edit to the url and refresh (this forces the assignment
into edit mode)
> expect the assignment type to be "Assignment" and to be editable
- on selecting any value other than "Assignment", expect to be
sent to the corresponding page in canvas after confirmation
> expect the correct module(s) to be selected, and to be editable
- expect to be able to select > 1 module
- when all modules are deleted, expect th "No Module Assigned"
placeholder
> expect the correct assignment group to be selected, and to be
editable
> expect the assignment name to be correct and editable
- edit and delete the name
> expect a "name is required" message
> expect the points to be correct and editable
- entering anything that's not a number should result in an
error message
Change-Id: Ief36b01d7f5380f16d3e76b7afeb7d7d8e38b3bc
Reviewed-on: https://gerrit.instructure.com/176293
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes ADMIN-1510
This change includes some code to flip some of the elements into edit
mode, but that's not part of this ticket (though if you want to see
it, add #edit to the URL)
test plan:
- have an assignment with some submission types, specified allowed
filename extensions, due, lock, unlock dates
- load /courses/:course_id/assignments/:assignmen_id?assignments_2=true
- click the ">" to expand the override summary to see the details
> expect the data to match your assignment
notes:
- "score to keep" and submission requirements are hard-coded for now
until we get the data
- the attempts input only appears when attempts allowed is limited
(e.g. non null)
- Submission Requirement only appears when there are > 1
submission types
- the UI mostly matches the mockup. Mary's design is changing, so
it may not be 100% exact.
Change-Id: Ia385ec7880e3d834658d412a4c7ac5afc9091fac
Reviewed-on: https://gerrit.instructure.com/175098
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
closes ADMIN-2233
test plan:
- click the delete button which will open a confirmation dialog that
roughly matches the design
- a11y for the dialog should make sense
- the close button should dismiss the dialog with no effect
- the cancel button should dismiss the dialog with no effect
- the delete button should start a delete operation
- when the delete operation completes, you should be redirected to the
assignment index screen with a message indicating the assignment has
been deleted
- if your user does not have permission to delete the assignment, or
some other error occurs, then the in-development error screen should
be shown
Change-Id: I0c3304360d3c389296bd0910d02d8215bdb0ac9e
Reviewed-on: https://gerrit.instructure.com/177754
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Fixes 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: If0f1ac8ad93f04ececb7aa2f7ef221204b1ce14f
Reviewed-on: https://gerrit.instructure.com/179783
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
closes CORE-2253
Test Plan:
- Enable CSP settings
- Go to a sub-account's settings page
- You should see a security tab
- Go to the security tab
- CSP information should be displayed including a toggle
between Off, Inherited, and On.
- Behavior should match the description shown on the page.
Change-Id: If2a485cc3712f6af8d266401da67d4deaa845696
Reviewed-on: https://gerrit.instructure.com/177971
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
closes CORE-2109
Test Plan:
- Enable the Content Security Policy feature flag
- Go to account settings, security tab
- Use the Add Domain form to add a domain
- It should appear on the whitelist
- Flip the CSP switch to enabled
Change-Id: Iaea578c52e9b8bb6541a4e13edc6a1702e907cdf
Reviewed-on: https://gerrit.instructure.com/174980
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
closes CORE-2323
refs CORE-2115
refs CORE-2097
Test Plan:
- Add something to an RCE instance that has a11y errors
- Run the a11y checker
- You should see errors show up.
- Click the (?) hint button
- The tooltip should contain a link for most rules
that is descriptive (e.g, learn more about xyz)
- The link should also be underlined
Change-Id: I1930f855d05ffa71f7e27c2943503371e6224175
Reviewed-on: https://gerrit.instructure.com/173487
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Because JSDOM has … needs.
Change-Id: I3b929d96dc208c6b32802bbfa806cc22adff7fdf
Reviewed-on: https://gerrit.instructure.com/177129
Tested-by: Jenkins
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
refs ADMIN-2277
test plan:
- Do some spot checking all around, esp. on newer stuff written with
InstUI
- Do some specific spot checking on:
- Assignments edit page. Esp. with moderated grading
- Gradebook late policies
- Check the original bug (ADMIN-2211)
Change-Id: Iaaaeb9d86dc2d59cb2c9ccca2a8764a5adb0896b
Reviewed-on: https://gerrit.instructure.com/176912
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
This also adds support for apollo-link-state. We are using this to move
data from the `ENV` into our apollo query results, to keep a single
source of truth and easier unit tests.
If there are more then two modules that an assignment belongs to
(which is abnormal) we are only rendering the first two modules with an
additional link to the modules page, indicating that there are more
modules this assignment belongs to.
Fixes COMMS-1800
Test Plan:
- Create an assignment, and add it to four modules
- Navigate to the assignment as a student
- Notice that 2 of the four modules are displayed in the header
Change-Id: I9b797486ba56c8b827e5f76114c5a08d2f969f41
Reviewed-on: https://gerrit.instructure.com/174837
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>
This prepares us for using apollo's instrospection fragment matcher
(which isn't supported with -boost).
Test plan:
pages that use graphql still work
refs GQL-17
Change-Id: Ib6af304855e6c0e23b598344ac1d30f4d4aa03a5
Reviewed-on: https://gerrit.instructure.com/172936
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>